Skip to main content

 Memory Hierarchy

Memory hierarchy is arranging different kinds of storage present on a computing device based on speed of access. The memory in a computer can be divided into five hierarchies based on the speed as well as use. The processor can move from one level to another based on its requirements. The five hierarchies in the memory are registers, cache, main memory, magnetic discs, and magnetic tapes. The first three hierarchies are volatile memories which mean when there is no power, and then automatically they lose their stored data. Whereas the last two hierarchies are not volatile which means they store the data permanently. 



Let us discuss each level in detail:

Level-0 − Registers

The registers are present inside the CPU. As they are present inside the CPU, they have least access time. Registers are most expensive and smallest in size generally in kilobytes. They are implemented by using Flip-Flops.

Level-1 − Cache

Cache memory is used to store the segments of a program that are frequently accessed by the processor. It is expensive and smaller in size generally in Megabytes and is implemented by using static RAM.

Level-2 − Primary or Main Memory

It directly communicates with the CPU and with auxiliary memory devices through an I/O processor. Main memory is less expensive than cache memory and larger in size generally in Gigabytes. This memory is implemented by using dynamic RAM.

Level-3 − Secondary storage

Secondary storage devices like Magnetic Disk are present at level 3. They are used as backup storage. They are cheaper than main memory and larger in size generally in a few TB.

Level-4 − Tertiary storage

Tertiary storage devices like magnetic tape are present at level 4. They are used to store removable files and are the cheapest and largest in size (1-20 TB).

We can infer the following characteristics of Memory Hierarchy Design from the above figure:

 

1.      Capacity:
It is the global volume of information the memory can store. As we move from top to bottom in the Hierarchy, the capacity increases.

2.      Access Time:
It is the time interval between the read/write request and the availability of the data. As we move from top to bottom in the Hierarchy, the access time increases.

3.      Performance:
Earlier when the computer system was designed without Memory Hierarchy design, the speed gap increases between the CPU registers and Main Memory due to large difference in access time. This results in lower performance of the system and thus, enhancement was required. This enhancement was made in the form of Memory Hierarchy Design because of which the performance of the system increases. One of the most significant ways to increase system performance is minimizing how far down the memory hierarchy one has to go to manipulate data.

4.      Cost per bit:
As we move from bottom to top in the Hierarchy, the cost per bit increases i.e. Internal Memory is costlier than External Memory.


Memory Function

Memory is an information processing system; therefore, we often compare it to a computer. Memory is the set of processes used to encode, store, and retrieve information over different periods of time

Encoding

We get information into our brains through a process called encoding, which is the input of information into the memory system. Once we receive sensory information from the environment, our brains label or code it. We organize the information with other similar information and connect new concepts to existing concepts. Encoding information occurs through automatic processing and effortful processing.

Storage

Once the information has been encoded, we have to somehow retain it. Our brains take the encoded information and place it in storage. Storage is the creation of a permanent record of information. In order for a memory to go into storage (i.e., long-term memory), it has to pass through three distinct stages: Sensory Memory, Short-Term Memory, and finally Long-Term Memory. These stages were first proposed by Richard Atkinson and Richard Shiffrin (1968). Their model of human memory , called Atkinson and Shiffrin’s model, is based on the belief that we process memories in the same way that a computer processes information.

 

Retrieval

The act of getting information out of memory storage and back into the desktop, and you can work with it again. The retrieval of information from a computer is the process of getting it back.. You must be able to retrieve information from memory in order to process and perform any job.

 


Comments

Popular posts from this blog

Function of OS 1. Process Management The operating system helps in running many programs at the same time. It keeps track of each running program (called a process), decides which one should run next, and stops or starts them as needed. It makes sure that all the programs get a fair chance to use the CPU.   2. Memory Management The OS manages the computer's memory (RAM). It decides which program will use how much memory and keeps track of it. When a program is closed, it frees up the memory so that other programs can use it. This helps the computer run smoothly without crashing.   3. File System Management The operating system helps us to create, save, open, and delete files. It organizes files in folders and keeps them safe. It also controls who can open or edit a file to protect our data.   4. Device Management The OS controls all the input and output devices like the keyboard, mouse, printer, and monitor. It tells the devices what to do and makes su...
  Unit-2 Control Statements in c# A control statement in java is a statement that determines whether the other statements will be executed or not. It controls the flow of a program. Control Statements can be divided into three categories, namely ●         Decision Making statements ●         Iteration (Looping) statements ●         Jump statements ⮚   Decision Making statements Decision making statements help you to make decision based on certain conditions. These conditions are specified by a set of decision making statements having boolean expressions which are evaluated to a boolean value true or false. There are following types of decision making statements in C#. 1) Simple if statement:   It is the most basic statement among all control flow statements in C#. It evaluates a Boolean expression and enables the program to enter a block of code if the ...
    Basic Structure Of Java Program   // 1. Package Declaration (optional) package mypackage;   // 2. Import Statements (optional) import java.util.Scanner;   // 3. Class Declaration public class MyProgram {       // 4. Main Method – Entry point of the program     public static void main(String[] args) {           // 5. Statements – Code to be executed         System.out.println("Hello, World!");     } }   1. Package Declaration (Optional) A Java program may begin with a package declaration that defines the folder or package name in which the class is stored. For example: package mypackage; This helps organize code into different logical groups.   2. Import Statements (Optional) After the package declaration, import statements can be added to include built-in or user-defined Jav...