CS FundamentalsHardGATE CS
A 40-bit virtual address space uses 8 KB pages and 8-byte page-table entries, and every page-table node at every level must fit in exactly one page. How many levels are needed, and how many bits index the top level?
- A. 3 levels; the top level uses 10 bits
- B. 2 levels; the top level uses 14 bits
- C. 3 levels; the top level uses 7 bits
- D. 4 levels; the top level uses 3 bits
Correct answer: C. 3 levels; the top level uses 7 bits
The VPN is 40 − 13 = 27 bits. A page holds 8192/8 = 1024 entries, so each level resolves 10 bits: 27 = 7 + 10 + 10, giving 3 levels with only 7 bits (128 entries) at the top. Putting the 10-bit levels at the top would leave an odd level at the bottom.
More Operating Systems questions
- Banker's algorithm, resources (A, B, C). Allocation / Max: P0 (1,0,1) / (4,3,2), P1 (2,1,0) / (3,2,2), P2 (0,1,1) / (2,3,3), P3 (1,1,0) /…
- Deadlock detection, resources (A, B, C), Available = (1, 0, 0). Allocation / Request: P1 (0,1,0) / (1,0,0), P2 (1,0,1) / (0,2,0), P3…
- Four processes need at most 3, 4, 5 and 2 units of one resource type and request them one at a time in any order. What is the smallest…
- Semaphores s = 0 and t = 0. P1: print A; signal(s); wait(t); print B. P2: wait(s); print C; signal(t); wait(s); print D. P3: print E…
- How many processes exist at the end, including the original? (Every fork() succeeds.) c fork() && (fork() || fork()); fork();
- f.txt does not exist at the start. Program X: fd = open("f.txt", OWRONLY|OCREAT, 0644); then fork(); the child writes "cd" and exits; the…