CS FundamentalsVery hardGATE CS (PYQ pattern)
A machine has 48-bit virtual addresses, 4 KB pages and 4 GB of physical memory and uses a hashed inverted page table. Each IPT entry (one per frame) holds the virtual page number, a 16-bit process id, a chain link to the next entry (a frame number) and 4 flag bits, rounded up to whole bytes. A hash anchor table with twice as many slots as frames holds one frame number per slot, also rounded up to whole bytes. What is the total size of both tables?
- A. 16 MB
- B. 10 MB
- C. 14 MB
- D. 12 MB
Correct answer: A. 16 MB
Frames = 2^32 / 2^12 = 2^20, so a frame number needs 20 bits. VPN = 48 - 12 = 36 bits. Entry = 36 + 16 + 20 + 4 = 76 bits -> 10 bytes, IPT = 10 MB. Anchor = 2^21 slots x 3 bytes = 6 MB. Total 16 MB. 10 MB omits the anchor table; 14 MB uses one 4-byte anchor slot per frame (4 MB).
More Operating Systems questions
- A 3-level paging system has TLB lookup 20 ns and memory access 100 ns. On a TLB miss the three page-table levels are read from memory and…
- A system with a single-level page table has a TLB (lookup 10 ns, done before every access, hit ratio 90%) and a 100 ns memory; a TLB miss…
- Shared integer x = 1. Thread T1 executes x = x + 1; x = x + 1; and thread T2 executes x = x 2;. Each statement is compiled to a LOAD into…
- Semaphores a = 1, b = 0, c = 0. Four processes each run once: P1: wait(a); print 1; signal(b); signal(c). P2: wait(b); print 2; signal(a)…
- Round Robin with quantum 4 ms. Processes (arrival, burst) in ms: P1 (0, 7), P2 (1, 4), P3 (2, 9), P4 (3, 5), P5 (16, 3). A process that…
- Periodic tasks (execution time, period = deadline): T1 (2, 5), T2 (4, 7). Which statement is correct?