Interrupt · Computer Organization and Architecture
12 questions · asked in 11 of 27 years (2000–2026)
MCQ 11 · NAT 11-mark 12
2000Questions per year2026
Questions 1–5 of 12
Consider the following two statements about interrupt handling mechanisms in a CPU.
: In non-vectored interrupt mechanism, it usually takes more time to start the Interrupt Service Routine (ISR) when compared to that in a vectored interrupt mechanism.
: In daisy-chain interrupt mechanism, the CPU polls all the input devices individually to determine the source of the interrupt.
Which one of the following options is correct with respect to and
: In non-vectored interrupt mechanism, it usually takes more time to start the Interrupt Service Routine (ISR) when compared to that in a vectored interrupt mechanism.
: In daisy-chain interrupt mechanism, the CPU polls all the input devices individually to determine the source of the interrupt.
Which one of the following options is correct with respect to and
Answer: (C)
S1: In a non-vectored interrupt scheme, the CPU usually has to poll each device. Or it runs a fixed interrupt-service routine that then finds out which device raised the interrupt. This is how it gets the interrupt source and the ISR address, and it costs extra time. In a vectored scheme, the interrupting device gives the address of its own ISR directly (or a lookup table gives it). So non-vectored handling usually takes more time to start the ISR. S1 is true.
S2: In a daisy-chain setup, the devices are joined in series in priority order. The interrupt-acknowledge signal (or the job of saying "who interrupted") passes along the chain from one device to the next. The CPU does not poll every device one by one. That description fits a different scheme, "software polling," and not daisy-chaining. So S2 is false.
Answer: S1 is true and S2 is false.
S2: In a daisy-chain setup, the devices are joined in series in priority order. The interrupt-acknowledge signal (or the job of saying "who interrupted") passes along the chain from one device to the next. The CPU does not poll every device one by one. That description fits a different scheme, "software polling," and not daisy-chaining. So S2 is false.
Answer: S1 is true and S2 is false.
Suppose a program is running on a non-pipelined single processor computer system. The computer is connected to an external device that can interrupt the processor asynchronously. The processor needs to execute the interrupt service routine (ISR) to serve this interrupt. The following steps (not necessarily in order) are taken by the processor when the interrupt arrives:
(i) The processor saves the content of the program counter.
(ii) The program counter is loaded with the start address of the ISR.
(iii) The processor finishes the present instruction.
Which ONE of the following is the CORRECT sequence of steps?
(i) The processor saves the content of the program counter.
(ii) The program counter is loaded with the start address of the ISR.
(iii) The processor finishes the present instruction.
Which ONE of the following is the CORRECT sequence of steps?
Answer: (A)
When an asynchronous interrupt arrives, the processor must first get to a safe state. Only then can it hand over control:
1. (iii) The processor finishes the present instruction — an interrupt is served only at the end of an instruction, never in the middle of one.
2. (i) The processor saves the content of the program counter — this lets the program continue later from the same place.
3. (ii) The program counter is loaded with the start address of the ISR — at this point control moves to the ISR.
Answer: (iii), (i), (ii)
1. (iii) The processor finishes the present instruction — an interrupt is served only at the end of an instruction, never in the middle of one.
2. (i) The processor saves the content of the program counter — this lets the program continue later from the same place.
3. (ii) The program counter is loaded with the start address of the ISR — at this point control moves to the ISR.
Answer: (iii), (i), (ii)
A keyboard connected to a computer is used at a rate of 1 keystroke per second. The computer system polls the keyboard every 10 ms (milli seconds) to check for a keystroke and consumes 100 (micro seconds) for each poll. If it is determined after polling that a key has been pressed, the system consumes an additional 200 to process the keystroke. Let denote the fraction of a second spent in polling and processing a keystroke.
In an alternative implementation, the system uses interrupts instead of polling. An interrupt is raised for every keystroke. It takes a total of 1 ms for servicing an interrupt and processing a keystroke. Let denote the fraction of a second spent in servicing the interrupt and processing a keystroke. The ratio is ______ . (Rounded off to one decimal place)
In an alternative implementation, the system uses interrupts instead of polling. An interrupt is raised for every keystroke. It takes a total of 1 ms for servicing an interrupt and processing a keystroke. Let denote the fraction of a second spent in servicing the interrupt and processing a keystroke. The ratio is ______ . (Rounded off to one decimal place)
Answer: 10.2
Polling: 100 polls each second (one per 10 ms) 100 s gives 10 ms. Add 200 s for the single keystroke ms per second.
Interrupts: one keystroke each second 1 ms ms per second.
Answer: 10.2
Interrupts: one keystroke each second 1 ms ms per second.
Answer: 10.2
Consider the following statements.
I. Daisy chaining is used to assign priorities in attending interrupts.
II. When a device raises a vectored interrupt, the CPU does polling to identify the source of interrupt.
III. In polling,the CPU periodically checks the status bits to know if any device needs its attention.
IV. During DMA, both the CPU and DMA controller can be bus masters at the same time.
Which of the above statements is/are TRUE?
I. Daisy chaining is used to assign priorities in attending interrupts.
II. When a device raises a vectored interrupt, the CPU does polling to identify the source of interrupt.
III. In polling,the CPU periodically checks the status bits to know if any device needs its attention.
IV. During DMA, both the CPU and DMA controller can be bus masters at the same time.
Which of the above statements is/are TRUE?
Answer: (C)
Let us check every statement:
- I: In daisy chaining, the devices are joined in a series. The device closest to the CPU has the highest priority TRUE.
- II: A vectored interrupt gives the ISR address by itself, so the CPU does not need polling FALSE.
- III: This is exactly what polling means TRUE.
- IV: There is only one bus master at one time. The CPU leaves the bus during DMA FALSE.
Answer: I and III only
- I: In daisy chaining, the devices are joined in a series. The device closest to the CPU has the highest priority TRUE.
- II: A vectored interrupt gives the ISR address by itself, so the CPU does not need polling FALSE.
- III: This is exactly what polling means TRUE.
- IV: There is only one bus master at one time. The CPU leaves the bus during DMA FALSE.
Answer: I and III only
The following are some events that occur after a device controller issues an interrupt while process L is under execution.
(P) The processor pushes the process status of L onto the control stack.
(Q) The processor finishes the execution of the current instruction.
(R) The processor executes the interrupt service routine.
(S) The processor pops the process status of L from the control stack.
(T) The processor loads the new PC value based on the interrupt.
Which one of the following is the correct order in which the events above occur?
(P) The processor pushes the process status of L onto the control stack.
(Q) The processor finishes the execution of the current instruction.
(R) The processor executes the interrupt service routine.
(S) The processor pops the process status of L from the control stack.
(T) The processor loads the new PC value based on the interrupt.
Which one of the following is the correct order in which the events above occur?
Answer: (A)
Steps of interrupt handling, in order:
Q: the current instruction is completed P: L's status is saved on the stack T: the PC is loaded with the ISR address R: the ISR is run S: L's status is restored.
Answer: QPTRS
Q: the current instruction is completed P: L's status is saved on the stack T: the PC is loaded with the ISR address R: the ISR is run S: L's status is restored.
Answer: QPTRS
Keep practising