3.3 MEMORY HIERARCHY AND THEIR NEEDS
Every programmer wishes to have a large and fast memory. However, the two requirements are conflicting. Fast memories are expensive and small; and slow memories are cheaper and large. To give a user the illusion of both fast and large, the memory system of modern computers is organized in a hierarchical way. The very top of the hierarchy is CPU registers, between the CPU and main memory, a fast cache memory is added. The hard disk is used by the technique of virtual memory to expand the capacity of main memory. Most computer systems make use of a hierarchy of memory technologies as a single type of memory is not sufficient. This hierarchy is known as the memory hierarchy.
Notes--(Most computer systems make use of a hierarchy of memory technologies, this hierarchy is known as the memory hierarchy )
In the previous section, we have discussed the various types of memory systems such as semiconductor (main) memory, Magnetic memory and Optical memory. In this section, we will discuss the hierarchy of these memory systems.
As you have seen in the previous section faster memory technology (such as semiconductor memory) is more expensive. In addition fast memory requires power supply till the information needs to be stored. Furthermore, the memory with less cost (such as Optical memory) have very high access time, that is the time taken by CPU to access the memory location is high, which result in a slower operation of CPU. Thus the cost versus access time leads to a memory hierarchy. The overall goal of Memory Hierarchy is to obtain the highest possible access speed while minimizing the total cost of the memory system. Figure 3.16 (a) illustrates the components of a typical memory system.
A computer system uses a variety of devices for storing the instructions and data. A storage devices (or units) may vary according to the access time, storage capacity, and cost-per-bit of storage, as discussed in the previous section. Based on these criteria, a memory system can be considered to consist of three groups of memories.
1. Processor’s internal (CPU) memories: consisting of the small set of high speed registers which are internal to a processor and are used as temporary locations where actual processing is done.
2. Primary (main) memory: It is a fast and large memory but slower than processor memory. Primary memory has faster access time, smaller storage capacity and higher cost per bit storage. This memory is accessed directly by the processor. It stores programs and data which are currently needed by the CPU. The size of the main memory is kept small because of its high cost.
3. Secondary (or auxiliary) memory: The secondary memory is mainly used for bulk storage (mass storage) of programs, data and other information. It has much larger capacity than main memory but slower than main memory. It basically stores system software, compiler, assembler and useful packages, large data files etc.
A typical storage hierarchy is shown in Figure 3.16(b).
A block diagram of storage hierarchy, as shown in Figure-3.16(b) includes:
- CPU (register)
- Cache memory
- Main memory
- Secondary storage, and
- Mass storage
0 Comments