Memory Hierarchy David Kilgore CS 147 Dr. Lee Spring 2008
How can I make my computer faster? What new components do I need?
Speed There are many different ways to increase the speed at which your programs run on your computers
Speed Having a good memory hierarchy can of course help a computer system operate as fast as possible
Memory Hierarchy The memory hierarchy of a computer system can be custimized by swapping different parts of the system with faster storage
Big Picture
Big (more detailed) Picture
Relative Cost and Speed The closer you get to the CPU, the higher the cost The farther away from the CPU, the more storage you get
Cache The CPU first fetches instructions from Level 1 and Level 2 cache Reduce memory access latency to main memory devices
Main Memory Main memory was intended to reduce latency between the CPU and secondary storage devices Types include SRAM, DRAM, and DDR SDRAM
Secondary Memory Have long access times Plentiful in data storage and relatively cheap
Locality of Programs The speed of a computer can be influenced at the program level in non-algorithmic ways
Locality of Programs When writing programs, it is best to write programs that have high locality
Locality of Programs Spatial locality The idea that if data is accessed, nearby data will likely be accessed in the near future Temporal locality The idea that if data is accessed, that same data will likely bee accessed in the near future
Summary We have seen that increasing a computer's speed involves many different hardware parts These parts work together to get instructions to the CPU as fast as possible