Chapter 3
Chapter 3
Memory Management
Memory management :
mechanism
Keep track of memory in use
Keep track of unused (“free”) memory
Protect memory space
Allocate, deallocate space for processes
Swap processes: memory <–> disk
Equal-size partitions
Any process whose size is less than or equal to the partition size
can be loaded into an available partition.
Best-fit algorithm
Chooses the block that is closest in size to the request
First-fit algorithm
Scans memory from the beginning and chooses the first available block that is large
enough
Fastest
Next-fit
Scans memory from the location of the last placement
Replace the page that will not be used for the longest period of
time.
Use the time when a page is to be used.