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 16–20 of 67
Consider a three-level page table to translate a 39-bit virtual address to a physical address as shown below:
The page size is 4 KB = (1KB = bytes) and page table entry size at every level is 8 bytes. A process P is currently using 2 GB (1 GB = bytes) virtual memory which is mapped to 2 GB of physical memory. The minimum amount of memory required for the page table of P across all levels is _________ KB
The page size is 4 KB = (1KB = bytes) and page table entry size at every level is 8 bytes. A process P is currently using 2 GB (1 GB = bytes) virtual memory which is mapped to 2 GB of physical memory. The minimum amount of memory required for the page table of P across all levels is _________ KB
Answer: 4108
Number of pages = 2 GB / 4 KB = pages. One page-table page holds 4096 / 8 = 512 = entries.
To get the minimum, take the pages as contiguous:
- Level 3: pages
- Level 2: 1024 entries 2 pages
- Level 1: 1 page
Total = 1027 pages 4 KB = 4108 KB
Answer: 4108
To get the minimum, take the pages as contiguous:
- Level 3: pages
- Level 2: 1024 entries 2 pages
- Level 1: 1 page
Total = 1027 pages 4 KB = 4108 KB
Answer: 4108
Consider allocation of memory to a new process. Assume that none of the existing holes in the memory will exactly fit the process's memory requirement. Hence, a new hole of smaller size will be created if allocation is made in any of the existing holes. Which one of the following statement is TRUE?
Answer: (C)
Best fit picks the smallest hole that can hold the process. So the hole it leaves is the smallest leftover possible. First fit picks some hole that fits, so the hole it leaves is never smaller than best fit's. So (C) is true.
The others are not always true:
- (A) If only one hole is big enough, first fit and next fit pick the same hole and leave equal holes, so first fit's is not larger.
- (B) If the largest hole comes first in the list, first fit picks it and worst fit picks it too, so the two holes are equal and worst fit's is not larger.
- (D) Take holes of 10 and 6 units (in this order), a process of 5 units, and a next fit search that starts at the 10 hole. Next fit leaves 5, but best fit uses the 6 hole and leaves 1. So next fit's hole is larger than best fit's.
Answer: (C)
The others are not always true:
- (A) If only one hole is big enough, first fit and next fit pick the same hole and leave equal holes, so first fit's is not larger.
- (B) If the largest hole comes first in the list, first fit picks it and worst fit picks it too, so the two holes are equal and worst fit's is not larger.
- (D) Take holes of 10 and 6 units (in this order), a process of 5 units, and a next fit search that starts at the 10 hole. Next fit leaves 5, but best fit uses the 6 hole and leaves 1. So next fit's hole is larger than best fit's.
Answer: (C)
Consider a paging system that uses 1-level page table residing in main memory and a TLB for address translation. Each main memory access takes 100 ns and TLB lookup takes 20 ns. Each page transfer to/from the disk takes 5000 ns. Assume that the TLB hit ratio is 95%, page fault rate is 10%. Assume that for 20% of the total page faults, a dirty page has to be written back to disk before the required page is read from disk. TLB update time is negligible. The average memory access time in ns (round off to 1 decimal places) is ___________
Answer: 154.5 to 155.5
The TLB lookup of 20 ns is always done.
- TLB hit (0.95): one memory access, 100 ns
- TLB miss (0.05): page table access of 100 ns, then
no fault (0.9): 100 ns
fault (0.1): page read 5000 ns, plus dirty write-back (20%) 0.2 5000, plus access 100 = 6100 ns
ns
Answer: 155
- TLB hit (0.95): one memory access, 100 ns
- TLB miss (0.05): page table access of 100 ns, then
no fault (0.9): 100 ns
fault (0.1): page read 5000 ns, plus dirty write-back (20%) 0.2 5000, plus access 100 = 6100 ns
ns
Answer: 155
Assume that in a certain computer, the virtual addresses are 64 bits long and the physical addresses are 48 bits long. The memory is word addressable. The page size is 8kB and the word size is 4 bytes. The Translation Look-aside Buffer (TLB) in the address translation path has 128 valid entries. At most how many distinct virtual addresses can be translated without any TLB miss?
Answer: (B)
The memory is word addressable and a word is 4 bytes. So a page of 8 KB / 4 B holds words, which is 2048 addresses.
128 TLB entries map 128 pages, giving addresses with no TLB miss.
Answer:
128 TLB entries map 128 pages, giving addresses with no TLB miss.
Answer:
Consider a process executing on an operating system that uses demand paging. The average time for a memory access in the system is M units if the corresponding memory page is available in memory, and D units if the memory access causes a page fault. It has been experimentally measured that the average time taken for a memory access in the process is X units.
Which one of the following is the correct expression for the page fault rate experienced by the process?
Which one of the following is the correct expression for the page fault rate experienced by the process?
Answer: (B)
Let p be the page fault rate. Average access time: .
Page fault rate:
Answer: (X - M) / (D - M)
Page fault rate:
Answer: (X - M) / (D - M)
Keep practising
Topics in Operating System
System CallProcessThreadProcess SynchronizationDeadlockCPU SchedulingDisk Scheduling
Memory ManagementYou are here
File Systems