Concepts of Memory and Its Hierarchy

Filter Course


Concepts of Memory and Its Hierarchy

Published by: Zaya

Published date: 22 Jun 2021

Concepts of Memory and Its Hierarchy Photo

Concepts of memory and its hierarchy

Memory Management

Memory management is the functionality of an operating system that handles or manages primary memory and moves processes back and forth between main memory and disk during execution. Memory management keeps track of each and every memory location, regardless of either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status.

The part of the OS that manages the memory hierarchy is called memory manager.
• Keeps track of used/unused parts of memory.
• Allocate/de-allocate memory to processes.
• Manages swapping between main memory and disk.
• Protection and sharing of memory

Memory Organization
The memory unit is the collection of storage units or devices together. The memory unit stores the binary information in the form of bits. Generally, memory/storage is classified into 2 categories:

  • Volatile Memory: This loses its data when power is switched off.
  • Non-Volatile Memory: This is permanent storage and does not lose any data when power is switched off.

Memory hierarchy

The Memory Hierarchy consists of all storage devices employed in a computer system from slow but high capacity Auxiliary memory to relatively faster Main memory to an even smaller and faster Cache memory" accessible to the high-speed processing logic. Memory hierarchy separates computer storage into a hierarchy based on response time.

[caption id="attachment_6051" align="aligncenter" width="569"]Memory Hierarchy Fig: Memory Hierarchy[/caption]

i. Internal register:

The internal register is for holding the temporary results and variables. Accessing data from these registers is the fastest way of accessing memory.

ii. Cache:

The cache is used by the CPU for memory which is being accessed over and over again. Instead of pulling it every time from the main memory, it is put in the cache for fast access. It is also a smaller memory, however, larger than the internal register.

iii. Main memory:

Main Memory or RAM (Random Access Memory): It is a type of computer memory and is a hardware component. It can be increased provided the operating system can handle it.

iv. Hard disk:

A hard disk is a hardware component in a computer. Data is kept permanently in this memory. A memory from hard disk is not directly accessed by the CPU, hence it is slower. As compared with RAM, a hard disk is cheaper per bit.

v. Magnetic tape:

Magnetic tape memory is usually used for backing up large data. When the system needs to access a tape, it is first mounted to access the data. When the data is accessed, it is then unmounted. The memory access time is slower in magnetic tape and it usually takes few minutes to access a tape.