CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ
A process's page table has valid entries for pages 0-5 only. With 1 KB pages, which logical address causes a trap instead of a translation?
- A. 6143
- B. 5120
- C. 6144
- D. 0
Correct answer: C. 6144
Pages 0-5 cover addresses 0 to 6 × 1024 − 1 = 6143. Address 6144 is the first byte of page 6, whose entry is invalid, so it traps. 5120 is the start of page 5, still valid.
More Operating Systems questions
- A machine has 46-bit virtual addresses, 16 KB pages and 4-byte page-table entries. Lower page-table levels are full 16 KB pages; the top…
- 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…
- 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)…