Lecture 8 - Memorymanagement
Lecture 8 - Memorymanagement
Objectives
Equal-size partitions
Because all partitions are of equal size, it
does not matter which partition is used
Unequal-size partitions
Can assign each process to the smallest
partition within which it will fit
Queue for each partition
Disadvantages:
Requires entire program to be stored contiguously
Jobs are allocated space on the basis of first
available partition of required size
Works well only if all of the jobs are of the same
size or if the sizes are known ahead of time
Arbitrary partition sizes lead to undesired results
Too small a partition size results in large jobs
the requirements
Leads to fast allocation of memory space
eliminated
Best-Fit Versus First-Fit Allocation
(continued)
First-fit memory allocation:
Advantage: Faster in making allocation
J3 has to wait
Best-Fit Versus First-Fit Allocation
(continued)
Algorithm for Best-Fit:
Goal: find the smallest memory block into which the
J3 has to wait
Next-Fit and Worst-Fit
J3 has to wait
Relocatable Dynamic Partitions
of free memory
Busy list must show the new locations for all of the
program
Relocation register
Logical
Reference to a memory location independent of the
current assignment of data to memory
Translation must be made to the physical address
Relative
Address expressed as a location relative to some
known point
Physical
The absolute address or actual location in main
memory
Summary
20M 20M 40M 60M 20M 10M 60M 40M 20M 30M 40M 40M