Lecture-10-nonar - Lecture 10 Virtual Memory...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Lecture 10 Virtual Memory
Image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
9.2 Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Background Code needs to be in memory to execute, but entire program rarely  used Error code, unusual routines, large data structures Entire program code not needed at same time Consider ability to execute partially-loaded program Program no longer constrained by limits of physical memory Each program takes less memory while running -> more  programs run at the same time Increased CPU utilization and throughput with no increase  in response time or turnaround time Less I/O needed to load or swap programs into memory ->  each user program runs faster
Image of page 2
9.3 Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Background (Cont.) 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 More programs running concurrently Less I/O needed to load or swap processes
Image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
9.4 Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Background (Cont.) Virtual address space  – logical view of how process is stored  in memory Usually start at address 0, contiguous addresses until end of  space Meanwhile, physical memory organized in page frames MMU must map logical to physical Virtual memory can be implemented via: Demand paging  Demand segmentation
Image of page 4
9.5 Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Virtual Memory That is Larger Than Physical Memory
Image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
9.6 Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Virtual-address Space Usually design logical address space for  stack to start at Max logical address and  grow “down” while heap grows “up” Maximizes address space use Unused address space between  the two is hole No physical memory needed  until heap or stack grows to a  given new page Enables  sparse  address spaces with  holes left for growth, dynamically linked  libraries, etc System libraries shared via mapping into  virtual address space Shared memory by mapping pages read- write into virtual address space Pages can be shared during  fork() speeding process creation  
Image of page 6
9.7 Silberschatz, Galvin and Gagne  © 2013 Operating System Concepts – 9 th  Edition Shared Library Using Virtual Memory
Image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
9.8
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern