What is hierarchy (memory hierarchy)? D TECH VNS

0

 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
As we move up the storage hierarchy, we encountered memory elements having faster access time, less capacity and higher cost per bit stored. When we move down, we have a larger storage capacity, slower access time and lower cost per bit stored. Thus, CPU storage components generally have the fastest access time, the smallest storage capacity and the highest cost per bit stored. The cache memory which is placed in between the CPU and the main memory is a very high speed semiconductor memory used to enhance the speed of main memory. The main (primary) memory falls next in the memory hierarchy list. Secondary storage media such as hard-disk/magnetic disk memories make up the level of hierarchy just below the main memory. Secondary storage devices are at the bottom of the memory hierarchy. Secondary storage devices such as magnetic tapes are used for archival storage. They are very cost effective and so are used for mass storage of data, when fast access time is not required.

इस प्रश्नों का उत्तेर कमेंट में दे और अपना दे |
👉 Check Your Progress 3

Post a Comment

0Comments
Post a Comment (0)