L-10
L-10
STORAGE MANAGEMENT
The Storage Hierarchy
Tapes CD’s
Disk
Main Memory
L3 (optional)
L2
L1
CPU
Properties
You can:
Increase size and maintain same speed
Increase speed and maintain same size
BUT
Generally, you cannot do both at a reasonable cost
Programmer’s View
The linker
knows where the program will run
reads program and translates the addresses
Example:
ld r0, *8000 --> ld r0, 0x10008000
add r0, 4 --> addr0, 4
ld *8004, r0 --> ld 0x10008004, r0
A Relocating Loader
Monitor
Overlaying
Overlay control
On disk
Monitor
Multiple Partition Allocation
Partition 2
Partition 3
Program
This fragment is
wasted
Protection: Limit Registers
Program 1
Program 2
Program 3
External Fragmentation
Program 1
These fragments
are not allocated
to any program,
and they are Program 2
wasted.
Program 3
Compaction (Burping)
Program 1 Program 1
Program 2
Program 2
Program 3
Program 3