I/O Techniques: Polling, Interrupts & DMA — Concept Check
Questions on I/O Techniques: Polling, Interrupts & DMA. Three I/O techniques — polling (CPU busy-waits), interrupt-driven (CPU is notified when device is ready), and DMA (device transfers data directly to memory) — trade CPU utilisation against I/O throughput.
Questions in this quiz
8 questions on I/O Techniques: Polling, Interrupts & DMA — Concept Check. Work through them here, then start the quiz to answer them and see your score.
1.A server application uses Java NIO's Selector for handling multiple client connections. What advantage does this provide over traditional blocking I/O?
- AIt increases CPU utilization by polling.
- BIt eliminates the need for hardware interrupts.
- CIt allows handling multiple connections with fewer threads.
- DIt guarantees faster data transfer rates.
2.During a disk read operation, the CPU is free to perform other tasks until the data transfer is complete. Which I/O technique is being used?
- AInterrupt-driven I/O
- BPolling
- CDMA
- DSynchronous I/O
3.A developer notices high CPU usage while waiting for a device to become ready. Which I/O technique is likely being used?
- APolling
- BInterrupt-driven I/O
- CDMA
- DAsynchronous I/O
4.In a system using interrupt-driven I/O, what happens when a device is ready for data transfer?
- AThe device raises an interrupt to notify the CPU.
- BThe CPU continuously checks the device status.
- CThe DMA controller automatically transfers the data.
- DThe system enters a busy-wait loop.
5.A network application slows down, and analysis shows frequent context switching. Which I/O technique could reduce this overhead?
- ADMA
- BInterrupt-driven I/O
- CPolling
- DSynchronous I/O
6.Which I/O technique is most efficient for transferring large blocks of data, such as disk reads?
- ADMA
- BPolling
- CNon-blocking I/O
- DInterrupt-driven I/O
7.A developer claims that using DMA increases CPU utilization due to frequent interrupts. What is the flaw in this reasoning?
- ADMA only interrupts the CPU once per transfer.
- BDMA is not suitable for bulk transfers.
- CDMA minimizes CPU involvement, reducing utilization.
- DDMA requires constant CPU polling.
8.Which Java class provides a DMA-like asynchronous I/O model at the application level?
- ABufferedReader
- BAsynchronousFileChannel
- CSelector
- DFileInputStream