Memory Management GATE CS PYQ Quiz

Last Updated :
Discuss
Comments

Question 1

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 main memory size of 3 pages frames which are initially empty. Let LRU, FIFO and OPTIMAL denote the number of page faults under the corresponding page replacements policy. Then

  • OPTIMAL < LRU < FIFO

  • OPTIMAL < FIFO < LRU

  • OPTIMAL = LRU

  • OPTIMAL = FIFO

Question 2

In which one of the following page replacement policies, Belady’s anomaly may occur?

  • FIFO

  • Optimal

  • LRU

  • MRU

Question 3

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 experimental 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?

  • (D - M) / (X - M)

  • (X - M) / (D - M)

  • (D - X) / (D - M)

  • (X - M) / (D - X)

Question 4

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 ?

  • The hole created by first fit is always larger than the hole created by next fit.

  • The hole created by worst fit is always larger than the hole created by first fit.

  • The hole created by best fit is never larger than the hole created by first fit.

  • The hole created by next fit is never larger than the hole created by best fit.

Question 5

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 ___________ .


Note - This question was Numerical Type.

  • 154.5

  • 155

  • 755

  • 725

Question 6

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?

  • 196

  • 192

  • 197

  • 195

Question 7

In the context of operating systems, which of the following statements is/are correct with respect to paging?

  • Paging helps solve the issue of external fragmentation

  • Page size has no impact on internal fragmentation

  • Paging incurs memory overheads

  • Multi-level paging is necessary to support pages of different sizes

Question 8

The essential content(s) in each entry of a page table is / are

  • Virtual page number

  • Page frame number

  • Both virtual page number and page frame number

  • Access right information

Question 9

A multilevel page table is preferred in comparison to a single level page table for translating virtual address to physical address because

  • It reduces the memory access time to read or write a memory location.

  • It helps to reduce the size of page table needed to implement the virtual address space of a process.

  • It is required by the translation lookaside buffer.

  • It helps to reduce the number of page faults in page replacement algorithms.

Question 10

A virtual memory system uses First In First Out (FIFO) page replacement policy and allocates a fixed number of frames to a process. Consider the following statements: 

P: Increasing the number of page frames allocated to a 
process sometimes increases the page fault rate.
Q: Some programs do not exhibit locality of reference.



Which one of the following is TRUE?
 

  • P is false, but Q is true
     

  • Both P and Q are true, but Q is not the reason for P.
     

  • Both P and Q are true, and Q is the reason for P
     

  • Both P and Q are false
     

There are 44 questions to complete.

Take a part in the ongoing discussion