CS FundamentalsHardGATE CS · Amazon/Microsoft SDE MCQ
TLB lookup 20 ns (done first), memory access 100 ns, single-level page table, TLB hit ratio 80%. In addition, 1 in every 1,000 memory references causes a page fault costing 5 ms. Treating the fault cost as simply added (EAT = translation-based time + p × fault time), what is the effective access time?
- A. 140 ns
- B. 5,000 ns
- C. 5,240 ns
- D. 5,140 ns
Correct answer: D. 5,140 ns
Without faults: 0.8 × 120 + 0.2 × 220 = 140 ns. The faults add 0.001 × 5,000,000 ns = 5,000 ns, giving 5,140 ns. Even a 0.1% fault rate makes memory about 37 times slower.
More Operating Systems questions
- A bounded buffer uses semaphores empty = N, full = 0 and mutex = 1. The producer is changed to do wait(mutex) BEFORE wait(empty); the…
- Jobs A (6), B (2), C (8) and D (3) all arrive at time 0 in that order. What are the average waiting time under non-preemptive SJF and the…
- Under Linux CFS, two CPU-bound tasks share one CPU: one at nice 0 (weight 1024) and one at nice 5 (weight 335). About what share of CPU…
- A system's average process size is s = 1 MB and each page-table entry takes e = 8 bytes. Balancing page-table overhead (s·e / p) against…
- What does this program print? (Assume fork() succeeds and the exec of echo succeeds.) c int main() { fork(); execlp("echo", "echo", "hi"…
- In a traditional Unix file system (such as ext2/ext4 without very large directories), directory /d contains 3 subdirectories and 5 regular…