Q: 1 Which of the following modes of I/O operation keeps the processor most busy?
Programmed I/O
Interrupt Initiated I/O
DMA
None of these
[ Option A ]
Input/Output (I/O) operations allow the CPU to communicate with external devices like keyboard, disk, printer, etc. There are three main I/O techniques:
1. Programmed I/O.
2. Interrupt-driven I/O.
3. DMA (Direct Memory Access).
In Programmed I/O, the CPU repeatedly checks the device status in a loop (called polling). During this time, the CPU cannot perform other useful tasks. This wastes processor time and keeps it fully occupied.
In Interrupt-driven I/O, the CPU performs other tasks and only responds when the device sends an interrupt signal. This reduces CPU idle waiting.
In DMA, a separate DMA controller handles data transfer directly between memory and the I/O device. The CPU is involved only at the beginning and end of the transfer. Therefore, CPU usage is minimal.
Q: 2 The technique where the controller is given complete access to main memory is ____________.
Cycle Stealing
Memory Stealing
Memory Conditioning
Burst Mode
[ Option D ]
In data transfer techniques like DMA (Direct Memory Access), the controller can transfer data between I/O device and main memory without CPU intervention.
In Burst Mode, the DMA controller is given complete control of the system bus and memory for a block of data transfer. During this time:
| Mode | Working |
|---|---|
| Cycle Stealing | DMA takes control for one cycle at a time. |
| Burst Mode | DMA takes full control until transfer completes. |
| Memory Stealing | Same as cycle stealing. |
Q: 3 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: 4 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.