Memory Management n 1. Single contiguous allocation n 2. Partitioned organization: –Static, Dynamic n 3. (Pure) Paging.

Slides:



Advertisements
Similar presentations
Memory.
Advertisements

Part IV: Memory Management
Chapter 2: Memory Management, Early Systems
Chapter 2: Memory Management, Early Systems
Memory Management, Early Systems
Allocating Memory.
Memory Management Questions answered in this lecture: How do processes share memory? What is static relocation? What is dynamic relocation? What is segmentation?
Memory Management Norman White Stern School of Business.
Memory Design Example. Selecting Memory Chip Selecting SRAM Memory Chip.
Memory Management.
Memory Management 2010.
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.
Memory ManagementCS-502 Fall Memory Management CS-502 Operating Systems Fall 2006 (Slides include materials from Operating System Concepts, 7 th.
Chapter 5: Memory Management Dhamdhere: Operating Systems— A Concept-Based Approach Slide No: 1 Copyright ©2005 Memory Management Chapter 5.
Computer Organization and Architecture
Memory Management Five Requirements for Memory Management to satisfy: –Relocation Users generally don’t know where they will be placed in main memory May.
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts, Amherst Operating Systems CMPSCI 377 Lecture.
Layers and Views of a Computer System Operating System Services Program creation Program execution Access to I/O devices Controlled access to files System.
Computer Organization and Architecture Operating System Support Chapter 8.
Memory management. Instruction execution cycle Fetch instruction from main memory Decode instruction Fetch operands (if needed0 Execute instruction Store.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 346, Royden, Operating System Concepts Operating Systems Lecture 24 Paging.
Operating System Chapter 7. Memory Management Lynn Choi School of Electrical Engineering.
SOCSAMS e-learning Dept. of Computer Applications, MES College Marampally MEMORYMANAGEMNT.
Operating System 7 MEMORY MANAGEMENT. MEMORY MANAGEMENT REQUIREMENTS.
Dynamic Partition Allocation Allocate memory depending on requirements Partitions adjust depending on memory size Requires relocatable code –Works best.
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
Memory Management. Process must be loaded into memory before being executed. Memory needs to be allocated to ensure a reasonable supply of ready processes.
1 Memory Management Chapter Basic memory management 4.2 Swapping (εναλλαγή) 4.3 Virtual memory (εικονική/ιδεατή μνήμη) 4.4 Page replacement algorithms.
Memory Management 1 Tanenbaum Ch. 3 Silberschatz Ch. 8,9.
Memory Management Techniques
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.
CE Operating Systems Lecture 14 Memory management.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
3.0 : Resource Management Part 1 : Memory Management.
1 Memory Management Basics. 2 Program P Basic Memory Management Concepts Address spaces Physical address space — The address space supported by the hardware.
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 Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo 1 Memory management & paging.
CS6502 Operating Systems - Dr. J. Garrido Memory Management – Part 1 Class Will Start Momentarily… Lecture 8b CS6502 Operating Systems Dr. Jose M. Garrido.
Memory Management Continued Questions answered in this lecture: What is paging? How can segmentation and paging be combined? How can one speed up address.
8.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Fragmentation External Fragmentation – total memory space exists to satisfy.
Copyright ©: Nahrstedt, Angrave, Abdelzaher1 Memory.
Main Memory: Paging and Segmentation CSSE 332 Operating Systems Rose-Hulman Institute of Technology.
MEMORY MANAGEMENT. memory management  In a multiprogramming system, in order to share the processor, a number of processes must be kept in memory. 
Basic Paging (1) logical address space of a process can be made noncontiguous; process is allocated physical memory whenever the latter is available. Divide.
Non Contiguous Memory Allocation
Memory management.
Paging and Segmentation
Chapter 8: Main Memory.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy 11/12/2018.
Operating System Concepts
Practice Six Chapter Eight.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
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 32 Syed Mansoor Sarwar
Lecture 3: Main Memory.
So far in memory management…
CSE 451: Operating Systems Autumn 2005 Memory Management
Operating System Chapter 7. Memory Management
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.
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
COMP755 Advanced Operating Systems
Page Main Memory.
Presentation transcript:

Memory Management n 1. Single contiguous allocation n 2. Partitioned organization: –Static, Dynamic n 3. (Pure) Paging

Memory Management n 1. Single Contiguous Allocation –Early, uni-programmed machines –Memory divided into 3 areas: Memory management developed over time (Historical Overview) (Historical Overview) OS (32K) User Job (64K) Wasted (160K) Memory (256K)

n Single Contiguous Allocation –Hardware : Bounds register, supervisor mode –Software : User job  available memory? n If so, allocate and run to completion n If not, error –Advantage : simplicity –Disadvantages : poor M, P utilitization n job must fit into M

Memory Management n 2. Partitioned Organization –Early multiprogramming environment –Memory divided into partitions. Each holds 1 job. n E.g.

n Partitioned Organization –Software : n 1. Keep track of status of partitions –Size, Free or Allocated n 2. Which job gets M [Job Scheduler] n 3. Alloc : Free partition of sufficient size assigned n 4. Dealloc : Freed when job terminates –Hardware : n 2 bounds registers to bracket partition n Locks and keys [IBM] –Each partition has own protection key –When processor assigned, “key” in PSW = Key of partition

n Partitioned Organization –Two types of partitions : n Static Partitions –Memory divided into partitions according to OS or Operator specification –Each job specifies max memory req’d; memory management assigns partition of sufficient size –Appropriate if : size, frequency of jobs known –OW : wasteful of M n Estimated 75% wasted

n Partitioned Organization –Two types : n Dynamic Partitions –Created during job processing to match partition to job size –Need tables for allocating, deallocating partitions : Size, Location, Status. –E.g.

n Partitioned Organization –Dynamic Partitions n Jobs terminate, new partitions created from freed areas, subject to : –1. Free area  Job size –2. If >, fragmentation –3. On deallocation, merge adjacent free areas n Implementation : –Table size varies  n Append info to each partition and chain n Lists of free, alloc partitions

n 3. (Simple or Pure) Paging –Each job’s address space  Equal pieces  frames –Memory  pieces of same size  Frames (blocks) –User : n Sees logically continuous address space n But pages loaded into frames which are not contiguous –HW maps any page into any frame –Mapping : PMT (Separate registers, 1/Page) –Page size is critical (1-4K, in powers of 2) –Solves fragmentation problem without moving partitions Memory Management

(Pure paging)

n Paging –Hardware : n 1 register/page needed for memory mapping –High speed registers or memory locations (cache) n Dynamic Address Translation (DAT) –Divides EA into : 0 …. 7 8 … …. 31 Page number Byte offset

n Paging n Consider IBM example : –Page Size = 2 12 or 4096 bytes –Effective address (EA) = 24 bits –DAT : Divides EA into page index, byte displacement –PMT : Maps page number to frame number n  Physical address of page n Add byte offset  Address of operand –Software : Need 3 tables n 1 PMT/job, with 1 entry per page n A memory block (frame) table (MBT), with status info for each frame (if used, by whom) n A job table (JT), with 1 entry/job (Size, status, pointer to PMT)

n Paging –Advantages : n Facilitates multiprogramming by eliminating fragmentation (more jobs in memory, no compacting) n Facilitates sharing of info (memory) among jobs by incorporating pages in more than 1 job’s address space

n Paging –Disadvantages : n Page address mapping - HW costly, time-consuming n Tables : Memory required for PMTs, time to update n Internal fragmentation (page breakage) –Half page/job wasted on average –Tradeoff : n Small pages (min page wastage) vs n Large pages (reducing # entries in PMT) n Know average job size n Some memory may not be used (if #frames < address space) n Memory still contains infrequently used info n Job size must be  Memory size