CS FundamentalsHardGATE CS
Memory access takes 100 ns. A page fault occurs once per million accesses; servicing it takes 8 ms if the victim page is clean and 20 ms if dirty, and 70% of victims are dirty. What is the effective access time?
- A. 108 ns
- B. 116.4 ns
- C. 120.0 ns
- D. 114.4 ns
Correct answer: B. 116.4 ns
The average fault time is 0.3 × 8 + 0.7 × 20 = 16.4 ms. EAT ≈ 100 ns + 10⁻⁶ × 16.4 × 10⁶ ns = 116.4 ns. Using only the clean cost gives 108 ns.
More Operating Systems questions
- An inode has 12 direct pointers, one single-indirect and one double-indirect pointer; blocks are 4 KB and pointers 8 bytes. What is the…
- A parent forks 3 children that each call exit(0) immediately; the parent then sleeps for a minute without calling wait() and without…
- Why is a test-and-test-and-set spinlock (spin on a plain read, and only try the atomic exchange when the lock looks free) usually faster…
- A lock-free stack pops with CAS(&top, old, old->next). Thread 1 reads top = A (A->next = B) and is delayed; thread 2 pops A, pops B, then…
- A low-priority task L holds a mutex. High-priority H blocks on it, and medium-priority M (which does not need the mutex) becomes ready…
- A semaphore S starts at 7. Over time 20 wait() and 15 signal() operations complete on it, in some order, with no process left blocked at…