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 A CPU generally handles an interrupt by branching to the Interrupt Service Routine (ISR) pointed by interrupt table
As soon as interrupt is raised by a peripheral.
By checking the interrupt register at regular intervals of time
By checking the interrupt register at the end of the current fetch cycle
By checking the interrupt register after completing the current instruction execution
[ Option D ]
An interrupt is a signal that requests the CPU to stop its current work and execute a special routine called the Interrupt Service Routine (ISR).
However, the CPU does not stop immediately in the middle of an instruction. It follows a proper sequence to maintain correctness.
Q: 4 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: 5 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.
Q: 6 When Bus Grant (BG) = 1 in Direct Memory Access (DMA) transfer, then what function read line and write lines perform?
Read line and write act as input line allowing CPU to communicate with internal DMA register
Read line act as input line and write line act as output line from DMA
Read line act as output line and write line act as input line from DMA controller
Read line and write line act as output line from DMA controller
[ Option D ]
In Direct Memory Access (DMA) transfer, the DMA controller temporarily takes control of the system bus from the CPU to transfer data directly between memory and I/O devices.
When Bus Grant (BG) = 1, it means the CPU has granted control of the bus to the DMA controller. After getting bus control, the DMA controller generates the required control signals itself.
Therefore, the Read Line and Write Line work as output lines from the DMA controller. These signals control memory read and write operations during DMA transfer.
Q: 7 The interrupt servicing mechanism in which the interrupt requesting device identifies itself to the processor is __________.
Polling Mode
Vectored Interrupts
Nested Interrupts
All the above
[ Option B ]
In interrupt handling, different mechanisms are used to identify which device has generated the interrupt.
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.