SGG 9 (02)

9.1 Background

  • What is the basic concept of virtual memory?
  • Explain the relation between virtual memory and the concepts of logical address as well as physical address which we discussed in Chapter 8.
  • Why is virtual address useful? When is it useful?
  • The textbook shows how we may use virtual memory to share common libraries. Can we share library (or any other common code) without virtual memory? If so, can you propose a mechanism of doing so? If not, why?

9.2 Demand Paging

  • What is the basic concept of demand paging? What does pure demand paging mean?
  • Compare the pros and cons of bring either large number of frames or a small (maybe zero) frames into memory when a process starts execution on CPU.
  • What is a page fault?
  • Explain the steps needed to handle page faults. (Textbook pages 403 and 405.)
  • Explain the issues of restarting an instruction after page fault.
  • In a virtual memory system, what is the effective access time? How is it computed? What are the differences and similarities, if any, between EAT in a virtual memory system and that in a paging system with TLB? Explain the relation between the two (EAT in virtual memory and in paging system discussed in Chapter 8.)

9.3 Copy-on-Write

  • What is the concept of copy-on-write? Why would it be useful?
  • Explain how vfork() works (read its man page.)

9.4 Page Replacement

  • What is the concept of page replacement? Why and when do we need it?
  • What is a victim frame? How is a victim frame selected?
  • What is a modify bit (a.k.a. dirty bit)? How do we use the modify bit?
  • What is a reference string and how might it be used?
  • Page replacement algorithms.
    • FIFO (first-in-first-out)
    • Optimal Page Replacement
    • LRU (Least recently used). Why is LRU an approximation to the optimal algorithm? Various implementations of LRU.
    • Approximation to LRU (yes, approximation to an approximation.) Why do we need this level of approximation? What are the various implementations of approximation to LRU?
    • Counter-based Page Replacement

9.5 Frame Allocation Algorithms

  • What is the basic concept of frame allocation?
  • Frame allocation algorithms.
    • Equal allocation
    • Proportional allocation
  • Global frame allocation vs. local frame allocation. What are the basic concepts? When we say global and local here, what is the context? What do we mean by global and local?

9.6 Thrashing

  • What is thrashing in the context of virtual memory? What is the key cause of thrashing?
  • How might an OS mitigate virtual memory thrashing?
  • What is the working-set model?
  • How do we define the working-set winder and working set for a process?
  • How do we use working set to reduce thrashing?
  • Why would the working-set model help reducing thrashing?

9.9 Other Considerations

  • What is prepaging? Why would prepaging help the performance of a virtual memory system?
  • How does the size of pages in virtual memory affect the performance?
  • How would TLB affect the performance of virtual memory?
  • How would inverted page tables affect the performance of virtual memory?
  • How would the structure of a program affect the performance of virtual memory?
  • How would the I/O requests of a process affect the performance of virtual memory?
Print Friendly