1 Memory Management Virtual Memory Chapter 4. 2 The virtual memory concept In a multiprogramming environment, an entire process does not have to take.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Part IV: Memory Management
Memory management In a multiprogramming system, in order to share the processor, a number of processes must be kept in memory. Memory management is achieved.
Operating Systems Lecture 10 Issues in Paging and Virtual Memory Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing.
ITEC 352 Lecture 27 Memory(4). Review Questions? Cache control –L1/L2  Main memory example –Formulas for hits.
Allocating Memory.
CS 311 – Lecture 21 Outline Memory management in UNIX
CS 153 Design of Operating Systems Spring 2015
Memory Management Design & Implementation Segmentation Chapter 4.
Memory Management Chapter 4. Memory hierarchy Programmers want a lot of fast, non- volatile memory But, here is what we have:
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Memory Management - 2 CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent.
Chapter 3.2 : Virtual Memory
Chapter 3 Memory Management
Memory Management 1 CS502 Spring 2006 Memory Management CS-502 Spring 2006.
CS-3013 & CS-502, Summer 2006 Memory Management1 CS-3013 & CS-502 Summer 2006.
Computer Organization Cs 147 Prof. Lee Azita Keshmiri.
Operating System Concepts
Segmentation CS 537 – Introduction to Operating Systems.
Memory Management Ch.8.
Chapter 8: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 32 Paging Read Ch. 9.4.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally MEMORYMANAGEMNT.
Operating Systems Chapter 8
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 08 Main Memory (Page table questions)
Computer Architecture Lecture 28 Fasih ur Rehman.
8.4 paging Paging is a memory-management scheme that permits the physical address space of a process to be non-contiguous. The basic method for implementation.
Virtual Memory CS Introduction to Operating Systems.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
1 Chapter 3.2 : Virtual Memory What is virtual memory? What is virtual memory? Virtual memory management schemes Virtual memory management schemes Paging.
CIS250 OPERATING SYSTEMS Memory Management Since we share memory, we need to manage it Memory manager only sees the address A program counter value indicates.
Memory Management 1 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 9: Memory Management Background Swapping Contiguous Allocation Paging Segmentation.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming  To allocate scarce memory resources.
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.
Paging Example What is the data corresponding to the logical address below:
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
Memory Management Operating Systems CS550. Memory Manager Memory manager - manages allocation and de-allocation of main memory Plays significant impact.
1 Memory Management. 2 Fixed Partitions Legend Free Space 0k 4k 16k 64k 128k Internal fragmentation (cannot be reallocated) Divide memory into n (possible.
Main Memory. Chapter 8: Memory Management Background Swapping Contiguous Memory Allocation Paging Structure of the Page Table Segmentation Example: The.
Swap Space and Other Memory Management Issues Operating Systems: Internals and Design Principles.
Memory Management OS Fazal Rehman Shamil. swapping Swapping concept comes in terms of process scheduling. Swapping is basically implemented by Medium.
Chapter 8: Main Memory. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Memory and Addressing It all starts.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
Virtual Memory By CS147 Maheshpriya Venkata. Agenda Review Cache Memory Virtual Memory Paging Segmentation Configuration Of Virtual Memory Cache Memory.
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 8: Memory Management. 8.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 8: Memory Management Background Swapping Contiguous.
Chapter 7: Main Memory CS 170, Fall Program Execution & Memory Management Program execution Swapping Contiguous Memory Allocation Paging Structure.
Chapter 9 Memory Organization. 9.1 Hierarchical Memory Systems Figure 9.1.
MEMORY MANAGEMENT. memory management  In a multiprogramming system, in order to share the processor, a number of processes must be kept in memory. 
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.
Introduction to Paging. Readings r 4.3 of the text book.
Basic Paging (1) logical address space of a process can be made noncontiguous; process is allocated physical memory whenever the latter is available. Divide.
Memory Management.
Memory Management References text: Tanenbaum ch.4.
Chapter 8: Main Memory.
Memory Management References text: Tanenbaum ch.4.
Module IV Memory Organization.
Chapter3 Memory Management Techniques
Main Memory Background Swapping Contiguous Allocation Paging
Lecture 32 Syed Mansoor Sarwar
CPSC 457 Operating Systems
Lecture 3: Main Memory.
So far in memory management…
Chapter 8: Memory Management strategies
Paging Memory Relocation and Fragmentation Paging
Module IV Memory Organization.
Page Main Memory.
Presentation transcript:

1 Memory Management Virtual Memory Chapter 4

2 The virtual memory concept In a multiprogramming environment, an entire process does not have to take up space in main memory –The OS keeps those parts of the process currently in use in main memory, and the rest on disk –The portions necessary for processing are swapped in at the appropriate time.

3 Paging Because processes are of varying sizes, it is advantageous to break all processes into fixed size partitions called pages. The pages are then swapped in and out of main memory, depending on the strategy employed. Why would fixed size partitions be better than variable size?

4 Address mapping (from before) CPUmemory logical address 346 physical address MMU relocatio n register We will complicate this portion

5 Paging The position and function of the MMU

6 Key concepts & terms Virtual address Physical address Virtual page Page frame Page table

7 Virtual and physical addresses

8 Page Table Internal operation of MMU with 16 4 KB pages

9 Addresses & memory references Addresses generated by the CPU are divided into two parts, a page number (p), and a page offset (d). The page number is an index into the page table. The page table can be implemented with associative registers. –The page table contains the base address of each page in physical memory, i.e., the frame address (f). The base address is combined with the page offset to define the physical address that is sent to the memory unit

10 pd df f CPU physical memory Page table

page 0 page 1 page 2 page 3 page page 0 page 1 page 2 page 3 page 4

12 Structure of a page table entry

13 Issues with page tables They can be very large It takes more time to access a memory location –Virtual page first has to be mapped to its corresponding physical frame The spectrum of solutions –High speed registers to implement the table –Put entire page table in main memory

14 Assignment We have just covered material in Section 4.3 (partial) –pp ; In-class exercise –See hand-out HW –pp : 4, 6, 7, 8 –Section 4.3 Review what we did in Sec. 4.3 Read p. 211-middle p. 212 –Section 4.4 – read entire section