CS FundamentalsHardGATE CS (PYQ pattern)
A 32-bit machine uses two-level paging with 10 + 10 + 12 address bits. For the running process, root-table entries 3 and 0x2FF are valid and point to second-level tables in frames 0x0A0 and 0x0B1 (all other root entries are invalid). Table 0x0A0 has valid entries 2 -> frame 0x1F7 and 0x3FF -> frame 0x1F7; table 0x0B1 has valid entries 0 -> frame 0x1F7 and 5 -> frame 0x1F8. How many virtual addresses translate to physical address 0x1F7A5C, and what is the largest?
- A. 3; 0x2FF00A5C
- B. 2; 0x00FFFA5C
- C. 3; 0xBFF00A5C
- D. 3; 0xBFC00A5C
Correct answer: D. 3; 0xBFC00A5C
Physical 0x1F7A5C is frame 0x1F7, offset 0xA5C. Three mappings reach frame 0x1F7: (3, 2) -> 0x00C02A5C, (3, 0x3FF) -> 0x00FFFA5C and (0x2FF, 0) -> 0x2FF << 22 = 0xBFC00000, giving 0xBFC00A5C. Writing the root index as the top hex digits (0x2FF00A5C) ignores that it occupies 10 bits, not 12.
More Operating Systems questions
- Assume every fork() succeeds and output is not lost or duplicated. int x = 1; int main(void) { int p = &x; if (fork() == 0) { p += 2; if…
- Three periodic tasks (execution time, period = relative deadline), all released at t = 0: T1 (2, 6), T2 (3, 8), T3 (3, 12). They are…
- Which of the following statements about system calls and interrupts are correct? I. A system call enters the kernel through a trap…
- Which of the following statements about disk scheduling are correct? I. SSTF can starve requests far from the head. II. SCAN bounds the…
- A process maps a region starting at virtual address 0x40000000 whose size is 4 GB + 5 MB + 12 KB. The OS uses 1 GB, 2 MB and 4 KB pages…
- A 32-bit machine has 512 MB of RAM, of which the resident kernel permanently uses 128 MB, and a 1 GB swap partition. The top 1 GB of every…