$12 (Status) : 0x00001c3c
$13 (Cause) : 0x00000400
$14 (EPC) : 0x0040000c
The memory for the text segment looks like this, with words listed in big-endian order:
[0x00400000] 0x40806000 0x3c081001 0x8d090000 0x11200005
[0x00400010] 0x3402000b 0x01202020 0x0000000c 0x21080001
[0x00400020] 0x0401fff9 0x3404000a 0x3402000b 0x0000000c
[0x00400030] 0x3402000a 0x0000000c 0x00000000 0x00000000
(a) Was the exception a trap or an interrupt?
(b) What was the reason for entering the kernel?
(c) What was the address of the instruction that executing immediately before the kernel was entered?
(d) Give a reasonable TAL description of the instruction executing immediately before the kernel was entered.
puts
in the kernel by spin-waiting until all characters of a string are
printed on a device that prints 1000 characters per second. Assume
that it take the computer 100 ns to execute the code to print the next
character, adjust queue pointers, etc.
What fraction of time would the kernel spend
doing useless spin-waiting when printing a long string
(so you can ignore start up and finishing)?
Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0 Old KU | Old IE | Prev KU | Prev IE | Curr KU | Curr IEWhat would be the value of these bits if the following were true: Originally a user level program was running but it was interrupted. This interrupt caused a reentrant interrupt-driven kernel to run, but it too was interrupted while executing the keyboard interrupt handler. The second interrupt cause the kernel to be re-entered and the processor is currently storing the value of the EPC register.
(a) What is the total capacity of the drive (in bytes)?
(b) What is the average number of sectors per track?
(c) What is the minimum time it takes to read all the sectors on one track?
(d) What is the minimum time it takes to read all the sectors on one cylinder?
(e) What is the minimum time it takes to read all the sectors on one surface?
(f) What is the minimum time it takes to read all the sectors on the disk?
Turn in your file containing answers by running the script:
handinHW5 hw5file
where hw5file is an example name of a file
containing the homework answers.
The handinHW script submits your homework for you.
No printout will be turned in.