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 56–60 of 67
Increasing the RAM of a computer typically improves performance because:
Answer: (C)
When a computer has more RAM, it can keep more pages of the running programs in memory. Because of this, fewer page faults occur. A page fault means a slow trip to the disk.
Answer: Fewer page faults occur
Answer: Fewer page faults occur
In a virtual memory system, size of the virtual address is 32-bit, size of the physical address is 30-bit, page size is 4 Kbyte and size of each page table entry is 32-bit. The main memory is byte addressable. Which one of the following is the maximum number of bits that can be used for storing protection and other information in each page table entry?
Answer: (D)
Each page table entry holds a frame number plus extra bits (protection, dirty, reference, valid and so on). The entry is 32 bits, so the extra bits are whatever is left after the frame number.
Number of frames
So the frame number needs 18 bits.
Let x be the number of other bits. Then , so bits.
Answer: (D)
Number of frames
So the frame number needs 18 bits.
Let x be the number of other bits. Then , so bits.
Answer: (D)
Consider a system with a two-level paging scheme in which a regular memory access takes 150 nanoseconds, and servicing a page fault takes 8 milliseconds. An average instruction takes 100 nanoseconds of CPU time, and two memory accesses. The TLB hit ratio is 90%, and the page fault rate is one in every 10,000 instructions. What is the effective average instruction execution time?
Answer: (D)
Average time per instruction = CPU time + memory access time + address translation time + page fault time.
CPU time = 100 ns.
Memory accesses: ns.
Address translation (one translation per instruction, TLB time taken as 0): a TLB hit costs nothing. A miss, 10% of the time, needs 2 page-table accesses in two-level paging: ns.
Page faults: ns.
Total = 100 + 300 + 30 + 800 = 1230 ns. Charging a translation for each of the two memory accesses would give 1260 ns instead, so the one-translation reading is the one that matches 1230 ns.
Answer: (D)
CPU time = 100 ns.
Memory accesses: ns.
Address translation (one translation per instruction, TLB time taken as 0): a TLB hit costs nothing. A miss, 10% of the time, needs 2 page-table accesses in two-level paging: ns.
Page faults: ns.
Total = 100 + 300 + 30 + 800 = 1230 ns. Charging a translation for each of the two memory accesses would give 1260 ns instead, so the one-translation reading is the one that matches 1230 ns.
Answer: (D)
The minimum number of page frames that must be allocated to a running process in a virtual memory environment is determined by
Answer: (A)
The OS must give a process enough frames for one instruction to complete. That number is the most distinct pages a single instruction can touch, and it depends on the instruction set architecture.
No indirect addressing: 1 page for the instruction + 1 for the operand = 2 frames.
One level of indirection: the instruction page, the page holding the address, and the operand page = 3 frames.
Two levels: 4 frames. Three levels: 5 frames.
Page size, physical memory size and the number of processes affect how many frames the OS can give, not how many the process needs at minimum.
Answer: (A)
No indirect addressing: 1 page for the instruction + 1 for the operand = 2 frames.
One level of indirection: the instruction page, the page holding the address, and the operand page = 3 frames.
Two levels: 4 frames. Three levels: 5 frames.
Page size, physical memory size and the number of processes affect how many frames the OS can give, not how many the process needs at minimum.
Answer: (A)
A processor uses 2-level page tables for virtual to physical address translation. Page tables for both levels are stored in the main memory. Virtual and physical addresses are both 32 bits wide. The memory is byte addressable. For virtual to physical address translation, the 10 most significant bits of the virtual address are used as index into the first level page table while the next 10 bits are used as index into the second level page table. The 12 least significant bits of the virtual address are used as offset within the page. Assume that the page table entries in both levels of page tables are 4 bytes wide. Further, the processor has a translation look-aside buffer (TLB), with a hit rate of 96%. The TLB caches recently used virtual page numbers and the corresponding physical page numbers. The processor also has a physically addressed cache with a hit rate of 90%. Main memory access time is 10 ns, cache access time is 1 ns, and TLB access time is also 1 ns.
Suppose a process has only the following pages in its virtual address space: two contiguous code pages starting at virtual address 0x00000000, two contiguous data pages starting at virtual address 0x00400000, and a stack page starting at virtual address 0xFFFFF000. The amount of memory required for storing the page tables of this process is:
Suppose a process has only the following pages in its virtual address space: two contiguous code pages starting at virtual address 0x00000000, two contiguous data pages starting at virtual address 0x00400000, and a stack page starting at virtual address 0xFFFFF000. The amount of memory required for storing the page tables of this process is:
Answer: (C)
Each table has entries of 4 bytes, so each table is 4 KB.
The first-level index is the top 10 bits of the address, the second-level index the next 10 bits.
Code pages at 0x00000000 and 0x00001000: first-level index 0 (second-level indices 0 and 1).
Data pages at 0x00400000 and 0x00401000: , so first-level index 1 (second-level indices 0 and 1).
Stack page at 0xFFFFF000: first-level index 1023 (second-level index 1023).
The three first-level entries 0, 1 and 1023 differ, so 3 second-level tables are needed.
Total = 1 first-level table + 3 second-level tables = KB.
Answer: (C)
The first-level index is the top 10 bits of the address, the second-level index the next 10 bits.
Code pages at 0x00000000 and 0x00001000: first-level index 0 (second-level indices 0 and 1).
Data pages at 0x00400000 and 0x00401000: , so first-level index 1 (second-level indices 0 and 1).
Stack page at 0xFFFFF000: first-level index 1023 (second-level index 1023).
The three first-level entries 0, 1 and 1023 differ, so 3 second-level tables are needed.
Total = 1 first-level table + 3 second-level tables = KB.
Answer: (C)
Keep practising
Topics in Operating System
System CallProcessThreadProcess SynchronizationDeadlockCPU SchedulingDisk Scheduling
Memory ManagementYou are here
File Systems