VIRTUAL MEMORY.

Slides:



Advertisements
Similar presentations
1 Memory hierarchy and paging Electronic Computers M.
Advertisements

Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 36 Virtual Memory Read.
CS 153 Design of Operating Systems Spring 2015
Chapter 101 Virtual Memory Chapter 10 Sections and plus (Skip:10.3.2, 10.7, rest of 10.8)
03/26/2010CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying an earlier.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management -3 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
Computer Organization and Architecture
VIRTUAL MEMORY. Virtual memory technique is used to extents the size of physical memory When a program does not completely fit into the main memory, it.
Virtual Memory By: Dinouje Fahih. Definition of Virtual Memory Virtual memory is a concept that, allows a computer and its operating system, to use a.
Memory Management CSE451 Andrew Whitaker. Big Picture Up till now, we’ve focused on how multiple programs share the CPU Now: how do multiple programs.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Chapter 6: Memory Memory is organized into a hierarchy
Topics covered: Memory subsystem CSE243: Introduction to Computer Architecture and Hardware/Software Interface.
Computer Architecture Lecture 28 Fasih ur Rehman.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally VIRTUALMEMORY.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Silberschatz, Galvin and Gagne  Operating System Concepts Virtual Memory Virtual memory – separation of user logical memory from physical memory.
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
Logical & Physical Address Nihal Güngör. Logical Address In simplest terms, an address generated by the CPU is known as a logical address. Logical addresses.
Virtual Memory Pranav Shah CS147 - Sin Min Lee. Concept of Virtual Memory Purpose of Virtual Memory - to use hard disk as an extension of RAM. Personal.
The Memory Hierarchy Lecture 31 20/07/2009Lecture 31_CA&O_Engr. Umbreen Sabir.
Translation Lookaside Buffer
Computer Organization
Memory Management.
ITEC 202 Operating Systems
Chapter 2 Memory and process management
Memory COMPUTER ARCHITECTURE
CSE 120 Principles of Operating
CS703 - Advanced Operating Systems
Paging COMP 755.
Virtual Memory Chapter 8.
Module 9: Virtual Memory
Lecture 28: Virtual Memory-Address Translation
O.S Lecture 13 Virtual Memory.
Memory Management 11/17/2018 A. Berrached:CS4315:UHD.
Lecture 27: Virtual Memory
ECE 445 – Computer Organization
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
Computer Architecture
Module IV Memory Organization.
5: Virtual Memory Background Demand Paging
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 29: Virtual Memory-Address Translation
Virtual Memory Hardware
Translation Lookaside Buffer
Chapter 9: Virtual Memory
CSE 451: Operating Systems Autumn 2005 Memory Management
Translation Buffers (TLB’s)
Virtual Memory Virtual memory is a technique which gives an application program the impression that it has contiguous working memory, while in fact it.
Contents Memory types & memory hierarchy Virtual memory (VM)
CSE451 Virtual Memory Paging Autumn 2002
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
Translation Buffers (TLB’s)
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Memory Management CSE451 Andrew Whitaker.
Evolution in memory management techniques
Evolution in memory management techniques
Evolution in memory management techniques
Translation Buffers (TLBs)
Module 9: Virtual Memory
Review What are the advantages/disadvantages of pages versus segments?
Memory Management & Virtual Memory
Virtual Memory 1 1.
Page Main Memory.
Presentation transcript:

VIRTUAL MEMORY

Virtual Memory It is a computer system technique which gives an application program the impression that it has contiguous working memory (an address space), while in fact it may be physically fragmented and may even overflow on to disk storage. computer operating systems generally use virtual memory techniques for ordinary applications, such as word processors, spreadsheets,multimedia,players accounting, etc., except where the required hardware support (memory management unit) is unavailable or insufficient.

Memory is used in Computer Mobile Printer Digital Camera CD/DVD Player Many other appliances like TV, Washing Machine, Oven, Digital Diaries etc.

The Paging Process When the CPU generates a memory address, it is a logical (or virtual) address The first address of a program is 0, so the logical address is merely an offset into the program or into the data segment For instance, address 25 is located 25 from the beginning of the program But 25 is not the physical address in memory, so the logical address must be translated (or mapped) into a physical address

Assume memory is broken into fixed size units known as frames (1 page fits into 1 frame) We know the logical address as its page # and the offset into the page We have to translate the page # into the frame # (that is, where is that particular page currently be stored in memory – or is it even in memory?) Thus, the mapping process for paging means finding the frame # and replacing the page # with it

Here, we have a process of 8 pages but only 4 physical frames in memory – therefore we must place a page into one of the available frames in memory whenever a page is needed At this point in time, pages 0, 3, 4 and 7 have been moved into memory at frames 2, 0, 1 and 3 respectively This information (of which page is stored in which frame) is stored in memory in a location known as the Page Table. The page table also stores whether the given page has been modified (the valid bit – much like our cache)

Page Faults Just as cache is limited in size, so is main memory – a process is usually given a limited number of frames What if a referenced page is not currently in memory? The memory reference causes a page fault The page fault requires that the OS handle the problem The process’ status is saved and the CPU switches to the OS The OS determines if there is an empty frame for the referenced page, if not, then the OS uses a replacement strategy to select a page to discard

if that page is dirty, then the page must be written to disk instead of discarded The OS locates the requested page on disk and loads it into the appropriate frame in memory The page table is modified to reflect the changePage faults are time consuming because of the disk access – this causes our effective memory access time to deteriorate badly!