- Referred to as real memory or primary memory
- volatile, because its contents are lost when the power is removed
- Should be, fast, abundant, cheap, Unfortunately, that's not the reality..., Solution: combination of fast & expensive and slow & cheap memory
- Program instructions and the data used by programs being executed must reside in high speed semiconductor memory called random access memory (RAM) in order to obtain high speed operation. We say random access because the CPU can access any byte of storage in any order.
Disk Cache
- A portion of main memory used as a buffer to temporarily to hold data for the disk
- Disk writes are clustered
- Some data written out may be referenced again. The data are retrieved rapidly from the software cache instead of slowly from disk
- Mostly transparent to operating system
Cache Memory
- Contain a small amount of very fast storage which holds a subset of the data held in the main memory
- Processor first checks cache
- If not found in cache, the block of memory containing the needed information is moved to the cache replacing some other data
Cache Design
- Cache size, small caches have a significant impact on performance
- Line size (block size), the unit of data exchanged between cache and main memory
- hit means the information was found in the cache
- larger line size higher hit rate
- until probability of using newly fetched data becomes less than the probability of reusing data that has been moved out of cache
Mapping function, determines which cache location the data will occupy.
Replacement algorithm
- determines which line to replace
- Least-Recently-Used (LRU) algorithm
Write policy,
- When the memory write operation takes place
- Can occur every time line is updated (write-through policy)
- Can occur only when line is replaced (write-back policy)
- Minimizes memory operations
- Leaves memory in an obsolete state
Cem Ozdogan
2004-03-06