Types of Computer Memory

Types of Computer Memory

To run a computer system, there is a requirement of computer memory. Computer memory is one of the important components of the computer system. Therefore, it is necessary to have basic knowledge about what a computer memory is and how many types of computer memory are there.

In this article, we will briefly explain about computer memory and also describe what are all types of computer memory used in computer systems. Let’s start with the definition of computer memory:

What is Computer Memory?

Memory is an essential part of the computer system because a computer cannot process any task without it. Memory is used to store data and instructions for performing specific tasks on the computer system. The computer memory is typically a storage space that is capable of storing and fetching data.

Memory is a set of several memory cells known as the building blocks of memory. Each memory cell has a unique index number or identification number known as the unique address of that specific memory cell. The CPU is responsible for selecting memory cells to read or write data.

The performance of the computer system depends on the memory and CPU. CPU cannot store programs or a large set of data permanently. They are only capable of storing basic instructions required to operate the computer. Therefore, it is mandatory to have the memory to run a computer system properly.


Types of Computer Memory

There are basically two types of computer memory:

Internal Memory
External Memory

Types of Computer Memory

Let’s look in-depth at both types of memory.

Internal Memory

Internal memory usually refers to the chips or modules that are directly connected to the motherboard.

The following are the available internal memories used in the computer system:

RAM

RAM is an acronym of ‘Random Access Memory’. It constitutes the internal memory of the CPU (Central Processing Unit) for storing the given instructions and immediate results. It is also known as read-write memory. RAM is a primary-volatile memory as the data is lost when we turn off (Switch off or Shut down) the computer or there is a power failure.

RAM is small in size and comparatively faster than most of the available computer memories. But, it is not as fast as registers.

RAM can be further divided into the following two subcategories:

SRAM
SRAM stands for ‘Static Random Access Memory’. It stores the data in a static form which means that the data remains in the memory as long as the computer system is on. SRAM is faster and more expensive than DRAM. It uses a matrix of six transistors and no capacitors. As the transistors do not need the power to prevent leakage, hence, there is no requirement to refresh SRAM again and again.

DRAM
DRAM stands for ‘Dynamic Random Access Memory'. DRAM is widely used in computer systems. Previously, there was a single data rate (SDR) DRAM in computers. At present, computers are using a dual data rate (DDR) DRAM. DDR is also available in different versions such as DDR2, DDR3, and DDR4, which are more energy-efficient and are providing better performance.


DRAM is cheap, small and uses less power than other RAMs. DRAM is made up of a transistor and a capacitor in each cell. Because of a capacitor, it has a leakage problem. Therefore, DRAM requires constant refreshing.

ROM

ROM is an acronym of ‘Read Only Memory’. As the name suggests, the data cannot normally be written to it. However, the data can be read from this type of memory. ROM is a primary-non-volatile memory which means that it is capable of retaining the data in the memory even if there is no power supply. 

ROM is a very fast type of computer memory that stores instructions required to start the computer as soon as it is connected to the power source. When a computer is connected to the power, the CPU starts reading the instructions stored in ROM. It does not require support from drivers or any other complex software to load the necessary parts of the operating system in the primary memory.

After that, the computer system boots up and becomes ready to be used. The entire operation is referred to as ‘bootstrap’ and the instructions that ROM contains are called ‘bootstrap code’.

ROM can be further divided into the following subcategories:

MROM
MROM stands for ‘Masked Read Only Memory’. MROM is a type of memory whose contents are pre-programmed with specific functional data by the integrated circuit manufacturer.

PROM
PROM stands for ‘Programmable Read-Only Memory'. As the name suggests, these types of memory are programmable, which means that they can be coded or programmed by the user. PROM is manufactured as a blank memory. The user purchases a blank PROM and enters the set of programs or codes using a PROM programmer. The data or instructions cannot be changed or erased once they are written. 

EPROM
EPROM stands for ‘Erasable Programmable Read-Only Memory’. It is an upgraded version of PROM. Unlike PROM, EPROM allows users to erase the stored data as well as rewrite the data. The data stored in EPROM can be erased by passing ultraviolet light for a particular length of time using an EPROM eraser.  

EEPROM
EEPROM stands for ‘Electrically Erasable Programmable Read-Only Memory’. As the name suggests, this type of memory is programmed and erased electrically. Both programming and erasing of data takes around 4 to 10 milliseconds. EEPROM can be erased and reprogrammed for around ten thousand times. EEPROM can be erased 1 byte at a time, rather than erasing the entire memory at once. Therefore, the entire process is flexible but slow.

Note: RAM and ROM are known as the Primary Memory or Main Memory.


Cache Memory

Cache memory is a very high-speed semiconductor memory that is used to store instances of programs and data frequently accessed by the CPU. It provides faster data storage and access to the CPU. Therefore, when the CPU requests the data and programs, they are quickly transferred from cache memory, so the CPU can access them instantly. CPU does not require accessing the primary memory or the hard disk to fetch the data.

Cache memory generally lies in between CPU and the primary memory (RAM) and it acts as a buffer between CPU and RAM. Cache memory is costlier than the primary memory; however, it saves time and increases efficiency.

There are following types of Cache memory:

Level 1 or Register Cache
Level 1 or L1 cache is defined as the Primary cache because it is a register in the computer microprocessor. It is also called CPU cache or Register cache. Depending on the CPU, the size of the L1 cache may lie in between 2KB to 64KB. The cache controller initially checks for the instructions on the L1 cache when CPU requests for the information from memory. 

