Questions: I/O Management and Device Drivers

5 questions to test your understanding

Score: 0 / 5
Question 1 Multiple Choice

A process calls write() to save a file. The call returns successfully. The system then loses power before fsync() is called. What happens to the written data?

AThe data is safe on disk — write() only returns after the I/O operation fully completes to storage
BThe data may be lost — write() returns when data enters the kernel buffer, not when it reaches the physical disk
CThe data is safe — the kernel always flushes all dirty buffers to disk before returning from write()
DThe data is safe — DMA ensures all memory-to-disk transfers complete synchronously with the write() call
Question 2 Multiple Choice

Why does DMA (Direct Memory Access) dramatically improve I/O performance compared to programmed I/O?

ADMA runs at a higher clock speed than the CPU, so it transfers data faster than the main processor could
BDMA allows data to transfer directly between a device and main memory without CPU involvement, freeing the CPU to execute other work during the transfer
CDMA bypasses the device driver layer, reducing the number of software layers the data must traverse
DDMA caches frequently accessed files in dedicated hardware buffers, eliminating the need to read from disk
Question 3 True / False

A bug in a device driver will crash mainly the specific process that was using the device at the time, since drivers handle device-specific operations in isolated user-space processes.

TTrue
FFalse
Question 4 True / False

The layered I/O architecture means that adding support for a new storage device requires writing only a new device driver, without modifying the file system, kernel buffering logic, or user-space API.

TTrue
FFalse
Question 5 Short Answer

Explain why DMA is essential for modern I/O performance, and describe what the CPU does while a DMA transfer is in progress.

Think about your answer, then reveal below.