Memory Hierarchy

What is Memory Hierarchy, and how does it work?

  • A computer's memory may be separated into five hierarchies based on performance and usage. Depending on its needs, the processor can travel from one level to another. Registers, cache, main memory, magnetic discs, and magnetic tapes are the five memory hierarchies. 
  • The first three hierarchies are volatile memory, which means that they lose their stored data when there is no power. 
  • The latter two hierarchies, on the other hand, are not volatile, which means they hold data indefinitely.
  • A memory element is a collection of storage devices that store binary data in bits. In general, memory storage may be divided into two types: volatile and non-volatile.

Memory Hierarchy in Computer
Ability/Storage
  • The entire quantity of data that the memory hierarchy can store is the memory hierarchy's ability. Because the capacity increases as we move from the top to the bottom of the memory structure.
Time Access
  • In the memory hierarchy, the access time is the time delay between data availability and requests to read or write. Because the access time increases as we move from the top to the bottom of the memory structure.
Per-bit cost
  • When we move from the bottom to the top of the memory hierarchy, the cost of each bit increases, implying that internal memory is more expensive than external memory.
Memory Hierarchy Design
  • The following are the key components of a computer's memory hierarchy.
Registers
  • The register is usually a static RAM or SRAM in the computer's CPU that holds the data word, which is normally 64 or 128 bits long. 
  • The most essential register is the programme counter register, which is found in all processors. 
  • A status word register and an accumulator are used by the majority of CPUs. 
  • A status word register is used for decision-making, and an accumulator is used to store data in the same way as a calculator is used to store numbers. 
  • Computers with complicated instruction sets often have a large number of registers for receiving main memory, whereas RISC-based computers have fewer registers.

Cache Memory 
  • Cache memory can be located in the CPU, but it's also possible that it's another IC (integrated circuit) that's divided into tiers. 
  • The cache stores data chunks that are often accessed from main memory.
  • When a CPU has just one core, it is uncommon for it to have two (or) more cache levels. Multi-core processors now have three levels, two for each core, and one common level.
Main Memory
  • The memory unit in the CPU that interacts directly is what the computer's primary memory is. 
  • It is the computer's primary storage device. This memory is both quick and big, and it is utilized to store data throughout the computer's activities. 
  • This memory consists of both RAM and ROM.
Magnetic Disks
  • In a computer, magnetic discs are circular plates made of plastic that are otherwise made of metal by magnetized material. 
  • Many discs can be stacked on one spindle by read or write heads available on each plane, and two sides of the disc are frequently used. 
  • In a computer, all of the discs spin at the same time at a rapid rate. The tracks in the computer are nothing more than bits that are stored in areas next to concentric circles within the magnetic plane. 
  • These are frequently divided into sectors, which are named for the portions they are divided into.
Magnetic Tape
  • This tape is a standard magnetic recording with a thin magnetizable layer on an extended, plastic film of a thin strip. 
  • This is mostly used to back up large amounts of data. When the computer needs to access data from a strip, it must first mount the strip. 
  • It will be unmounted after the data has been approved. 
  • Memory access time will be slower within magnetic strips, and accessing a strip will take several minutes.
Advantages of Memory Hierarchy
The following are some of the reasons why a memory hierarchy is necessary.
  • Distributing memory is a straightforward and cost-effective process.
  • External devastation is removed.
  • Data might be dispersed all over the place.
  • Allows for pre-paging and demand paging.
  • Swapping will be a lot easier.


Post a Comment

Previous Post Next Post