VARIOUS TYPES OF MEMORY IN COMPUTER ARCHITECTURE

Rashandeep singh
4 min readDec 20, 2020

--

The purpose of memory is to store programs and data in the digital form. Several types of memory are used in computer forming a memory hierarchy. Each plays a specific role contributing to the speed, cost effectiveness, portability, etc.

Memory hierarchy consists of:

· Register

· Cache memory — L1, L2, L3

· Main memory — RAM and ROM

· Magnetic disk/ hard disk

· Removable media (magnetic tape)

We need various types of memory in computer because we want fast memory for operations and cheap memory for storage.

Memory is of 3 types:

· On-chip memory– present inside CPU. For eg. Register and L1 cache

· Internal memory– present on motherboard. For eg. RAM

· External memory- connected to motherboard. For eg. Hard disk

REGISTERS

· They are present inside the processor.

· They are set of flip flops.

· They are used to store data and address inside the processor.

· They are small in size and faster devices.

PRIMARY MEMORY

· It is original form of memory and also called main memory.

· It consists of RAM and ROM. We need both in computer. RAM dominates primary memory. Both are semi-conductor memories.

· RAM

o It stands for Random Access Memory.

o It is temporary, readable and writeable hence we can day-to-day operations.

o We need power supply for it so it is volatile in nature.

o Every file that we access from secondary memory is first loaded into RAM.

o To provide large amount of working space RAM is typically 4GB — 8GB.

o RAM is of 3 types-

Ø SRAM- static RAM, it is faster, uses flip flops and is more expensive.

Ø DRAM- dynamic RAM, it uses capacitors, slower than SRAM.

Ø SDRAM- synchronous dynamic RAM.

· ROM

o It stands for Read Only Memory.

o We cannot write.

o Information stored is permanent.

o It does not need any power supply so it is non-volatile or permanent in nature.

o It is typically of 2MB-4MB in size.

o Need of ROM- OS is stored in hard disk. When computer starts, OS has to come into RAM. We need a program that copies this, that is called Booting program or BIOS. BIOS is stored in ROM.

o ROM is of 3 types-

Ø PROM- Programmable Read Only Memory; It can be programmed once as per user requirements.

Ø EPROM- Erasable Programmable Read Only Memory; The contents of the memory can be erased and store new data into the memory. In this case, we have to erase whole information.

Ø EEPROM- Electrically Erasable Programmable Read Only Memory; in this type the contents of a particular location can be changed without effecting the contents of other location.

Suppose we need media file in computer. So to increase storage, we got secondary memory.

SECONDARY MEMORY

· Its biggest component is Hard disk. This is where all files are stored in computer.

· It is writeable as well as non-volatile.

· Disk memories are slower than chip memories but are much cheaper.

· Typical size is 1TB.

PORTABLE SECONDARY MEMORY/ REMOVABLE MEDIA

· These are required to physically transfer files between computers.

· Floppy Disk: It is a magnetic form of storage. Typical Size is 1.44 MB.

· CD: It is an optical form of storage. Typical Size is 700 MB.

· DVD: It is an optical form of storage. Typical Size is 4.7 MB.

· Pen Drives & Memory Cards:

o It is a semi-conductor form of storage.

o It is composed of FLASH ROM.

o It’s a special type of ROM that’s writable as well as non-volatile.

o Typical Size ranges from 1 GB — 64 GB depending upon the cost.

RAM consists of DRAM. Without having SRAM in RAM, we got small amount of SRAM between processor and main memory called cache memory. Cache memory was introduced to increase the speed of processor.

CACHE MEMORY

· It is the fastest form of memory as it uses SRAM (Static RAM).

· The Main Memory uses DRAM (Dynamic RAM).

· SRAM uses flip-flops and hence is much faster than DRAM which uses capacitors.

· But SRAM is also very expensive as compared to DRAM.

· Hence only the current portion of the file we need to access is copied from Main Memory (DRAM) to Cache memory (SRAM), to be directly accessed by the processor.

· This gives maximum performance and yet keeps the cost low.

· Typical size of Cache is around 2 MB — 8MB.

· Cache is of 3 types-

o If code and data are in the same cache then it is unified cache else it’s called split cache.

o Depending upon the location of cache, it is of three types: L1, L2 and L3.

o L1 cache is present inside the processor and is a split cache typically 4–8 KB.

o L2 is present on the same die as the processor and is a unified cache typically 1 MB.

o L3 is present outside the processor. It is also unified and is typically of 2–8 MB.

A processor never operates on secondary memory as it is very slow but information is stored in it. OS also operates on RAM. If we double click on movie we want to play, it first gets copied into from secondary memory into main memory through virtual memory. Whole movie is not copied. From secondary memory pages will come one by one in main memory. RAM gets full at some time.

--

--

Rashandeep singh
Rashandeep singh

Written by Rashandeep singh

Well-versed in various programming languages like C,C++,Python and Data Structures , Web Development. Pursuing B.E. focused in CSE

No responses yet