Interrupt
Question 1 |
A computer handles several interrupt sources of which the following are relevant for this question.
- . Interrupt from CPU temperature sensor (raises interrupt if
CPU temperature is too high)
. Interrupt from Mouse(raises interrupt if the mouse is moved or a button is pressed)
. Interrupt from Keyboard(raises interrupt when a key is pressed or released)
. Interrupt from Hard Disk(raises interrupt when a disk read is completed)
Which one of these will be handled at the HIGHEST priority?
Interrupt from Hard Dist | |
Interrupt from Mouse | |
Interrupt from Keyboard | |
Interrupt from CPU temperature sensor |
Therefore, we can say that priorities are,
CPU temperature sensor > Hard disk > Mouse > Keyboard.
Question 2 |
A CPU generally handles an interrupt by executing an interrupt service routine
As soon as an interrupt is raised. | |
By checking the interrupt register at the end of fetch cycle. | |
By checking the interrupt register after finishing the execution of the current instruction. | |
By checking the interrupt register at fixed time intervals. |
Question 3 |
Which one of the following is true for a CPU having a single interrupt request line and a single interrupt grant line?
Neither vectored interrupt nor multiple interrupting devices are possible.
| |
Vectored interrupts are not possible but multiple interrupting devices are possible.
| |
Vectored interrupts and multiple interrupting devices are both possible.
| |
Vectored interrupt is possible but multiple interrupting devices are not possible. |
Also for vectored Interrupts it is always possible if we implement in daisy chain mechanism.
Question 4 |
A device with data transfer rate 10 KB/sec is connected to a CPU. Data is transferred byte-wise. Let the interrupt overhead be 4 μsec. The byte transfer time between the device interfaces register and CPU or memory is negligible. What is the minimum performance gain of operating the device under interrupt mode over operating it under program-controlled mode?
15 | |
25 | |
35 | |
45 |
In 1 sec it transfer 10 KB of data = 10 × 103 B = 104B
Data interrupt overhead = 4μsec = 4×10-6 sec
Transferring 10KB overhead = 4×10-6×104sec
Performance gain = 1/(4×10-6×104) = 102/4 = 25
Question 5 |
A processor needs software interrupt to
test the interrupt system of the processor | |
implement co-routines | |
obtain system services which need execution of privileged instructions | |
return from subroutine |
