Virtual Memory and Page Replacement Algorithms, Assignments of Operating Systems

Various concepts related to virtual memory and page replacement algorithms. Topics include prepaging, thrashing, page access sequences, page replacement algorithms (fifo, lru, optimal), belady's anomaly, and thrashing. Students will learn about the concepts behind these algorithms, their differences, and their implications.

Typology: Assignments

Pre 2010

Uploaded on 02/12/2009

koofers-user-8z4
koofers-user-8z4 🇺🇸

10 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1
1.
Explain the concept behind prepaging.
2.
What is the cause of thrashing?
3.
Suppose we have the following page accesses:
1 2 3 4 2 3 4 1 2 1 1. Suppose that there are
also three frames within our system. Using the FIFO replacement algorithm, what will be
the final configuration of the three frames following the execution of the given reference
string?
A)
1, 2, 3
B) 4, 1, 2
C) 3, 1, 2
D)
4, 2, 1
4.
Virtual memory is commonly implemented by demand paging.
A)
True
B) False
5.
Which of the following is not a consideration when determining a system's page size?
A)
Each process must have its own copy of the page table making large page sizes
desirable.
B) Memory utilization is better with smaller page sizes.
C) Fragmentation is more severe with smaller page sizes.
D)
The minimization of I/O results in the desire for larger page sizes.
6.
Explain why the optimal page replacement algorithm is not typically implemented for
real systems. If it cannot be implemented, then of what use is this algorithm?
7.
FIFO page replacement replaces the page that was the most recently swapped in.
A)
True
B) False
8.
How does the second-chance algorithm for page replacement differ from the FIFO page
replacement algorithm?
CS 471 - Assignment 6 - Student name: ___________________________________________
pf3
pf4

Partial preview of the text

Download Virtual Memory and Page Replacement Algorithms and more Assignments Operating Systems in PDF only on Docsity!

  1. Explain the concept behind prepaging.
  2. What is the cause of thrashing?
  3. Suppose we have the following page accesses: 1 2 3 4 2 3 4 1 2 1 1. Suppose that there are also three frames within our system. Using the FIFO replacement algorithm, what will be the final configuration of the three frames following the execution of the given reference string? A) 1, 2, 3 B) 4, 1, 2 C) 3, 1, 2 D) 4, 2, 1
  4. Virtual memory is commonly implemented by demand paging. A) True B) False
  5. Which of the following is not a consideration when determining a system's page size? A) Each process must have its own copy of the page table making large page sizes desirable. B) Memory utilization is better with smaller page sizes. C) Fragmentation is more severe with smaller page sizes. D) The minimization of I/O results in the desire for larger page sizes.
  6. Explain why the optimal page replacement algorithm is not typically implemented for real systems. If it cannot be implemented, then of what use is this algorithm?
  7. FIFO page replacement replaces the page that was the most recently swapped in. A) True B) False
  8. How does the second-chance algorithm for page replacement differ from the FIFO page replacement algorithm?
  1. How is the effective access time computed for a demand-paged memory system?
  2. It is not desirable to execute a process whose logical address space is larger than the available physical address space. A) True B) False
  3. Virtual memory decreases the degree of multiprogramming in a system. A) True B) False
  4. Which of the following is a benefit of allowing a program that is only partially in memory to execute? A) Users could write programs for an extremely large physical address space. B) increases in response time and turnaround time C) More I/O would be needed to load or swap each user program into memory. D) Programs could be written to use more memory than is available in physical memory.
  5. Overlays are typically not used in systems that implement virtual memory. A) True B) False
  6. Given the reference string of page accesses: 1 2 3 4 2 3 4 1 2 1 1 and a system with three page frames, what is the final configuration of the three frames after the true LRU algorithm is applied? A) 2, 1, 3 B) 4, 1, 2 C) 3, 4, 1 D) 1, 2, 3
  1. How is the LRU page replacement algorithm an approximation to the optimal page replacement algorithm?
  2. In systems that support virtual memory, A) virtual memory is separated from logical memory. B) virtual memory is separated from physical memory. C) physical memory is separated from secondary storage. D) physical memory is separated from logical memory.
  3. Briefly explain the FIFO and optimal page replacement algorithms.
  4. Explain the sequence of events that happen when a page-fault trap occurs.
  5. What is the probability of a page fault, using demand paging, if the memory access time is 250 ns, the page fault time is 200 ms, and the effective access time is 10 microseconds? A) 0.0025 % B) 0.0049 % C) 0.5 % D) 1 %