Memory hierarchy of a computer system it handles differences in speed. “Hierarchy” is a great way to say “order of thinks” like top to bottom, fast to slow, most important to least important.
If you look at the memory hierarchy inside the computer, according to the fastest to the slowest:
1. CPU Registers 2. Caches memory 3. Main or Primary Memory 4. Secondary Memory
These are explained as following below.
- CPU Register:
These high speed registers in CPU serve as working memory for instruction and temporary storage of data. Typically, they create a general purpose register file to store data as it is processed. The capacity of 32 data words is typical of a register file, and each register can be read or written from within a single clock cycle.
- Caches Memory:
Now a days, most computers contain another level of IC memory- sometimes several such levels- Known as cache memory, that is positioned logically between the CPU registers and main memory. storage capacity of a cache is less than of main memory, but with an access time of one to three cycles, the cache is much faster than main memory because some or all of it can reside on the same IC as the CPU.
For high performance computers, caches are essential components. Unlike the other three types of memory, the cache is usually transparent to programmers. Simultaneously, a computes cache and main memory implement directly mapped external memory by the instructions of the CPU.
- Main or Primary Memory:
It is large, fairly fast external memory, which stores programs and data in active use. in main memory, storage locations are addressed directly by the load and store instruction of the CPU. While an IC Technology similar to that of a CPU register file is used, access is slower is due to large capacity of main memory and the fact that it is physically separated from the CPU. Access time of five or more clock cycles are usual.
- Secondary Memory:
Secondary memory is very large in capacity but much slower than memory. Secondary memory store system programs, large data files, and the like are not consistently required by the CPU. When the capacity of the main memory. in secondary storage, information is considered on line, but is accessed indirectly through I/O programs that transfer information between main and secondary memory.
The most and common examples of secondary memory are magnetic hard disks and CD-ROMs (compact discs only read memories), both of which have relatively slow electrical access mechanisms. Storage capacity of several gigabytes is typical, while access time is measured in milliseconds.
Attention reader! Don’t stop learning now. Learn all GATE CS concepts with Free Live Classes on our youtube channel.