Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Part IV: Memory Management
Chapter 6: Memory Management
Lecture 11: Memory Management
Multiprocessing Memory Management
Understanding Operating Systems1 Operating Systems Virtual Memory Thrashing Single-User Contiguous Scheme Fixed Partitions Dynamic Partitions.
CS 104 Introduction to Computer Science and Graphics Problems
Operating Systems I Memory Management. Overview F Provide Services –processes  –files  F Manage Devices –processor  –memory  –disk 
Memory Management 2010.
Memory Organization.
Chapter 9 Virtual Memory Produced by Lemlem Kebede Monday, July 16, 2001.
Computer Organization Cs 147 Prof. Lee Azita Keshmiri.
Virtual Memory CS 147 October 30, 2007 Chris Stewart.
Virtual Memory BY JEMINI ISLAM. What is Virtual Memory Virtual memory is a memory management system that gives a computer the appearance of having more.
A. Frank - P. Weisberg Operating Systems Simple/Basic Paging.
Main Memory. Background Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only.
03/17/2008CSCI 315 Operating Systems Design1 Virtual Memory Notice: The slides for this lecture have been largely based on those accompanying the textbook.
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.
Chapter 8 Main Memory Bernard Chen Spring Objectives To provide a detailed description of various ways of organizing memory hardware To discuss.
Memory Management ◦ Operating Systems ◦ CS550. Paging and Segmentation  Non-contiguous memory allocation  Fragmentation is a serious problem with contiguous.
Virtual Memory Chantha Thoeun. Overview  Purpose:  Use the hard disk as an extension of RAM.  Increase the available address space of a process. 
Tutorial 6 Memory Management
Chapter 3 Memory Management: Virtual Memory
Lecture 21 Last lecture Today’s lecture Cache Memory Virtual memory
Tutorial 7 Memory Management presented by: Antonio Maiorano Paul Di Marco.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally MEMORYMANAGEMNT.
MEMORY MANAGEMENT Presented By:- Lect. Puneet Gupta G.P.C.G. Patiala.
1. Memory Manager 2 Memory Management In an environment that supports dynamic memory allocation, the memory manager must keep a record of the usage of.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
Page 1 2P13 Week 5. Page 2 Page 3 Page 4 Page 5.
Chapter 8 – Main Memory (Pgs ). Overview  Everything to do with memory is complicated by the fact that more than 1 program can be in memory.
Fall 2000M.B. Ibáñez Lecture 17 Paging Hardware Support.
VIRTUAL MEMORY By Thi Nguyen. Motivation  In early time, the main memory was not large enough to store and execute complex program as higher level languages.
CE Operating Systems Lecture 14 Memory management.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Chapter 4 Memory Management Virtual Memory.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Virtual Memory The memory space of a process is normally divided into blocks that are either pages or segments. Virtual memory management takes.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
Introduction: Memory Management 2 Ideally programmers want memory that is large fast non volatile Memory hierarchy small amount of fast, expensive memory.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
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.
Virtual Memory From course notes University of Waikato. Some material by Tony McGregor Other material from: The Architecture.
COMP091 – Operating Systems 1 Memory Management. Memory Management Terms Physical address –Actual address as seen by memory unit Logical address –Address.
Memory Management Chapter 5 Advanced Operating System.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Virtual Memory (Section 9.3). The Need For Virtual Memory Many computers don’t have enough memory in RAM to accommodate all the programs a user wants.
Lesson Objectives Aims Key Words Paging, Segmentation, Virtual Memory
Virtual memory.
Chapter 2 Memory and process management
Understanding Operating Systems Seventh Edition
Chapter 8: Main Memory.
CSI 400/500 Operating Systems Spring 2009
Main Memory Management
Operating System Concepts
O.S Lecture 13 Virtual Memory.
Computer Architecture
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 32 Syed Mansoor Sarwar
Chapter 8: Memory management
Outline Module 1 and 2 dealt with processes, scheduling and synchronization Next two modules will deal with memory and storage Processes require data to.
So far in memory management…
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)
COMP755 Advanced Operating Systems
Operating Systems: Internals and Design Principles, 6/E
Memory Management (Ch 4: )
Page Main Memory.
Presentation transcript:

Virtual Memory By CS147 Maheshpriya Venkata

Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory Vs Virtual Memory

Review Cache Memory Cache Memory is constructed using static RAM chips. It is used to minimize processor’s memory access time In the memory hierarchy, cache memory is located closet to the microprocessor

Three Types Of Cache Mapping Direct Mapping Associative Mapping Set Associative Mapping

Cache Performance The primary components of cache performance are Cache Hits and Cache Misses. The Hit Ratio is percentage of memory access from the cache. If the greater the hit ratio, the better the system performance.

Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory Vs Virtual Memory

Virtual Memory What is Virtual Memory? –Virtual Memory swaps the data in and out of physical memory. –It uses storage devices such as disk to expand available memory space. –Virtual memory makes CPU appears that there is more physical memory than is actually present.

Virtual Memory Contd –The goal of the virtual memory is to provide efficient use of memory space among users and to achieve high access rate. –Memory Management Unit (MMU) moves data between physical memory and slower storage devices such as disk. –The storage area is called Swap Disk or Swap File.

CPU MMU Physical Memory Swap disk Physical address Logical address MMU Configuration within Memory Hierarchy

Two Methods for Implementing Virtual Memory Paging Segmentation

Paging In paging, the entire range of logical addresses is divided into contiguous blocks called pages. Each pages is the same size and each logical address is resides in exactly one page. Physical memory is divided into non-overlapping frames The size of each frame is the same as the size of one page

Paging Contd Page Fault - If the data is not located in physical memory,it generate a page fault and moves the page from the swap disk to a frame. - removes another page if necessary.

Memory Configuration of simple CPU Frame3 Frame 2 Frame 1 Frame 0 Physical memory Address space.. Page F Page 2 Page 1 Page 0

Segmentation Segmentation is another method of allocating memory A program is divided into several segments, each of which is a self-contained unit, such as a subroutine or data structure. Segments can vary in size. MMU manages segmented memory differently than page memory.

Segmentation Contd Segmentation has advantage and disadvantage. In the paged memory, each page is of size 4k. A program of size 4k + 1 would require the MMU to allocate two pages of memory, even though the second page would use one of its 4K locations.- Internal Fragmentation.

There are three segments resident in memory and 8K of free space. However, the free spaces is partitioned such that no segment greater than 3K can be loaded into memory with out moving or removing one of the currently loaded segments. Unused H a ri h a r a n V e n k a t a : unused segment unused segment 16k-1 13k 13k-1 9k 9k-1 6k 6k-1 5k.... External Fragmentation

Configuration Of Virtual Memory In windows 2000 Go to Start —> Settings—> Control Panel Click on “Systems”. A window will be displayed similar to one in next slide. Then Go to Advanced —>Click on “performance options”

Cache Memory Vs Virtual Memory –A cache memory works by moving data to and from physical memory. –When the CPU request data that is stored in cache, it receives this data faster than if it had to retrieve the data from physical memory Virtual memory swap data in and out of physical memory Virtual memory places open applications that are not active and portions of active applications on your hard drive and only keeps what is necessary for functionality in real RAM.

Conclusion Any Questions?