CS FundamentalsVery hardGATE CS
A device transfers data at 2 MB/s using programmed I/O with an interrupt per byte; handling each interrupt takes 2 µs of CPU time. What fraction of CPU time is consumed by the transfer? And if DMA is used with one interrupt per 4 KB block (same 2 µs handler)?
- A. Over 100% (the CPU cannot keep up) vs about 0.1%
- B. 50% vs 1%
- C. 4% vs 0.001%
- D. 100% vs 0%
Correct answer: A. Over 100% (the CPU cannot keep up) vs about 0.1%
2 MB/s with an interrupt per byte means 2×10⁶ (≈2²¹) interrupts/s × 2 µs ≈ 4.2 s of CPU per second: impossible. With DMA there are 2 MB/4 KB = 512 interrupts/s × 2 µs ≈ 1 ms per second ≈ 0.1%.
More Operating Systems questions
- A disk has average seek 8 ms, average rotational latency 4 ms and a sustained transfer rate of 100 MB/s. What is the effective bandwidth…
- A journaling file system in ORDERED mode (like ext4's default) is used. Which statement about a crash is correct?
- A hard link and a symbolic (soft) link both point to file F. F is then deleted with rm F. What happens?
- Why can a hard link not normally point to a directory or to a file on a different file system?
- Path /usr/local/bin/tool is opened on a Unix file system where every directory fits in one block, no inode or block is cached except the…
- A disk has 16 surfaces, 512 cylinders and 64 sectors per track. Sectors are numbered starting at 0, fastest over sectors, then surfaces…