You are on page 1of 10

Memory Management

Happiness = bad memory

10/31/2012 4:23 PM

Todays Menu
No

memory abstraction Address Space: Base & limit registers Swapping Managing free memory

First Fit Next Fit Best Fit Worst Fit Quick Fit

10/31/2012 4:23 PM

No memory abstraction
OS in ROM User Program User Program OS in RAM Device Drivers in Rom

User Program

OS in RAM

10/31/2012 4:23 PM

Address Space
An

address space is the set of addresses that a process can use to address memory.

10/31/2012 4:23 PM

Base & Limit Registers


Dynamic

relocation Base register is loaded with the physical address. CPU hardware adds the base register value to each reference to memory.

10/31/2012 4:23 PM

Swapping
Hole Memory

compaction Fixed vs dynamic memory allocation

10/31/2012 4:23 PM

Managing Free Memory


Linked

list of holes and process.

10/31/2012 4:23 PM

Managing Free Memory


List

sorted by addsress Coalescing

A A

X X X X

10/31/2012 4:23 PM

Allocating Free memory


First

Fit Fit
the entire list to find smallest free space

First

free space big enough to fit. Next fit


Best
Searches

Worst

Fit separate lists.

Maintaining Quick

Fit

Maintains separate list for common sizes requested.

10

10/31/2012 4:23 PM

Questions?
Beginning: Virtual Memory

You might also like