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 the process of encoding, storing, and retrieving information. It helps us receive information, keep it for some time or a long time, and recall it whenever needed. Memory works similarly to a computer that takes input, saves data, and retrieves it when required.
Memory Process
1. Encoding
Encoding is the first stage of memory in which information from the environment is converted into a form that the brain can understand and store.
Information enters through our senses such as seeing, hearing, or reading.
The brain organizes and gives meaning to the information before storing it.
Without encoding, new information cannot be remembered.
When you type a document using a keyboard, the computer converts your keystrokes into digital data that it can process.
2. Storage
Storage is the process of keeping encoded information in memory for future use.
After encoding, information is stored either for a short time or a long time.
Storage helps preserve information until it is needed.
Information passes through sensory memory, short-term memory, and long-term memory before becoming permanent.
When you click Save, the document is stored on the hard disk (HDD) or SSD and remains there until you open or delete it.
3. Retrieval
Retrieval is the process of bringing stored information back into conscious memory when it is needed.
Retrieval allows us to recall stored knowledge and use it.
It is the final stage of the memory process.
Good retrieval helps in answering questions, solving problems, and performing daily tasks.
When you open a saved Word document from the HDD or SSD, the computer retrieves the stored file and displays it on the screen.

Comments
Post a Comment