CS FundamentalsModerateGATE CS (PYQ pattern)
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 is only half the size of the average allocated block. What fraction of memory is in holes?
- A. 1/3
- B. 1/4
- C. 1/9
- D. 1/5
Correct answer: D. 1/5
Holes take (N/2)(s/2) = Ns/4 and blocks Ns, so the wasted fraction = (Ns/4) / (Ns + Ns/4) = 1/5. With equal sizes the classic answer is (1/2)/(3/2) = 1/3; 1/4 divides by blocks only instead of by total memory.
More Operating Systems questions
- A machine has 48-bit virtual addresses, 16 KB pages and 8-byte page-table entries. Every page-table node must fit in one page, lower…
- Two processes bounce a 1-byte message through a pair of pipes: 100,000 round trips take 1.2 s, and each round trip contains two context…
- MFU replacement with 3 frames (initially empty): the victim is the resident page with the LARGEST reference count since it was loaded…
- FIFO page replacement is run on the string 6, 1, 7, 2, 7, 2, 1, 5, 1, 1, 7, 5, 3, 1, 1, 7, 4, 5, 3, 4 (memory initially empty) with each…
- The clock algorithm uses 3 frames (initially empty); the reference bit is set when a page is loaded and on every hit. On a fault the hand…
- A counting semaphore S starts at 3 and is implemented so that wait() decrements S and blocks the caller if S becomes negative, while…