Memory Management · Operating System
67 questions · asked in 27 of 27 years (2000–2026)
MCQ 43 · MSQ 4 · NAT 201-mark 36 · 2-mark 31
Questions 46–50 of 67
Bits 30-31 are used to index into the first level page table
Bits 21-29 are used to index into the second level page table
Bits 12-20 are used to index into the third level page table, and
Bits 0-11 are used as offset within the page
The number of bits required for addressing the next level page table (or page frame) in the page table entry of the first, second and third level page tables are respectively
Answer: (D)
Second and first level (entries point to the next level page table). Page tables are not assumed to be page-aligned, and tables of different levels can have different sizes. We take each table to start at a multiple of its own size, so the entry must name one of (physical memory size) / (size of one table) possible places.
Third level table: bits 12-20 give entries of 4 bytes, so the table is bytes. Possible third level tables . So each second level entry needs 25 bits.
Second level table: bits 21-29 give entries of 4 bytes, so bytes. Possible second level tables . So each first level entry needs 25 bits.
So the entry sizes are 25, 25 and 24 bits. Option (B) would hold only if every table had to start at a 4 KB page boundary, which the question does not say.
Answer: (D)
Answer: (A)
The negative root is dropped because a probability cannot be negative. This matches option (A). The other options are far too large: for example already gives an average time above 10 units.
Answer: (A)
Suppose that the memory can store only one page and if x is the address which causes a page fault then the bytes from addresses x to x + 99 are loaded on to the memory. How many page faults will occur?
Answer: (C)
Address : page fault. Memory now holds addresses up to .
Address : page fault. Memory now holds addresses up to .
Address : page fault. Memory now holds addresses up to .
Address : no page fault.
Address : no page fault.
Address : page fault. Memory now holds addresses up to .
Address : no page fault.
Address : page fault. Memory now holds addresses up to .
Address : page fault. Memory now holds addresses up to .
Address : no page fault.
Address : no page fault.
Address : page fault. Memory now holds addresses up to .
Address : no page fault.
So the number of page faults is , and the answer is (C).
The time at which the request for J7 will be completed will be
Answer: (B)
t = 0: J1 (2k) takes the 2k block, ends at 4. J2 (14k) takes the 20k block, ends at 10. J3 (3k) takes the 4k block, ends at 2. J4 (6k) takes the 8k block, ends at 8.
J5 (6k): no block is free, so it waits. The 4k block frees at t = 2 and the 2k block at t = 4, but neither can hold 6k.
t = 8: J4 leaves. J5 takes the 8k block and ends at 12.
t = 10: J2 leaves. J6 (10k) fits only the 20k block, so it takes it and ends at 11.
t = 11: J6 leaves. For J7 (7k) the free blocks are 4k, 2k and 20k (the 8k block is busy until 12). Only the 20k block fits, so J7 takes it and runs 8 units.
J7 completes at .
Answer: (B)
Least Recently Used (LRU) page replacement policy is a practical approximation to optimal page replacement. For the above reference string, how many more page faults occur with LRU than with the optimal page replacement policy?
Answer: (C)
1 F [1]; 2 F [1,2]; 1 hit; 3 F [1,2,3]; 7 F, evict 2 [1,3,7]; 4 F, evict 1 [3,7,4]; 5 F, evict 3 [7,4,5]; 6 F, evict 7 [4,5,6]; 3 F, evict 4 [5,6,3]; 1 F, evict 5 [6,3,1].
Faults = 9.
Optimal (evict the page used farthest in the future, or never again):
1 F; 2 F; 1 hit; 3 F [1,2,3]; 7 F, evict 2 (never used again) [1,3,7]; 4 F, evict 7 [1,3,4]; 5 F, evict 4 [1,3,5]; 6 F, evict 5 [1,3,6]; 3 hit; 1 hit.
Faults = 7.
LRU has more faults.
Answer: (C)
Keep practising