This Memory Hierarchy gives the relationship between the speed,size and cost with respect to the distance from the Processor. Following diagram shows the memory hierarchy for an embedded systems.
Memory Hierarchy |
Now we will discuss each memory element in the hierarchy.
1. CPU Registers : These registers will be present inside the processor, so faster in speed compared to other memory elements. These registers will be limited in number because if we increase the number, size and cost of the processor will get increase.
2. L1 and L2 SRAM Caches. : Level 1(L1) and Level 2(L2) caches may be present in the internal RAM(Static RAM) or some times they might present outside the SRAM also. Static RAM will present inside the processor and small in size, again it because of cost and size of the processor. (Note : In some processor SRAM will not be present).
Level 1 Cache is nearer to processor compared to DRAM. It works at very high speed and it is expensive compared to other memory elements. Many times this Level 1 cache will lie in the static RAM, which is present inside the processor.
Level 2 Cache is similar to the Level 1 but it some what far compared to level 1 cache. It may lie in the SRAM or sometimes might lie outside the SRAM( means present in the DRAM). It is slower than Level 1 cache and faster than the RAM. Totally combination of lelel1 and level2 caches will give better performance.
This high cost is
one of the major restriction why we can not use lots of cache in embedded systems.
The general thumb rule is, higher the cache memory faster would be the working of the processor.
The general thumb rule is, higher the cache memory faster would be the working of the processor.
3. RAM Main Memory : It is third level memory element in the memory hierarchy. RAM basically stores all the data that the computer needs while it is
running. RAM is also faster but slower than the caches. The higher the size of the RAM, faster will be the system.
4. Secondary storage(Flash memory, Hard disk) : It is last level memory element in the memory hierarchy. These memory elements are non-volatile type memory elements, means it will store the data after the power off. Size of the these memory elements will be more, cost is less compared to other memory elements. They are slower in operations compared to other memory elements.
No comments:
Post a Comment