Successfully reported this slideshow.
Chapter 8: Virtual Memory
Background
Virtual memory – separation of user logical memory from
physical memory.
Only part of the program needs to be i...
Virtual Memory That is Larger Than Physical
M emory

⇒

Operating System Concepts

9.3

Silberschatz, Galvin and Gagne
Virtual-address Space

Operating System Concepts

9.4

Silberschatz, Galvin and Gagne
Shared Library Using Virtual Memory

Operating System Concepts

9.5

Silberschatz, Galvin and Gagne
Demand Paging
Bring a page into memory only when it is needed
Less I/O needed
Less memory needed
Faster response
More user...
Process Creation
Virtual memory allows other benefits during process creation:
- Copy-on-Write
- Memory-Mapped Files (late...
Copy-on-Write
Copy-on-Write (COW) allows both parent and child processes to
initially share the same pages in memory
If ei...
Page Replacement
Prevent over-allocation of memory by modifying page-fault service
routine to include page replacement
Use...
Page Replacement
Prevent over-allocation of memory by modifying page-fault service
routine to include page replacement
Use...
Upcoming SlideShare
Loading in …5
×

Ch08

210 views

Published on

Operating System Concepts Chapter 8

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

Ch08

  1. 1. Chapter 8: Virtual Memory
  2. 2. Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical address space can therefore be much larger than physical address space. Allows address spaces to be shared by several processes. Allows for more efficient process creation. Virtual memory can be implemented via: Demand paging Demand segmentation Operating System Concepts 9.2 Silberschatz, Galvin and Gagne
  3. 3. Virtual Memory That is Larger Than Physical M emory ⇒ Operating System Concepts 9.3 Silberschatz, Galvin and Gagne
  4. 4. Virtual-address Space Operating System Concepts 9.4 Silberschatz, Galvin and Gagne
  5. 5. Shared Library Using Virtual Memory Operating System Concepts 9.5 Silberschatz, Galvin and Gagne
  6. 6. Demand Paging Bring a page into memory only when it is needed Less I/O needed Less memory needed Faster response More users Page is needed ⇒ reference to it invalid reference ⇒ abort not-in-memory ⇒ bring to memory Operating System Concepts 9.6 Silberschatz, Galvin and Gagne
  7. 7. Process Creation Virtual memory allows other benefits during process creation: - Copy-on-Write - Memory-Mapped Files (later) Operating System Concepts 9.7 Silberschatz, Galvin and Gagne
  8. 8. Copy-on-Write Copy-on-Write (COW) allows both parent and child processes to initially share the same pages in memory If either process modifies a shared page, only then is the page copied COW allows more efficient process creation as only modified pages are copied Free pages are allocated from a pool of zeroed-out pages Operating System Concepts 9.8 Silberschatz, Galvin and Gagne
  9. 9. Page Replacement Prevent over-allocation of memory by modifying page-fault service routine to include page replacement Use modify (dirty) bit to reduce overhead of page transfers – only modified pages are written to disk Page replacement completes separation between logical memory and physical memory – large virtual memory can be provided on a smaller physical memory Operating System Concepts 9.9 Silberschatz, Galvin and Gagne
  10. 10. Page Replacement Prevent over-allocation of memory by modifying page-fault service routine to include page replacement Use modify (dirty) bit to reduce overhead of page transfers – only modified pages are written to disk Page replacement completes separation between logical memory and physical memory – large virtual memory can be provided on a smaller physical memory Operating System Concepts 9.9 Silberschatz, Galvin and Gagne

×