170 likes | 494 Vues
Chapter 7 VIRTUAL MEMORY. Virtual memory. Objective To know function of Virtual Memory Comparison Paging between Segmentation. System optimization to make sure OS uses it resources efficiently.
E N D
Virtual memory • Objective • To know function of Virtual Memory • Comparison Paging between Segmentation
System optimization to make sure OS uses it resources efficiently. • Virtual memory use in imaginary storage area (virtual space) in conjunction existing hardware. allow program to use virtual address space large than physical memory. Allows address spaces to be shared by several processes. Allows for more efficient process creation.
Advantages • To execute a process that is not complete in memory. • Increased multiprogramming feasibility.
VIRTUAL MEMORY • Memory managementoptimizes the use of RAM • Virtual memory is a technique that allows the execution of processes that may not be completely in memory • Virtual memoryis a portion of a storage medium functioning as additional RAM. • Virtual memory slower than RAM • Virtual Memory separates by logical memory and physical memory.
VIRTUAL MEMORY • The operating system uses an area of the hard disk for virtual memory , in which it swaps data, information, and instruction between memory and storage. • The technique of swapping items between memory(RAM) and storage(Hard disk) is called paging
VIRTUAL MEMORY Page 406 Figure 8-8 Discovering Computers 2011: Living in a Digital World Chapter 8
Diagram memory management using virtual memory technique Hard disk
Some page not in main memory Hard disk
Difference between paging and segmentation • 2 approaches to establishing the virtual physical mapping are: Paging & Segmentation (Nov2009)(Nov2010) Nov2011) • Paging – Computer memory is divided into small partitions that are all the same size and referred to as, page frames. Then when a process is loaded it gets divided into pages which are the same size as those previous frames. The process pages are then loaded into the frames.Segmentation – Computer memory is allocated in various sizes (segments) depending on the need for address space by the process. These segments may be individually protected or shared between processes.
Hardware support demand paging system: • Page table: to mark entry invalid through a valid –invalid bit or special value of protection bits. • Secondary memory: The memory that holds page not in main memory
Tutorial • 1. In your opinion, why virtual memory is important in order to achieve high CPU performance?(1m)Nov2009 • 2. Describe TWO (2) hardware that uses to support demand paging system in order to implement virtual memory.(4m) Nov2009 • 3. Draw a figure that shows the memory management using virtual memory technique (5m) Nov2011