lecture23-chapter8 - OperatingSystems Lecture23...

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

View Full Document Right Arrow Icon
Operating Systems Lecture 23: Virtual Memory Anda Iamnitchi [email protected] 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
Execution Behavior
Background image of page 2
Principle of Locality Program and data references within a process tend to cluster Only a few pieces of a process will be needed over a short period of time Therefore it is possible to make intelligent guesses about which pieces will be needed in the future This introduces the idea of virtual memory
Background image of page 3

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

View Full DocumentRight Arrow Icon
Breakthrough in Memory Management If: Memory references are logical addresses dynamically translated into physical addresses at run time (processes may be swapped in and out of main memory occupying different regions at different times) A process may be broken up into pieces that do not need to be located contiguously in main memory Then it is not necessary to have all pages of a process in main memory during execution. If the next instruction, and the next data location are in memory, then execution can proceed
Background image of page 4
Chapter 9: Virtual Memory 5
Background image of page 5

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

View Full DocumentRight Arrow Icon
Real and Virtual Memory Real memory Main memory, the actual RAM Virtual memory Memory on disk Allows for effective multiprogramming and relieves the user of tight constraints of main memory
Background image of page 6
Implications of Virtual Memory More processes may be maintained in main memory Only load in some of the pieces of each process With so many processes in main memory, it is very likely a process will be in the Ready state at any particular time A process may be larger than all of main memory
Background image of page 7

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

View Full DocumentRight Arrow Icon
Execution of a Process Operating system brings into main memory a few pieces of the program Resident set: portion of process that is in main memory An interrupt is generated when an address is needed that is not in main memory Operating system places the process in a blocking state
Background image of page 8
Execution of a Process Piece of process that contains the logical address is brought into main memory Operating system issues a disk I/O Read request Another process is dispatched to run while the disk I/O takes place An interrupt is issued when disk I/O complete which causes the operating system to place the affected process in the Ready state
Background image of page 9

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

View Full DocumentRight Arrow Icon
Support Needed for Virtual Memory Hardware must support paging and/or segmentation Operating system must be able to manage the movement of pages and/or segments between secondary memory and main memory What if no room in main memory? Which frame to replace?
Background image of page 10
Page Table Entries Formats
Background image of page 11

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

View Full DocumentRight Arrow Icon
Address Translation
Background image of page 12
When all of the frames in main memory are occupied and it is necessary to bring in a new page, the replacement policy determines which page currently in memory is to be replaced.
Background image of page 13

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

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

Page1 / 52

lecture23-chapter8 - OperatingSystems Lecture23...

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

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