CS FundamentalsModerateGATE CS (PYQ pattern)
A 100 MB process is swapped out and later swapped back in on a disk that transfers 50 MB/s with an 8 ms latency per transfer. Swap-out writes only the process's dirty pages (40% of its image; the clean ones are discarded and their swap copies are still valid) in one transfer; swap-in reads the whole image in one transfer. What is the total I/O time?
- A. 4.016 s
- B. 2.808 s
- C. 1.616 s
- D. 2.816 s
Correct answer: D. 2.816 s
Swap-out: 40 MB / 50 MB/s + 8 ms = 0.808 s. Swap-in: 100 MB / 50 MB/s + 8 ms = 2.008 s. Total 2.816 s. Writing the full image gives 4.016 s; charging the latency only once gives 2.808 s; reading back only the dirty part gives 1.616 s.
More Operating Systems questions
- Disk requests arrive as a Poisson stream of 100 per second; service times are exponential (M/M/1 per disk). Option X buys one disk twice…
- Round Robin uses a 20 ms quantum and every context switch costs 2 ms; all n processes are CPU-bound and always use the full quantum. From…
- A ticket lock has nextticket = 10 and nowserving = 10 (free). Events in order: T1 acquires, T2 acquires, T3 acquires, T1 releases, T4…
- Which of the following statements about read-copy-update (RCU) are correct? I. Readers traverse the data structure without taking locks…
- Which of the following statements about fork() with copy-on-write are correct? I. Right after fork, parent and child map the same physical…
- Under first-fit, the fifty-percent rule says that with N allocated blocks there are about N/2 holes. In a measured system the average hole…