WHAT IS C0MPUTER MEMORY HEIRARCHY ?
In computers, memory is a device used to store data in binary form. A memory system is composed of a memory of fixed size and procedures which tells how to access the data stored in the memory.

- In the Computer System Design, Memory Hierarchy is an enhancement to organize the memory such that it can minimize the access time.
- The Memory Hierarchy was developed based on a program behavior known as locality of references (same data or nearby data is likely to be accessed again and again).
- There are multiple levels present in the memory, each one having a different size, different cost, etc.
- Some types of memory like cache, and main memory are faster as compared to other types of memory but they are having a little less size and are also costly whereas some memory has a little higher storage value, but they are a little slower.
REGISTER
- Registers are small, high-speed memory units located in the CPU.
- They are used to store the most frequently used data and instructions.
- Register have the fastest access time and the smallest storage capacity, typically ranging from 16 to 64 bits.
CACHE MEMORY
- Cache memory is a small, fast memory unit located close to the CPU.
- It stores frequently used data and instructions that have been recently accessed from the main memory.
- Cache Memory is designed to minimize the time it takes to access data by providing the CPU with quick access to frequently used data.
RAM (Random Access Memory)
- Main memory, also known as RAM (Random Access Memory), is the primary memory of a computer system.
- It has a larger storage capacity than cache memory, but it is slower.
- It is of two types:
- Static RAM: Static RAM stores the binary information in flip flops and information remains valid until power is supplied. Static RAM has a faster access time and is used in implementing cache memory.
- Dynamic RAM: It stores the binary information as a charge on the capacitor. It requires refreshing circuitry to maintain the charge on the capacitors after a few milliseconds. It contains more memory cells per unit area as compared to SRAM.
MAGNETIC DISK
- Magnetic Disks are simply circular plates that are fabricated with either a metal or a plastic or a magnetized material.
- The Magnetic disk work at a high speed inside the computer and these are frequently used.
MAGNETIC TAPE
- Magnetic Tape is simply a magnetic recording device that is covered with a plastic film.
- In the case of a magnetic tape, the access time for a computer is a little slower and therefore, it requires some amount of time for accessing the strip.
OPTICAL DISK
- Optical Disk is a storage medium that relies on laser technology to read and write data, in shape, it is a flat circular disk which is made up of polycarbonate or a similar material with a very shiny reflective layer on the surface.
- An optical drive is consist of a laser assembly that emits a focused beam of light onto the shiny reflecting surface of disk. as the disk spin , the laser beam tracks along the spiral path where data is stored as the data is very compact and require a light beam hence make this process very delicate and precise operation even a small error can cause high change in data.
- Optical disks have a wide array of applications across various sectors because of their efficient data storage and retain capabilities.
ROM (READ ONLY MEMORY)
- ROM stands for Read-Only Memory. It is a non volatile memory, used to operate the system.
- Unlike the temporary storage of RAM, which loses its data when the power is turned off, ROM is designed to hold essential information permanently.
MROM (Masked read-only memory)
- MROM was the very first ROM that consisted of a grid of word lines and bit lines joined together by transistor switches. This type of ROM data is physically encoded in the circuit and only be programmed during fabrication. It was not so expensive.
PROM (Programmable read-only memory)
- PROM is a form of digital memory. In this type of ROM, each bit is locked by a fuse or anti-fuse.
- The data stored in it are permanently stored and can not be changed or erasable. It is used in low-level programs such as firmware or microcode.
EPROM (Erasable programmable read-only memory)
- EPROM also called EROM, is a type of PROM but it can be reprogrammed. The data stored in EPROM can be erased and reprogrammed again by ultraviolet light.
- Before the era of EEPROM and flash memory, EPROM was used in microcontrollers.
EEPROM (Electrically erasable programmable read-only memory)
- As its name refers, it can be programmed and erased electrically. The data and program of this ROM can be erased and programmed about ten thousand times.
- The duration of erasing and programming of the EEPROM is about 4ms to 10ms. It is used in microcontrollers and remote keyless systems.
FLASH MEMORY
- Flash memory is a non-volatile semiconductor memory which uses the programming method of EPROM and erases electrically like EEPROM.
- Unlike, EEPROM where user can erase a byte using electrical signals, a section of the memory or a set of memory words can be erasable in flash memory and hence the name flash memory i.e. which erases a large block of memory at once.
- Flash memory is widely used in USB memory, SD and micro SD memory cards used in cameras and mobile phones respectively.