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 41–45 of 67
The essential content(s) in each entry of a page table is / are
Answer: (B)
In a normal page table, the virtual page number is the index of the entry, so it is not stored in the entry. The entry must hold the page frame number, because that is what the translation returns: the physical address is the frame number joined with the offset.
- (A) and (C) are wrong, because the virtual page number is not stored in the entry.
- (D) Access rights (read, write, execute) and bits such as valid and dirty are normally kept in the entry, but the address translation itself does not need them. So they are not essential.
Answer: (B)
- (A) and (C) are wrong, because the virtual page number is not stored in the entry.
- (D) Access rights (read, write, execute) and bits such as valid and dirty are normally kept in the entry, but the address translation itself does not need them. So they are not essential.
Answer: (B)
In which one of the following page replacement policies, Belady's anomaly may occur?
Answer: (A)
Belady's anomaly means that giving a process more frames can lead to more page faults. It can happen with FIFO. Optimal, LRU and MRU are stack algorithms, so they do not show this anomaly.
Answer: FIFO
Answer: FIFO
Match the following flag bits used in the context of virtual memory management on the left side with the different purposes on the right side of the table below.
Answer: (D)
Dirty: set when the page is written. The OS checks it to know whether the page must be written back to disk before its frame is reused, so it goes with the write-back policy (I-b).
R/W: if set, the page can be read and written; if clear, it is read-only. It guards the page, so it is page protection (II-c).
Reference: set by the hardware each time the page is accessed, and cleared by the OS from time to time. Replacement methods such as second chance use it to avoid evicting pages in use, so it is the page replacement policy (III-d).
Valid: tells whether the page is in memory. If it is not set, the access traps and the OS has to bring the page in and set it up, which is page initialization (IV-a).
Answer: (D)
R/W: if set, the page can be read and written; if clear, it is read-only. It guards the page, so it is page protection (II-c).
Reference: set by the hardware each time the page is accessed, and cleared by the OS from time to time. Replacement methods such as second chance use it to avoid evicting pages in use, so it is the page replacement policy (III-d).
Valid: tells whether the page is in memory. If it is not set, the access traps and the OS has to bring the page in and set it up, which is page initialization (IV-a).
Answer: (D)
Assume that a main memory with only 4 pages, each of 16 bytes, is initially empty. The CPU generates the following sequence of virtual addresses and uses the Least Recently Used (LRU) page replacement policy.
0, 4, 8, 20, 24, 36, 44, 12, 68, 72, 80, 84, 28, 32, 88, 92
How many page faults does this sequence cause? What are the page numbers of the pages present in the main memory at the end of the sequence?
0, 4, 8, 20, 24, 36, 44, 12, 68, 72, 80, 84, 28, 32, 88, 92
How many page faults does this sequence cause? What are the page numbers of the pages present in the main memory at the end of the sequence?
Answer: (B)
First, we change the given virtual addresses (each one points to a byte) into page addresses (these are also virtual, but each one points to a page). To do this, divide the virtual address by the page size and take the floor value. This is the same as dropping the page offset bits. Here the page size is bytes, so we need offset bits. So,
Memory has spaces for pages. A page is replaced only when a different page arrives. Now let us trace the sequence of memory accesses: So, the answer is choice (B).
A paging scheme uses a Translation Look-aside Buffer (TLB). A TLB-access takes 10 ns and the main memory access takes 50 ns. What is the effective access time(in ns) if the TLB hit ratio is 90% and there is no page-fault?
Answer: (C)
Effective access time hit ratio time on a hit miss ratio time on a miss
The TLB is accessed in both cases. The page table is read from memory only when the TLB misses. This is the assumption.
Putting in the values:
Simplifying:
Correct Answer:
The TLB is accessed in both cases. The page table is read from memory only when the TLB misses. This is the assumption.
Putting in the values:
Simplifying:
Correct Answer:
Keep practising
Topics in Operating System
System CallProcessThreadProcess SynchronizationDeadlockCPU SchedulingDisk Scheduling
Memory ManagementYou are here
File Systems