Q: 1 On receiving an interrupt from an I/O device, the CPUs:
Hand over the control of address and data bus to interrupting device
Branch off to interrupt service subroutine immediately
Branch off to interrupt service subroutine after completion of current instruction
None of these
[ Option C ]
An interrupt is a signal sent by an I/O device to the CPU to request immediate attention. However, the CPU does not stop execution in the middle of an instruction. When an interrupt occurs, the CPU first completes the execution of the current instruction to maintain correctness and consistency of operations.
After finishing the current instruction, the CPU saves the necessary information and then branches to the Interrupt Service Routine (ISR) corresponding to that interrupt. This mechanism ensures proper control flow and prevents data corruption.
Q: 2 To access the I/O devices the status flags is continuously checked in:
Program Controlled I/O
Memory Mapped I/O
I/O Mapped
None of these
[ Option A ]
In Program Controlled I/O, the CPU continuously checks the status flags of the I/O device to see whether it is ready for data transfer. This method is also called polling, where the processor keeps testing the device status until the operation is complete.
Thank you so much for taking the time to read my Computer Science MCQs section carefully. Your support and interest mean a lot, and I truly appreciate you being part of this journey. Stay connected for more insights and updates! If you'd like to explore more tutorials and insights, check out my YouTube channel.
Don’t forget to subscribe and stay connected for future updates.