Memory Management Chapter 7.

Slides:



Advertisements
Similar presentations
Chapters 7 & 8 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College, Venice,
Advertisements

Part IV: Memory Management
Memory Management Chapter 7.
Fixed/Variable Partitioning
Memory Management Chapter 7. Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as.
Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable supply of ready processes to.
Allocating Memory.
Chapter 7 Memory Management
Chapter 7 Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2009, Prentice.
Chapter 7 Memory Management
Memory Management Chapter 7. Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as.
CSCI2413 Lecture 5 Operating Systems Memory Management 1 phones off (please)
Memory Management Chapter 7 B.Ramamurthy. Memory Management Subdividing memory to accommodate multiple processes Memory needs to allocated efficiently.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
Memory Management Chapter 5.
Chapter 7 Memory Management
1 Lecture 8: Memory Mangement Operating System I Spring 2008.
1 Memory Management Chapter 7. 2 Roadmap n Memory management u Objectives u Requirements n Simple memory management u Memory partitioning F Fixed partitioning.
Chapter 7 Memory Management Seventh Edition William Stallings Operating Systems: Internals and Design Principles.
Operating System Chapter 7. Memory Management Lynn Choi School of Electrical Engineering.
Memory Management Chapter 7.
1 Memory Management Memory Management COSC513 – Spring 2004 Student Name: Nan Qiao Student ID#: Professor: Dr. Morteza Anvari.
Memory Management Operating Systems: Internals and Design Principles, 6/E William Stallings Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Dr.
Chapter 7 Memory Management
Chapter 7 Memory Management Seventh Edition William Stallings Operating Systems: Internals and Design Principles.
Cosc 2150: Computer Organization Chapter 6, Part 2 Virtual Memory.
Memory Management Chapter 7.
Memory Management. Roadmap Basic requirements of Memory Management Memory Partitioning Basic blocks of memory management –Paging –Segmentation.
Subject: Operating System.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
1 Memory Management Chapter 7. 2 Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated to ensure a reasonable.
1 Memory Management Chapter 8. 2 Memory Management n It is the task carried out by the OS and hardware to accommodate multiple processes in main memory.
Basic Memory Management 1. Readings r Silbershatz et al: chapters
Informationsteknologi Wednesday, October 3, 2007Computer Systems/Operating Systems - Class 121 Today’s class Memory management Virtual memory.
Memory management Ref: Stallings G.Anuradha. What is memory management? The task of subdivision of user portion of memory to accommodate multiple processes.
Memory Management Program must be brought (from disk) into memory and placed within a process for it to be run Main memory and registers are only storage.
Chapter 7 Memory Management Eighth Edition William Stallings Operating Systems: Internals and Design Principles.
Memory Management Chapter 5 Advanced Operating System.
1 Memory Management n In most schemes, the kernel occupies some fixed portion of main memory and the rest is shared by multiple processes.
2010INT Operating Systems, School of Information Technology, Griffith University – Gold Coast Copyright © William Stallings /2 Memory Management.
COMP 3500 Introduction to Operating Systems Memory Management: Part 2 Dr. Xiao Qin Auburn University Slides.
Chapter 7 Memory Management
Memory Management Chapter 7.
Memory Management.
ITEC 202 Operating Systems
Chapter 2 Memory and process management
Requirements, Partitioning, paging, and segmentation
Day 19 Memory Management.
Day 19 Memory Management.
Memory Allocation The main memory must accommodate both:
Chapter 8 Main Memory.
Day 18 Memory Management.
Module IV Memory Organization.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy 11/12/2018.
Economics, Administration & Information system
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.
So far… Text RO …. printf() RW link printf Linking, loading
Main Memory Background Swapping Contiguous Allocation Paging
Memory Management Chapter 7.
Lecture 3: Main Memory.
Operating System Chapter 7. Memory Management
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
Operating Systems: Internals and Design Principles, 6/E
Chapter 7 Memory Management
Presentation transcript:

Memory Management Chapter 7

Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as many processes into memory as possible should be able to run a program whose size is larger than the available real memory

Memory Management provides Relocation Programmer (or the compiler) does not know where the program will be placed in memory when it is executed While the program is executing, it may be swapped to disk and returned to main memory at a different location (relocated) Memory references in the code must be translated to actual physical memory addresses

Memory Management provides Protection Processes should not be able to access memory locations that belong to another process without permission Must be done at runtime OS cannot anticipate all of the memory references a program will make Sharing Allow several processes to access the same portion of memory

Fixed Partitioning Memory is divided into equal-sized partitions which are assigned to processes on demand or unequal-sized partitions Memory use is inefficient. Any program, no matter how small, occupies an entire partition.  internal fragmentation

Memory Assignment for Fixed Partitioning Equal-size partitions: no strategy is needed; it does not matter Unequal-size partitions assign each process to the smallest partition within which it will fit. This way, we can minimize the wasted memory within a partition Use one queue for each partition or a single queue for all

Dynamic Partitioning Processes are allocated exactly as much memory as required Eventually holes will start appearing in the memory. This is called external fragmentation Must use compaction to shift processes so they are contiguous and all free memory is in one block

Memory Allocation Strategies for Dynamic Partitioning Three popular strategies: First-fit Fastest May have many processes loaded in the front end of memory that must be searched over when trying to find a free block Best-fit Chooses the block that is closest in size to the request Worst performer overall Since smallest block is found for a process external fragments are smallest. Memory compaction must be done more often Next-fit Similar to first fit but starts to search for free blocks beyond the last allocated block Results in an even distribution of the free blocks throughout the memory

Memory Configuration Before and After Allocation of a 16 Mbyte Block

Buddy System Entire space available is treated as a single block of 2U If a request of size s is such that 2U-1 < s ≤ 2U, entire block of 2U is allocated Otherwise block is split into two equal buddies Splitting continues until smallest block greater than or equal to s is generated

Paging Partition memory into small equal-size chunks called frames Divide each process into the same size chunks called pages Operating system maintains a page table for each process contains the frame location for each page in the process Pages of process A

Page Tables 4 5 6