MEMORY MANAGEMENT (Best-Fit & First-Fit)

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.
Chapter 6: Memory Management
CSS430 Memory Management Textbook Ch8
CSEN5322 Quiz-6.
Memory Management Chapter 7. Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as.
7. Physical Memory 7.1 Preparing a Program for Execution
Allocating Memory.
1 CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania, Fall 2002 Lecture Note: Memory Management.
Memory Management Chapter 4. Memory hierarchy Programmers want a lot of fast, non- volatile memory But, here is what we have:
Memory Management Chapter 7. Memory Management Subdividing memory to accommodate multiple processes Memory needs to be allocated efficiently to pack as.
Chapter 3.1 : Memory Management
Understanding Operating Systems1 Operating Systems Virtual Memory Thrashing Single-User Contiguous Scheme Fixed Partitions Dynamic Partitions.
Memory Management Chapter 7 B.Ramamurthy. Memory Management Subdividing memory to accommodate multiple processes Memory needs to allocated efficiently.
03/24/2004CSCI 315 Operating Systems Design1 Memory Management and Virtual Memory (Problem session)
MEMORY MANAGEMENT By KUNAL KADAKIA RISHIT SHAH. Memory Memory is a large array of words or bytes, each with its own address. It is a repository of quickly.
1 Chapter 3.1 : Memory Management Storage hierarchy Storage hierarchy Important memory terms Important memory terms Earlier memory allocation schemes Earlier.
1 Lecture 8: Memory Mangement Operating System I Spring 2008.
Tutorial 6 Memory Management
Memory Management Ch.8.
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.
Tutorial 7 Memory Management presented by: Antonio Maiorano Paul Di Marco.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 32 Paging Read Ch. 9.4.
Chapter 5 Operating System Support. Outline Operating system - Objective and function - types of OS Scheduling - Long term scheduling - Medium term scheduling.
Ch. 4 Memory Mangement Parkinson’s law: “Programs expand to fill the memory available to hold them.”
Chapter 4 Memory Management.
ICS 145B -- L. Bic1 Project: Main Memory Management Textbook: pages ICS 145B L. Bic.
Chapter 2 Memory Management: Early Systems Understanding Operating Systems, Fourth Edition.
Subject: Operating System.
Mixture of Gaussians This is a probability distribution for random variables or N-D vectors such as… –intensity of an object in a gray scale image –color.
Memory Management. Introduction To improve both the utilization of the CPU and the speed of its response to users, the computer must keep several processes.
CS 241 Section Week #9 (11/05/09). Topics MP6 Overview Memory Management Virtual Memory Page Tables.
Contiguous Memory Allocation Contiguous Memory Allocation  One of the simplest methods for allocating memory is to divide memory into.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo 1 Memory management & paging.
- means "replacement of a block of stored instructions or data with another.“ - a method that allows programs to be larger than the computer's main memory.
File Systems.  Issues for OS  Organize files  Directories structure  File types based on different accesses  Sequential, indexed sequential, indexed.
MEMORY MANAGEMENT Operating System. Memory Management Memory management is how the OS makes best use of the memory available to it Remember that the OS.
CSCI 6307 Foundation of Systems – Exercise (4) Xiang Lian The University of Texas – Pan American Edinburg, TX
Ch. 4 Memory Mangement Parkinson’s law: “Programs expand to fill the memory available to hold them.”
Fall 2000M.B. Ibáñez Lecture 14 Memory Management II Contiguous Allocation.
MEMORY MANAGEMENT. memory management  In a multiprogramming system, in order to share the processor, a number of processes must be kept in memory. 
CompSci 143A1 Part II: Memory Management Chapter 7: Physical Memory Chapter 8: Virtual Memory Chapter 9: Sharing Data and Code in Main Memory Spring, 2013.
COMP 3500 Introduction to Operating Systems Memory Management: Part 2 Dr. Xiao Qin Auburn University Slides.
Memory Management One of the most important OS jobs.
Memory Management Chapter 7.
Memory Management By: Piyush Agarwal ( ) Akashdeep ( )
Memory Management.
ITEC 202 Operating Systems
Day 19 Memory Management.
Day 19 Memory Management.
Memory Allocation The main memory must accommodate both:
Chapter 9 – Real Memory Organization and Management
Day 18 Memory Management.
Module IV Memory Organization.
Operating Systems Review.
مدیریت استراتژيک منابع انسانی
Chapter3 Memory Management Techniques
Main Memory Background Swapping Contiguous Allocation Paging
Operating Systems Placement Algorithm Alok Kumar Jagadev.
Schedules of Reinforcement
Lecture 3: Main Memory.
Operating System Chapter 7. Memory Management
Memory Management (1).
Ռազմավարական կառավարում
Exercise (11).
Exercise (10).
COMP755 Advanced Operating Systems
Presentation transcript:

MEMORY MANAGEMENT (Best-Fit & First-Fit) TUTORIAL MEMORY MANAGEMENT (Best-Fit & First-Fit)

Question 1 Assume that the main memory has the following 5 fixed partitions with the following sizes: 100KB, 500KB, 200KB, 300KB and 600KB (in order) How would each of the First-fit and Best-fit algorithms place processes of 212KB, 417KB, 112KB and 426KB (in order)? Compute the total memory size that is not used for each algorithm. Which algorithm makes the efficient use of the memory?

Answer 1 a) Partition Size First-Fit Fragmentation 100K 500K P1(212K) Best-Fit Fragmentation 100K 500K P2(417K) 500-417=83K 200K P3(112K) 200-112=88K 300K P1(212K) 300-112=88K 600K P4(426K) 600-426=174K

Answer 1 b) Total Fragmentation First-fit: Total Fixed Partitions – Total Process First-fit Size 1700-741 =959 Total Fragmentation Best-fit: Total Fixed Partitions – Total Process Best-fit Size 1700-1167 =533

Answer 1 c) Memeory Utilization Ratio: i. First-fit = 741 / 1700 = 43.5% ii. Best-fit = 1167 / 1700 = 68.6% *Best-fit has the most efficient use of the memory

Question 2 In a variable partition memory management, assume memory is allocated as specified in a diagram below: Suppose the request for memory is as follows: 18K, 12K, 7K Redraw the diagram to show how memory would look after all requests has been allocated by using the following memory allocation strategies: a)First-fit b)Best- fit Hole Used 10K 20K 30K 5K 15K 1 2 3 12 4 5 6 7 8 9 12K 11

Answer 2 a) FIRST-FIT: 18K will be allocated at the first hole of size 30K 12K will be allocated at the first hole of size 12K 7K will be allocated at the first hole of size 10K

Answer 2 b)BEST-FIT: 18K will be allocated at the first hole of size 20K 12K will be allocated at the first hole of size 15K 7K will be allocated at the first hole of size 20K