CS FundamentalsVery hardProduct company interview · GATE level
A 32-bit system uses two-level paging with a 10-bit outer index, a 10-bit inner index and a 12-bit offset. The virtual address 0xC0A8F3E7 belongs to a page mapped to frame number 0x2B1C. Which outer index, inner index and physical address does the translation use?
- A. Outer 770, inner 655, physical 0x2B1CF3E7
- B. Outer 192, inner 168, physical 0x2B1C3E7
- C. Outer 770, inner 655, physical 0x2B1C3E7
- D. Outer 770, inner 143, physical 0x2B1C3E7
Correct answer: C. Outer 770, inner 655, physical 0x2B1C3E7
0xC0A8F3E7 in binary is 1100 0000 10 | 10 1000 1111 | 0011 1110 0111. The top 10 bits are 1100000010 = 770; the next 10 are 1010001111 = 655; the last 12 give the offset 0x3E7. The physical address is the frame number followed by the 12-bit offset: 0x2B1C x 0x1000 + 0x3E7 = 0x2B1C3E7. Splitting at byte boundaries (0xC0 = 192, 0xA8 = 168) is the trap, since 10-bit fields do not align with hex digits; 0x2B1CF3E7 keeps 16 offset bits instead of 12; 143 drops the two high bits of the inner index that sit inside the hex digit A.
More Operating Systems questions
- A system with a TLB and a two-level page table has TLB access time 10 ns (searched before memory), memory access time 100 ns and a TLB hit…
- Memory access takes 200 ns. A page fault takes 8 ms to service if the replaced page is clean and 20 ms if it is dirty, and 40% of replaced…
- An inode has 10 direct pointers, one single-indirect, one double-indirect and one triple-indirect pointer. Blocks are 2 KB and block…
- A Unix-style inode has 12 direct pointers plus single-, double- and triple-indirect pointers; blocks are 4 KB and pointers 4 bytes. With…
- Each process in a system spends 70% of its time waiting for I/O, independently of the others. Using the model CPU utilisation = 1 - p^n…
- Round Robin is used with a quantum of 4 ms and a context-switch time of 1 ms. There are always 10 CPU-bound processes ready and none does…