Lecture_10_New - Chapter10 VirtualMemory...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 10 Virtual Memory Instructor: M Rehan Rasheed
Background image of page 1

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

View Full DocumentRight Arrow Icon
Instructor: M. Rehan Rasheed Virtual Memory • Background • Demand Paging • Performance of Demand Paging • Page Replacement • Page Replacement Algorithms • Allocation of Frames  • Thrashing
Background image of page 2
Instructor: M. Rehan Rasheed 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
Background image of page 3

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

View Full DocumentRight Arrow Icon
Instructor: M. Rehan Rasheed Virtual Memory That is Larger Than Physical  Memory
Background image of page 4
Instructor: M. Rehan Rasheed Demand Paging Demand paging system is similar to a paging system with  swapping processes reside on secondary memory (Usually a disk). When we want execute a process, we swap it into memory. Rather  than swapping the entire process into memory. lazy swapper  never swaps a page into memory unless that page  will be needed. swapper  manipulates entire processes, whereas a  pager  is  concerned with the individual pages of a process.
Background image of page 5

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

View Full DocumentRight Arrow Icon
Instructor: M. Rehan Rasheed Demand Paging  (Contd…) The term  pager  is use frequently rather than  swapper , in  connection with demand paging. Benefits of Demand Paging; – Less I/O needed – Less memory needed  – Faster response – More users
Background image of page 6
Instructor: M. Rehan Rasheed Transfer of a Paged Memory to Contiguous Disk Space
Background image of page 7

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

View Full DocumentRight Arrow Icon
Instructor: M. Rehan Rasheed Valid-Invalid  Bit With each page table entry a valid–invalid bit is associated ( V  = in-memory,  i  = not-in-memory) Initially valid–invalid bit is set to  i  on all entries. While the process executes and accesses pages that are  memory  resident , execution proceeds normally. During address translation, if valid–invalid bit in page table entry  is  i  = Page fault.
Background image of page 8
Valid-Invalid Bit   Note here that the page table requires a "resident"  bit  showing  that  page is/isn't  in  memory.  (Book  uses "valid"  bit  to  indicate  residency. An  "invalid"  page  is  that  way because  a  legal  page  isn't  resident or because the address is illegal. It  makes  more  sense  to  have  two  bits  - one indicating that the page is legal (valid)  and  a  second  to  show  that the page is in memory. 1
Background image of page 9

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

View Full DocumentRight Arrow Icon
Image of page 10
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/19/2011 for the course CE 301 taught by Professor Misshuma during the Fall '09 term at Sir Syed University of Engineering &Technology.

Page1 / 56

Lecture_10_New - Chapter10 VirtualMemory...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online