• Like
Ch08
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

Ch08

  • 108 views
Published

Operating System Concepts Chapter 8

Operating System Concepts Chapter 8

Published in Education , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
108
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
9
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Chapter 8: Virtual Memory
  • 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. Virtual Memory That is Larger Than Physical M emory ⇒ Operating System Concepts 9.3 Silberschatz, Galvin and Gagne
  • 4. Virtual-address Space Operating System Concepts 9.4 Silberschatz, Galvin and Gagne
  • 5. Shared Library Using Virtual Memory Operating System Concepts 9.5 Silberschatz, Galvin and Gagne
  • 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. 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. 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. 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. 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