Memory Management · Operating System
67 questions · asked in 27 of 27 years (2000–2026)
MCQ 43 · MSQ 4 · NAT 201-mark 36 · 2-mark 31
2000Questions per year2026
Questions 36–40 of 67
A computer uses 46-bit virtual address, 32-bit physical address, and a three-level paged page table organization. The page table base register stores the base address of the first-level table
(T1) ,which occupies exactly one page. Each entry of T1 stores the base address of a page of the second-level table (T2 ) Each entry of T2 stores the base address of a page of the third-level table (T3 ) Each entry of T3 stores a page table entry (PTE). The PTE is 32 bits in size. The processor used in the computer has a 1 MB 16 way set associative virtually indexed physically tagged cache. The cache block size is 64 bytes.
What is the size of a page in KB in this computer?
What is the size of a page in KB in this computer?
Answer: (C)
Take the page size as bytes. A PTE is 32 bits = 4 bytes, so one page of a table holds entries. T1 occupies exactly one page, so T1 has entries. Every table page has the same number of entries, so each of the three levels is indexed by bits.
The 46-bit virtual address splits into three index fields of bits each and a page offset of bits:
So the page size is B = 8 KB.
Answer: (C)
The 46-bit virtual address splits into three index fields of bits each and a page offset of bits:
So the page size is B = 8 KB.
Answer: (C)
Consider the virtual page reference string
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then
1, 2, 3, 2, 4, 1, 3, 2, 4, 1
on a demand paged virtual memory system running on a computer system that has main memory size of 3 page frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacement policy. Then
Answer: (B)
The reference string is 1, 2, 3, 2, 4, 1, 3, 2, 4, 1 and there are 3 frames.
OPTIMAL (replace the page whose next use is farthest):
1, 2, 3 fault: {1, 2, 3}
2 hit
4 faults. Next uses are 1 (soon), 3 (soon) and 2 (latest), so replace 2: {1, 3, 4}
1, 3 hit
2 faults. 3 is never used again, so replace 3: {1, 4, 2}
4, 1 hit
Faults = 5
FIFO (queue, oldest first):
1, 2, 3 fault: 1, 2, 3
2 hit
4 faults, replaces 1: 2, 3, 4
1 faults, replaces 2: 3, 4, 1
3 hit
2 faults, replaces 3: 4, 1, 2
4, 1 hit
Faults = 6
LRU (least recently used first):
1, 2, 3 fault: 1, 2, 3
2 hit: 1, 3, 2
4 faults, replaces 1: 3, 2, 4
1 faults, replaces 3: 2, 4, 1
3 faults, replaces 2: 4, 1, 3
2 faults, replaces 4: 1, 3, 2
4 faults, replaces 1: 3, 2, 4
1 faults, replaces 3: 2, 4, 1
Faults = 9
So OPTIMAL (5) FIFO (6) LRU (9).
Answer: (B)
OPTIMAL (replace the page whose next use is farthest):
1, 2, 3 fault: {1, 2, 3}
2 hit
4 faults. Next uses are 1 (soon), 3 (soon) and 2 (latest), so replace 2: {1, 3, 4}
1, 3 hit
2 faults. 3 is never used again, so replace 3: {1, 4, 2}
4, 1 hit
Faults = 5
FIFO (queue, oldest first):
1, 2, 3 fault: 1, 2, 3
2 hit
4 faults, replaces 1: 2, 3, 4
1 faults, replaces 2: 3, 4, 1
3 hit
2 faults, replaces 3: 4, 1, 2
4, 1 hit
Faults = 6
LRU (least recently used first):
1, 2, 3 fault: 1, 2, 3
2 hit: 1, 3, 2
4 faults, replaces 1: 3, 2, 4
1 faults, replaces 3: 2, 4, 1
3 faults, replaces 2: 4, 1, 3
2 faults, replaces 4: 1, 3, 2
4 faults, replaces 1: 3, 2, 4
1 faults, replaces 3: 2, 4, 1
Faults = 9
So OPTIMAL (5) FIFO (6) LRU (9).
Answer: (B)
Let the page fault service time be 10ms in a computer with average memory access time being 20ns. If one page fault is generated for every memory accesses, what is the effective access time for the memory?
Answer: (B)
Effective access time:
EAT =
Page fault term: , so EAT 20 + 10 = 30 ns
Answer: 30 ns
EAT =
Page fault term: , so EAT 20 + 10 = 30 ns
Answer: 30 ns
A system uses FIFO policy for page replacement. It has 4 page frames with no pages loaded to begin with. The system first accesses 100 distinct pages in some order and then accesses the same 100 pages but now in the reverse order. How many page faults will occur?
Answer: (A)
In the first pass, all 100 pages fault, so that is 100 faults. The frames then hold pages 97, 98, 99, 100.
In the reverse pass, pages 100, 99, 98, 97 are hits. The other 96 pages all fault.
Total = 100 + 96 = 196
Answer: 196
In the reverse pass, pages 100, 99, 98, 97 are hits. The other 96 pages all fault.
Total = 100 + 96 = 196
Answer: 196
A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because
Answer: (B)
A single-level page table needs one entry for every page of the virtual address space, even for pages the process never uses. In a multilevel page table, only the second-level (and lower) tables for the parts of the address space that are in use need to be allocated. So the page table of a process takes much less memory. This is option (B).
The other options are wrong:
- (A) A multilevel table needs more memory accesses for each translation, so access time does not go down.
- (C) The TLB works with a single-level table as well, so it does not require a multilevel one.
- (D) The number of page faults depends on the replacement policy and the number of frames, not on how the table is organized. A multilevel table can even add faults, because a page of the table itself may not be in memory.
Answer: (B)
The other options are wrong:
- (A) A multilevel table needs more memory accesses for each translation, so access time does not go down.
- (C) The TLB works with a single-level table as well, so it does not require a multilevel one.
- (D) The number of page faults depends on the replacement policy and the number of frames, not on how the table is organized. A multilevel table can even add faults, because a page of the table itself may not be in memory.
Answer: (B)
Keep practising
Topics in Operating System
System CallProcessThreadProcess SynchronizationDeadlockCPU SchedulingDisk Scheduling
Memory ManagementYou are here
File Systems