Sunday, August 29, 2010

What is Memory Hierarchy?

According to computer systems architecture (Williams,R. 2001, p.309) the memory hierarchy has fastest CPU registers at the top and the slowest tape driver at the bottom. By considering only the access speed we can organize all memory in a performance hierarchy that is what we call memory hierarchy.

 Principals of memory hierarchy


When we go bottom to top of the memory hierarchy each parts speed and cost which is producing money is increasing. But memory size of each is decreasing. That is one thing we can see from the memory hierarchy. 
Registers
In this diagram Registers are located at CPU and it provides fast access to CPU. In capacity wise also Registers are small. But the fact is we can’t add more registers, Because Registers are more expensive than other parts. 

Cache

We will discuss widely on cache on the next chapter.

Main Memory(Physical Memory)

Next subsystem is Main memory. Actually most of people know this better. So, no need to explain it from the bottom. This is the general-purpose, relatively low-cost memory found in most computer systems. There are several types of main memory they are DRAM, SD RAM, DDR RAM, SRAM. (Anon. 2008, p.4)
Virtual Memory
Most modern computers there are something called virtual memory. Virtual memory scheme that let computers simulate main memory using storage on a disk drive. Although disks are slower than Main Memory, the cost per bit is also less. Therefore it is important to keep some data on magnetic storage. Virtual Memory is responsible for transparently copying data between disk and main memory as needed by a program.