1 / 13

Virtual memory

University of Palestine College of applied engineering & urban planning Software engineering. Working by: Mohammed .Mamdoh Al-Azaiza Dr Supervisor Eng. Mohammed Timraz. Virtual memory. Contents. 1. Virtual memory definition. 2. Main issues in VM design. Some of Algorithm use. 3. 4.

adia
Télécharger la présentation

Virtual memory

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. University of Palestine College of applied engineering & urban planning Software engineering Working by: Mohammed .Mamdoh Al-Azaiza Dr Supervisor Eng. Mohammed Timraz Virtual memory

  2. Contents 1 Virtual memory definition 2 Main issues in VM design Some of Algorithm use 3 4 Why Virtual Memory? Advantages 5 6 Disadvantages Implementation 7

  3. Virtual memory definition • Virtual memory is part of a friendly in most operating systems, but when you run several programs at one time and had little memory and do not have virtual memory will not work these programs and you will get a message asking you to close some applications for the Liberation of memory, with virtual memory computer will search for the parts not used continuously RAM and is copied on the hard drive by use some of algorithm, and this releases a part of the RAM to be used in the operation of add-on applications, this happens automatically. • Use part of H.D logically to make it main memory, in case the main memory is full. • Area on the hard disk which stores the virtual memory called the page file is that the reservation pages of RAM on the hard drive in the Windows system files of this type the parts of the buffer memory is a stretch. SWP

  4. Main issues in VM design • Address mapping • How to translate virtual addresses to physical • Placement • Where to place a portion of VM needed by process • Replacement • Which portion of VM to remove when space is needed • Load control • Determines the number of processes that will be resident in main memory • Sharing • How can processes share portions of their VMs

  5. Some of Algorithm use • Page Replacement Algorithms. • First-In-First-Out (FIFO) Algorithm. • Optimal Algorithm. • Replace page that will not be used for longest period of time. • Least Recently Used (LRU) Algorithm • Clock.

  6. Why Virtual Memory (VM)? • Shortage of memory • Efficient memory management needed • Process may be too big for physical memory • More active processes than physical memory can hold • Requirements of multiprogramming • Efficient protection scheme • Simple way of sharing

  7. VM: Advantages VM supports Swapping Protection Sharing Increased CPU utilization The main memory can execute a process bigger than its own capacity. More processes can be maintained in the main memory

  8. Swapping • Danger: Thrashing: • „Piece“ just swapped out is immediately requested again • The processor spends most of its time swapping pieces rather than executing user instructions,no real work is done • Thus: „piece“for swap out has to be chosen carefully • keep track of „piece“ usage („age of piece“) • Hopefully „piece“ used frequently lately will be used again in near future (principle of locality!)

  9. Protection Each process has its own virtual address space Processes invisible to each other Process cannot access another processes memory „Pieces“ can be protected from being written to or being executed or even being read. System can distinguish different protection levels (user / kernel mode)

  10. Sharing Copy on write: „piece“ may be used by several processes until one writes to it (then that process gets its own copy),but not in one time. Simplifies interprocess-communication (IPC)

  11. VM: Disadvantages Memory requirements (mapping tables) Longer memory access times

  12. VM: Implementation • 1. Paging VM may be implemented using • 3. • Combination of both • 2. • Segmentation

  13. Thank You!

More Related