- early memory
- physical connections - pegs, holes, wires
- delay
lines
- crt
- magnetic drum
- vacuum tubes, relays
- core
- the memory hierarchy
- registers - one cycle, 64-512 bytes
- on-chip cache (l1 or l2) - 2 cycles, 1-32 kb
- off-chip cache (l2) - 5 cycles, 32-512 kb
- main (primary) memory - 30 cycles, 1 mb - 8 gb
- secondary memory - 106 cycles, 100 mb - 1 tb
- tertiary memory - 100-500 ms, 600 mb and up
- off-line memory - 1s - 10 m, whatever
- principle concern is with primary-secondary memory
- memory manager
- problem - ten pounds of process in five pounds of memory
- issues - latency, sharing, protection
- basic memory management
- monoprogramming
- no sharing - except os and program
- the structure of primary storage
- multiprogramming
- primary storage shared among several processes - partitioning
- fixed partitions - possibly of different sizes
- assigning incoming processes to partitions
- queues of waiting processes - single vs. multiple queues
- finding the best fit between process and partition size - any,
best, worst
- relocation
- compile - link - load
- absolute and relative addresses
- relocation - adjusting absolute addresses to match assigned
addresses
- linking - modifying the program
- base register - addresses are absolute relative to a base
- protection - preventing concurrent processes from accessing each
other's storage
- key bits - capabilities
- base register and limit registers - segments
- remove partitions
- pack processes more tightly
- eliminate process size restrictions (up to the size of primary
storage)
- really big idle processes
- fragmentation - holes of idle storage
- swapping - move processes into and out of primary storage
- big idle processes - move them to disk
- fragmentation - compress running processes to one end of primary
storage
- but, it's slow and cpu intensive
- what is a process's storage requirements
- static process growth - real time system, fortran programs
- dynamic process growth - everything else
- stack and heap storage
- allocate near holes
- overestimate requirements and manage extra space within the
process itself.
- free-space management - where are the holes?
- allocation - return a block of free space of at least k units
- minimize fragmentation
- deallocation
- coalescing - reassemble fragments
- bit maps
- block storage into chunks - allocation unit; bit count
vs. wasted space
- fast and simple for small amounts of storage
- deallocation is easy
- allocation can be difficult - look for a k-unit chunk
- linked lists
- alternating sequences of allocated and free storage
- small allocation units - bytes even
- allocation is easy
- deallocation is a bit less easy - free-space coalescing
- free space allocation
- what's the relation between the size of the request and the size
of the allocated block
- first fit - fast
- next fit - fast, larger-grain fragmentation (in theory)
- best fit - slow, prone to fine-grain fragmentation
- worst fit - ha ha ha
- buddy system allocation - allocate one-half a hole
- multiple free lists
- process and free space
- by size
- quick fit - allocation very fast, deallocation very slow
This page last modified on 30 October 2002.