CS FundamentalsVery hardProduct company interview · GATE level
Memory access takes 200 ns. A page fault takes 8 ms to service if the replaced page is clean and 20 ms if it is dirty, and 40% of replaced pages are dirty. What is the largest page-fault rate for which the effective access time stays within 10% of the memory access time?
- A. About 1 fault per 640,000 accesses
- B. About 1 fault per 400,000 accesses
- C. About 1 fault per 1,000,000 accesses
- D. About 1 fault per 64,000 accesses
Correct answer: A. About 1 fault per 640,000 accesses
Average service time = 0.6 x 8 + 0.4 x 20 = 12.8 ms = 12,800,000 ns. Require (1 - p) x 200 + p x 12,800,000 ≤ 220, i.e. p x 12,799,800 ≤ 20, so p ≤ 1.5625 x 10^-6, about 1 fault in 640,000 accesses. Using only the 8 ms clean time gives 1 in 400,000, using 20 ms for every fault gives 1 in 1,000,000, and 1 in 64,000 is an order-of-magnitude slip. The tolerance is tiny because a fault is about 64,000 times slower than a memory access.
More Operating Systems questions
- An inode has 10 direct pointers, one single-indirect, one double-indirect and one triple-indirect pointer. Blocks are 2 KB and block…
- A Unix-style inode has 12 direct pointers plus single-, double- and triple-indirect pointers; blocks are 4 KB and pointers 4 bytes. With…
- Each process in a system spends 70% of its time waiting for I/O, independently of the others. Using the model CPU utilisation = 1 - p^n…
- Round Robin is used with a quantum of 4 ms and a context-switch time of 1 ms. There are always 10 CPU-bound processes ready and none does…
- A TLB has 64 entries. With 4 KB pages, what is its reach (the memory it can map without a miss)? If 16 of the entries instead map 2 MB…
- Processes (arrival, burst) in ms: P1 (0, 10), P2 (1, 6), P3 (3, 2), P4 (5, 4), P5 (6, 1). Under preemptive SJF (SRTF), what is the average…