Phase 5
Phase 5 Checkpoint: 15 questions on memory management and virtual memory.
15 questions · 24 marks · 45 minutes. Negative marking on MCQ only: −1/3 mark for a wrong 1-mark MCQ, −2/3 for a wrong 2-mark MCQ. No negative marking for MSQ or NAT; MSQ has no partial credit.
Q1 · NAT · 1 mark(s) — Base/limit
Base 1200, limit 400. Physical address for logical address 399?
Numerical answer: ________
Q2 · MCQ · 1 mark(s) — Best fit
Holes 100, 500, 200, 300, 600 KB. With best fit, where does a 212 KB request go?
- (A) 600 KB hole
- (B) 500 KB hole
- (C) 200 KB hole
- (D) 300 KB hole
Q3 · NAT · 2 mark(s) — First fit
Holes 100, 500, 200, 300, 600 KB; requests 212, 417, 112, 426 KB with first fit. How many requests cannot be placed?
Numerical answer: ________
Q4 · NAT · 1 mark(s) — Address split
A 36-bit logical address with 16 KB pages: number of offset bits?
Numerical answer: ________
Q5 · NAT · 2 mark(s) — Page table
32-bit logical addresses, 1 KB pages, 2-byte entries. Page-table size in MB?
Numerical answer: ________
Q6 · NAT · 2 mark(s) — Translation
Pages are 4 KB. Logical address 20,000 is on page p, and page p is in frame 3. Physical address?
Numerical answer: ________
Q7 · NAT · 2 mark(s) — EAT
Memory 100 ns, TLB 20 ns, hit ratio 0.98 (single level). EAT in ns?
Numerical answer: ________
Q8 · NAT · 2 mark(s) — Levels
46-bit virtual addresses, 8 KB pages, 4-byte entries, each table one page. Levels?
Numerical answer: ________
Q9 · MCQ · 1 mark(s) — Segmentation
Segment 1 has base 5000 and limit 300. Logical address (1, 350):
- (A) trap
- (B) 5050
- (C) 5350
- (D) 350
Q10 · NAT · 2 mark(s) — EAT with faults
ma = 100 ns, s = 10 ms. Largest page-fault rate (in units of 10⁻⁶, 2 decimals) so that EAT ≤ 110 ns?
Numerical answer: ________
Q11 · MCQ · 1 mark(s) — Dirty bit
The dirty bit lets the OS:
- (A) detect illegal addresses
- (B) skip writing a victim page back to disk when it wasn't modified
- (C) find the least recently used page
- (D) share pages after fork()
Q12 · NAT · 2 mark(s) — FIFO
Running string 7 0 1 2 0 3 0 4 2 3 0 3 2, 3 frames, FIFO. Faults?
Numerical answer: ________
Q13 · NAT · 2 mark(s) — OPT
Running string, 4 frames, optimal. Faults?
Numerical answer: ________
Q14 · NAT · 2 mark(s) — Clock
Running string, 3 frames, clock algorithm (bit set on load and on use). Faults?
Numerical answer: ________
Q15 · NAT · 1 mark(s) — Equal allocation
120 frames shared equally among 8 processes: frames each?
Numerical answer: ________
✓Answer Vault
Try the questions first. Open when you are ready to check.
🔐 Open the Answer Vault
Q1 Answer: 1599 · 1 mark(s)
Inside the limit.
Re-read: Lesson 5.1.1 — Addresses and contiguous allocation: fits and fragmentation
Q2 Answer: (D) · 1 mark(s)
Smallest hole that fits.
- (A) is wrong: Largest.
- (B) is wrong: Larger than needed.
- (C) is wrong: Too small.
Re-read: Lesson 5.1.1 — Addresses and contiguous allocation: fits and fragmentation
Q3 Answer: 1 · 2 mark(s)
212 → 500, 417 → 600, 112 → 288, and 426 fails.
Re-read: Lesson 5.1.1 — Addresses and contiguous allocation: fits and fragmentation
Q4 Answer: 14 · 1 mark(s)
2¹⁴ = 16 K.
Re-read: Lesson 5.2.1 — Paging: pages, frames, page tables and the address split
Q5 Answer: 8 · 2 mark(s)
2²² entries × 2 B.
Re-read: Lesson 5.2.1 — Paging: pages, frames, page tables and the address split
Q6 Answer: 15904 · 2 mark(s)
p = 4, offset 20,000 − 16,384 = 3,616; 3 × 4096 + 3,616.
Re-read: Lesson 5.2.1 — Paging: pages, frames, page tables and the address split
Q7 Answer: 122 · 2 mark(s)
0.98 × 120 + 0.02 × 220.
Re-read: Lesson 5.2.2 — TLBs, effective access time and multilevel page tables
Q8 Answer: 3 · 2 mark(s)
33 page bits / 11.
Re-read: Lesson 5.2.2 — TLBs, effective access time and multilevel page tables
Q9 Answer: (A) · 1 mark(s)
350 ≥ 300.
- (B) is wrong: Wrong arithmetic.
- (C) is wrong: Outside the segment.
- (D) is wrong: Base missing.
Re-read: Lesson 5.2.3 — Segmentation, and segmentation with paging
Q10 Answer: 0.99 to 1.01 · 2 mark(s)
p ≤ 10 / 9,999,900.
Re-read: Lesson 5.3.1 — Demand paging, page faults and effective access time
Q11 Answer: (B) · 1 mark(s)
Clean pages are already on disk.
- (A) is wrong: Valid bit / limits.
- (C) is wrong: That needs reference information.
- (D) is wrong: Copy-on-write.
Re-read: Lesson 5.3.1 — Demand paging, page faults and effective access time
Q12 Answer: 10 · 2 mark(s)
See Lesson 5.3.2.
Re-read: Lesson 5.3.2 — Page replacement: FIFO, optimal and LRU; Belady's anomaly
Q13 Answer: 6 · 2 mark(s)
The six first loads only.
Re-read: Lesson 5.3.2 — Page replacement: FIFO, optimal and LRU; Belady's anomaly
Q14 Answer: 9 · 2 mark(s)
See the trace in Lesson 5.3.3.
Re-read: Lesson 5.3.3 — Frame allocation, thrashing, working sets and the clock algorithm
Q15 Answer: 15 · 1 mark(s)
120 / 8.
Re-read: Lesson 5.3.3 — Frame allocation, thrashing, working sets and the clock algorithm