Level 2 or Cache
Level 2 or L2 cache is capable of storing more data as compared to the L1 cache. But, it is not as fast as the L1 cache. L2 cache can store around 64KB to 2MB cache. It is located on the CPU or between CPU and DRAM (Main memory). When the CPU does not receive the necessary instructions on the L1 cache, it starts looking into the L2 cache.

Level 3 or Main Memory Cache
Level 3 or L3 cache is an enhanced type of memory available on the motherboard of the computer. L3 cache is capable of storing more data compared to both L1 and L2, but, slower in speed. L3 cache is defined as an extra cache built into the motherboard between the CPU and the main memory to speed up the entire processing operation.

In multicore CPU systems, each core may have separate L1 and L2, but all cores share a common L3. L3 cache which is being used with the processors nowadays has a capacity of around 1MB to 8MB. It has almost double speed when compared to the RAM.

Level 4 or Secondary Memory Cache
Level 4 or L4 cache is a part of an external memory which is not as fast as other types of cache memory. However, the data stored in the L4 cache stays permanently. It is also known as hardware-based cache or disk cache, which means that the reserved portion on a disk is used to store frequently accessed data or instructions. The size of the disk cache ranges from 128MB in standard disks to 1GB in solid-state disks. 

Note- Depending on the type of used cache memory, it can be referred to as primary or secondary.

Virtual Memory

Virtual memory is an area of a secondary memory (e.g., hard disk drive or solid-state drive) that is configured to act as if it were a part of the computer's RAM. The main benefit of using this method is that the programs can be larger than physical memory. 

For example, when a user runs an application on a computer system, the data is stored in the primary memory (RAM). As the primary memory is fast, the CPU quickly accesses the data and start the application quickly. When a user runs a heavy application or when many applications are run at once, the system’s primary memory may become full. In such cases, the data stored in the primary memory which is not being used is temporarily transferred to the virtual memory. It frees up space in the primary memory which is further used by the system to provide smooth performance.

Virtual memory serves following two purposes:

It allows us to add more physical memory by using a disk.
It allows us to add memory protection as each virtual address is translated to a physical address.

Sequential Access Memory

Sequential Access Memory (also called SAM) is a class of data storage devices that read their data sequentially. In other words, the system must search the storage devices from the initial memory location or memory address until it finds the required data. It is also known as Serial Access Memory.  This is in contrast to random access memory (RAM), where data can be accessed in any order. Drum memory is an example of sequential access memory.

External Memory

External memory is usually a kind of memory that is attached to the computer system separately. External memory is also known as ‘Secondary Memory’ or ‘Auxiliary Memory’. These are used to store the data permanently. CPU does not directly access these types of memory. The data is first transferred to the primary memory and then the CPU can access it. This is because the secondary memory is not as fast as primary memory.

Note: The use of secondary storage is not mandatory. Embedded computers, such as those used in a washing machine or central heating system, do not require saving any data when the power is turned off. The instructions required to run such computers are stored in read-only memory (ROM).

The following are the available external memories used in the computer system:


Magnetic Storage Devices

Magnetic storage devices are coated with magnetic material. The data is encoded on the magnetic material in the form of electric current. Magnetic devices use magnetic fields to magnetize tiny individual sections of a metal spinning disk. Each tiny magnetized section represents a binary ONE (1) and each demagnetized section represents a binary ZERO (0). These tiny sections can contain terabytes (TB) of data. These devices are cheap, fast in performance, high in capacity, and durable. Hard disk drive, magnetic tape, and floppy disks are widely used magnetic storage devices.

Solid State Storage Devices

Solid-state storage devices are made up of silicon microchips. These are non-volatile storage devices, which use integrated circuit assemblies as memory to continuously store any information. It can hold the data even after the computer is switched off. These are used as external secondary storage.  

The main advantage of solid-state devices is that it has no moving parts. Due to this, they are portable, produce less heat and last longer. Solid-state storage devices are comparatively faster than the traditional hard disk drives, as the data is stored electrically in silicon chips known as cells. The binary data is kept within the cells by holding an electrical current in a transistor with an On/Off mode. RAM uses the same technique; however, it does not retain the data after the power is disconnected. Unlike RAM, solid-state devices have the ability to store the data even after the power is disconnected. This is possible through the use of a technology known as flash memory.

Solid-state drives (SSD) and USB (Universal Serial Bus) memory sticks or USB flash drive are examples of solid storage devices. Most modern devices are using solid-state storage devices to deliver better and consistent performance. 

Optical Storage Devices

The data stored in optical storage devices can be read/write with the help of the laser beam. These devices contain spinning disc made from metal and plastic. The surface of a spinning disc is scanned by a laser beam. The surface is divided into tracks, and each track contains several flat areas and hollows. The flat areas are called ‘lands’ whereas the hollows are called ‘pits’. Optical storage devices can store a large amount of data.

Optical storage devices include CD-ROM (Compact Disc, read-only-memory), DVD-ROM (Digital versatile disc, read-only-memory), WORM (Write once, read-only-memory), etc.

Types of Computer Memory - Types of Secondary Memory in Computer



Conclusion

As we have discussed, there are several advantages and disadvantages of computer and computer memory is one of the most important amongst them. Because of a computer memory, we can save our data for as long as we want. Additionally, it is one of the important factors for improving the overall speed of the computer system.


What others reading:


Weekly Hits


Latest Tutorial




© 2024 TutorialsMate. Designed by TutorialsMate