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 26–30 of 67
Consider a system with byte-addressable memory, 32-bit logical addresses, 4 kilobyte page size and page table entries of 4 bytes each. The size of the page table in the system in megabytes is ________ .
Answer: 4
Find the count of pages first:
The page table size is B, which is 4 MB.
Answer: 4
The page table size is B, which is 4 MB.
Answer: 4
Consider a main memory with five page frames and the following sequence of page references: 3, 8, 2, 3, 9, 1, 6, 3, 8, 9, 3, 6, 2, 1, 3. Which one of the following is true with respect to page replacement policies First In First Out (FIFO) and Least Recently Used (LRU)?
Answer: (A)
FIFO (the oldest loaded page leaves first). Frames are listed oldest first:
3, 8, 2 fault; 3 hit; 9, 1 fault: 3, 8, 2, 9, 1 (5 faults)
6 faults, replaces 3: 8, 2, 9, 1, 6
3 faults, replaces 8: 2, 9, 1, 6, 3
8 faults, replaces 2: 9, 1, 6, 3, 8
9, 3, 6 hit
2 faults, replaces 9: 1, 6, 3, 8, 2
1, 3 hit
Total = 5 + 4 = 9 faults
LRU (the page used longest ago leaves first). Frames are listed least recently used first:
3, 8, 2 fault; 3 hit; 9, 1 fault: 8, 2, 3, 9, 1 (5 faults)
6 faults, replaces 8: 2, 3, 9, 1, 6
3 hit: 2, 9, 1, 6, 3
8 faults, replaces 2: 9, 1, 6, 3, 8
9, 3, 6 hit: 1, 8, 9, 3, 6
2 faults, replaces 1: 8, 9, 3, 6, 2
1 faults, replaces 8: 9, 3, 6, 2, 1
3 hit
Total = 5 + 4 = 9 faults
Both have 9 faults.
Answer: (A)
3, 8, 2 fault; 3 hit; 9, 1 fault: 3, 8, 2, 9, 1 (5 faults)
6 faults, replaces 3: 8, 2, 9, 1, 6
3 faults, replaces 8: 2, 9, 1, 6, 3
8 faults, replaces 2: 9, 1, 6, 3, 8
9, 3, 6 hit
2 faults, replaces 9: 1, 6, 3, 8, 2
1, 3 hit
Total = 5 + 4 = 9 faults
LRU (the page used longest ago leaves first). Frames are listed least recently used first:
3, 8, 2 fault; 3 hit; 9, 1 fault: 8, 2, 3, 9, 1 (5 faults)
6 faults, replaces 8: 2, 3, 9, 1, 6
3 hit: 2, 9, 1, 6, 3
8 faults, replaces 2: 9, 1, 6, 3, 8
9, 3, 6 hit: 1, 8, 9, 3, 6
2 faults, replaces 1: 8, 9, 3, 6, 2
1 faults, replaces 8: 9, 3, 6, 2, 1
3 hit
Total = 5 + 4 = 9 faults
Both have 9 faults.
Answer: (A)
A computer system implements a 40-bit virtual address, page size of 8 kilobytes, and a 128-entry translation look-aside buffer (TLB) organized into 32 sets each having four ways. Assume that the TLB tag does not store any process id. The minimum length of the TLB tag in bits is _________.
Answer: 22
Work through each part:
- Page offset: the page size is 8 KB = 13 bits. So the page number is 40 13 = 27 bits.
- There are 32 sets 5 index bits.
Tag length = 27 5 = 22 bits.
Answer: 22
- Page offset: the page size is 8 KB = 13 bits. So the page number is 40 13 = 27 bits.
- There are 32 sets 5 index bits.
Tag length = 27 5 = 22 bits.
Answer: 22
Consider six memory partitions of sizes 200 KB, 400 KB, 600 KB, 500 KB, 300 KB and 250 KB, where KB refers to kilobyte. These partitions need to be allotted to four processes of sizes 357 KB, 210 KB, 468 KB and 491 KB in that order. If the best fit algorithm is used, which partitions are NOT allotted to any process?
Answer: (A)
Best fit chooses the smallest partition that is big enough for the process:
- Process 357 partition 400
- Process 210 partition 250
- Process 468 partition 500
- Process 491 partition 600
Partitions not used: 200 KB and 300 KB
Answer: 200 KB and 300 KB
- Process 357 partition 400
- Process 210 partition 250
- Process 468 partition 500
- Process 491 partition 600
Partitions not used: 200 KB and 300 KB
Answer: 200 KB and 300 KB
A computer system implements 8 kilobyte pages and a 32-bit physical address space. Each page table entry contains a valid bit, a dirty bit, three permission bits, and the translation. If the maximum size of the page table of a process is 24 megabytes, the length of the virtual address supported by the system is _____ bits.
Answer: 36
Work through the steps:
- Number of frames = so 19 bits are needed for the translation
- Size of one PTE = 19 + 1 + 1 + 3 = 24 bits = 3 bytes
- Number of entries = 24 MB / 3 B = 8M = pages
Virtual address length = 23 + 13 = 36 bits
Answer: 36
- Number of frames = so 19 bits are needed for the translation
- Size of one PTE = 19 + 1 + 1 + 3 = 24 bits = 3 bytes
- Number of entries = 24 MB / 3 B = 8M = pages
Virtual address length = 23 + 13 = 36 bits
Answer: 36
Keep practising
Topics in Operating System
System CallProcessThreadProcess SynchronizationDeadlockCPU SchedulingDisk Scheduling
Memory ManagementYou are here
File Systems