Types of computer memory | Primary storage devices & secondary storage devices

You are currently viewing Types of computer memory | Primary storage devices & secondary storage devices

Computer memory is that storage devices in which we can store data or information permanently or temporarily.

We can use the data which is stored in the storage devices or computer memory at any time when we need this.

Today, all the personal computers as well as organizational computers are using various types of memory or storage devices to get the highest speed from their computer.

Some storage devices or computer memory gives us very fast speed to retrieve data or store data where other gives very slower speed.

Here is the hierarchy table of computer memory organization.

computer memory, primary storage device, secondary storage device, primary and secondary memory

Types of memory (Storage devices)

There are mainly two types of memory or storage devices in a computer which are given bellow;

  • Primary Memory (Primary Storage Devices)
  • Secondary Memory (Secondary Storage Devices)

Primary Memory (Primary Storage Devices)

Primary memory is also called primary storage devices or main memory of a computer.

A computer can’t start without primary memory. Primary memory is directly connected to CPU.

So, CPU can use this memory directly to retrieve or store data. It gives very fast speed. So accessing data is very easy to primary memory.

Types of Primary Memory

There are 4 main types of primary memory. 4 main types of primary storage devices is given bellow;

  • Registers
  • Cache Memory
  • RAM
  • ROM

1. Registers

A register is a small high-speed primary memory or primary storage device inside the CPU.

Register is used to quickly accept, store and transfer data and instructions that are being used immediately by the CPU (Central Processing Unit).

The register used by the CPU are often termed as processor registers.

Register size determines how much information it can store. The size of register is expressed in bytes and each byte can store one character of data.

A register can be of 1, 2, 4 or 8 bytes. The bigger size of register increases the performance of CPU.

If all other factors are kept equal, a CPU with 4 bytes register can process data twice as fast as one with 2 bytes register. Types of register is given bellow.

Types of register

5 Different types of register is given bellow;

1. Memory address register (MMR)

It is used to stores memory address being used by the CPU. When CPU wants to read and write data in memory, it stores the address of that memory location.

2. Memory buffer register (MBR)

It is used to store the data coming from the memory or going to the memory.

3. Program counter register (PCR)

It is also known as instruction pointer register. This register is used to store the address of the next instruction to be fetched for execution.

When the instruction is fetched, the value of program counter is incremented which now refer to the next instruction.

4. Instruction register (IR)

Once the instruction is fetched from main memory, it is stored in instruction register.

The control unit take instruction from this register. The instruction is also decoded in this register.

5. General purpose register (GPR)

It is used in logical and mathematical operations. These registers are art of ALU. Its size varies from 1 to 4 bytes.

There are several types of general-purpose register also. These are as follows;

2. Cache memory

Cache memory is the fastest primary memory or primary storage devices after register. Cache memory works as a buffer between RAM and the CPU.

Cache memory is also a Random-access memory but it is a special kind of RAM.

Cache memory is known as a static RAM. Cache memory is used to reduce the average time to access data from the Main memory.

Unlike the dynamic RAM which we find inside the normal RAMs, static Ram is quite fast.

Typical size of cache memory is on the range of kilobytes to megabytes. So, the data which is frequently required by the CPU can be supplied by the cache memory.

Generally, some instructions and some data which is required by the CPU is stored inside the cache memory.

Let’s see the different levels of cache memory,

Different levels of cache memory

Different levels of cache memory is given bellow,

  • Level – 1 cache memory (L1 Cache memory)
  • Level – 2 cache memory (L2 Cache memory)
  • Level – 3 cache memory (L3 Cache memory)

1. Level - 1 cache memory (L1 Cache)

It is the tiny amount of cache memory integrated inside the CPU. And for this it is operated as the same speed as the CPU.

The level 1 cache is fastest among all other caches. The typical memory size of the level-1 cache is in the range of 2 kilobytes to 64 kilobytes.

There are two kinds of level-1 cache. One is instruction cache and other is data cache.

Instruction cache store all the instructions which is required by the CPU and the data cache store the data which is required by the CPU.

2. Level - 2 cache memory (L2 Cache)

The level-2 cache memory could be either inside the CPU or outside the CPU.

Now this level-2 cache could be separate for all the ports or it can be share among all the ports of the CPU.

If this level 2 cache is outside the CPU, then it is connected with the very high-speed BUS with the CPU.

The memory size of the level-2 cache is in the range of 256 kilobytes up to 512 Kilobytes. But they are slower than the L1 cache.

3. Level - 3 cache memory (L3 Cache)

All the processors do not have this L3 cache but some higher rate processors have this level-3 cache.

This L3 cache memory is used to enhance the performance of L1 and L2 cache.

This L3 cache is shared among all the ports. It is outside the CPU. The memory size of the level-3 cache is in the range of 1 MB to 8 MB for the higher rate processors.

It is slower than the L1 and L2 cache but still it is faster than the RAM.

As the cache memory is faster than any other memory so you should have asked that why we don’t use cache memory of biggest size instead of few Megabytes.

The simple answer of this question is that cache memory is much more expensive than any other memory.

That is the reason you find only a few MBs of cache memory inside the CPU.

So, when you want to buy a laptop, desktop or even a smartphone you should see the cache memory besides the RAM.

Because this cache memory is one of the main components of the processor to perform with highest speed.

3. RAM (Random Access Memory)

RAM is also a very fast primary memory or primary storage device after cache memory. RAM stands for Random Access Memory.

CPU can access any memory cell directly without accessing it sequentially to the RAM and for this RAM is called random access memory. RAM is a volatile memory.

Volatile memory means that when you power off your computer the data stored in RAM is erased. So, its also called temporary memory.

Main 2 types of RAM

The main 2 types of RAM are..

  • SRAM (Static Random Access Memory)
  • DRAM (Dynamic Random Access Memory)

1. SRAM

SRAM stands for Static Random-Access Memory.

SRAM contains data bits in its memory as long as the power is being supplied and doesn’t need to be refreshed because it doesn’t contain capacitors.

This makes SRAM significantly faster than DRAM. SRAM is used to create CPU cache memory.

Static RAM is rarely used primary memory or primary storage device because it is expensive and has low capacity than DRAM.

2. DRAM

DRAM stands for Dynamic Random-Access Memory. DRAM stores bits in cell consisting of capacitor and transistor needs to be periodically refreshed.

The dynamic RAM forms the largest system RAM space. So, dynamic RAM is mostly used primary memory because it is cheaper and has high capacity than SRAM.

DRAM has also different types like SDRAM, RDRAM, DDR SDRAM etc.

Among these DDR SDRAAM is currently most used which stands for Double Data Rates Synchronous Dynamic Random-Access Memory.

Several visions of DDR is released like DDR, DDR2, DDR3, DDR4 etc. Among these DDR4 is the fastest one.

In addition to the RAM, CPU uses its in-build cache memory to retrieve and store data at extremely fast rate.

CPU cache memory stores frequently used data and instructions.

This cache memory is very small in size. Also, CPU has a register which is very small and faster than any other memory of computer and hold very small data and processor code.

4. ROM (Read Only Memory)

ROM is another type of primary memory or primary storage device. Basically ROM is an integral part of main memory which stands for Read Only Memory.

ROM is called read only memory because you can’t write on this memory.

ROM is non-volatile memory which means that when you power off your computer the data stored in ROM is not erased.

So, its also called permanent memory. ROM contains important system files that requires the system to boot up.

It also perform major input output tasks of any personal computer or organizational computer.

Types of ROM

4 types of ROM is given bellow..

  • MROM (Masked ROM)
  • PROM (Programmable ROM)
  • EPROM (Erasable & Programmable ROM)
  • EEPROM (Electrically Erasable & Programmable ROM)

1. MROM (Masked ROM)

MROM stands for masked read only memory which is very expensive and contains pre-programmed set of data or instructions.

2. PROM (Programmable ROM)

PROM means programmable read only memory. This type of ROM can be modified only once by the user and not erasable.

3. EPROM (Erasable & Programmable ROM)

EPROM means erasable and programmable read only memory. This type of ROM is erasable by exposer of UV light.

3. EEPROM (Electrically Erasable & Programmable ROM)

EEPROM means electrically erasable and programmable read only memory. EEPROM is programmed and erased electrically.

It can be erased and re-programmed about 10 thousand times. Both erasing and programming takes about 4 to 10 milliseconds.

Secondary Memory (Secondary Storage Devices)

Secondary memory or secondary storage devices are not directly connected to the CPU. It is also called external memory.

The computer uses its input/output channel to retrieve information from secondary storage into primary memory.

So it takes more time to access data from secondary memory than primary memory.

The secondary storage is also called non-volatile memory. Because it retains data even after removing the power supply.

Secondary storage devices are important because it stores your data permanently until it deleted.

Secondary storage devices are very cheaper than primary memory. It gives us more storage capacity than primary memory.

But they are significantly slower to read and write than primary memory because they are not connected to CPU directly.

Types of Secondary Memory

4 types of secondary memory is given bellow..

  • Magnetic Tape
  • Magnetic Disk
  • Optical Disk
  • Flash Memory

1. Magnetic Tape

Magnetic tape is one kind of secondary memory or secondary storage devices which is cheaper than any other secondary memory. Magnetic tape is mainly used for backups.

It is slower than other storage devices and allows data to access sequentially. It is made of a long plastic strip which is coated by magnetic materials.

Its use is decreasing day by day because of its slower speed and sequential access.

Types of magnetic tape drive

Main 3 types of magnetic tape drive is given bellow..

  • Open reel tape
  • Cassette tape
  • Cartridge tape

1. Open reel tape

A tape spool is used to this kind of tape. As there have no any protective shell and for this it is called open reel tape.

This tape is about half inch width and divided into 9 parallel tracks. Each track store 1 bit of data where ninth track stores parity checking information.

2. Cassette tape

It looks like an audio cassette which comes with the invention of personal computer.

Former IBM PC has a port to connect cassette machine. There is no more use of cassette tape today.

3. Cartridge tape

It has used the same principle as cassette tape. Two reels is kept inside a plastic box and it has used belt drive system instead of capstan drive system.

Some popular model of cartridge tapes are DC300A, DC600, DC2000 etc.

2. Magnetic Disk

Magnetic disk is one kind of secondary storage device which is non volatile. Magnetic disk is covered by magnetic coating.

We can store various files in it. It can store much data than a RAM or ROM.

A magnetic disk is divided into several (mostly 80) tracks. Each track again divided into 18 sectors.

Thus a magnetic disk is divided in total 1440 sectors and each sector can store 512 bytes data.

An operating system can find a data by the labeling of tracks and sectors called logical formatting.

It relies on a standardized file allocation table which is called FAT.

Types of magnetic disk

There are mainly two types of magnetic disk we use.

  • Hard Disk Drive (HDD)
  • Floppy Disk Drive (FDD)

1. HDD (Hard Disk Drive)

Hard disk is a secondary memory or secondary storage device. It is a permanent magnetic storage device which has the highest capacity among all the storage devices.

Capacity of hard disk is measured in Gigabytes.

It is very important storage device of a computer. Generally, every program or software is installed on this storage device before run.

However, we can run the computer without hard disk. It gives us more speed than floppy disk.

Popular types of HDD

Some popular types of HDD is given bellow.

  • MFM
  • RLL
  • ESDI
  • IDE
  • SCSI
MFM

MFM stands for modified frequency modulation. It is the oldest types of hard disk which has 17 sector per track (SPT).

It gives us a transfer rate of 125/250 Kilobyte per second.

RLL

RLL stands for run length limited. It is more developed than MFM which have 26 sector per track (SPT).

It gives us a transfer rate of 250/350 Kilobyte per second.

ESDI

ESDI stands for enhanced small device interface. This types of hard disks have 26/35/36 sectors per track (SPT).

It gives us a transfer rate of 250/350 Kilobyte per second.

IDE

IDE stands for integrated drive electronics. Comparatively use of IDE hard disk is increasing now a days.

These types of hard disks have 17/35/55/62/63 sectors per track (SPT). It gives us a transfer rate of about 850 Kilobyte per second.

SCSI

SCSI stands for small computer system interface. Use of this hard disk is also increasing.

It gives us faster access and has a data transfer rate of 1.5 to 40 MB per second.

Note : An important thing when install a hard disk is the type of hard disk and hard disk controller must be same.

2. FDD (Floppy Disk Drive)

Floppy disk is a well-known secondary memory or secondary storage device which is not much used anymore.

It is a handheld storage device coated by plastic enclosed in a hard case of plastic. Its storage capacity is very low.

Generally, we use it to install a software, interchanging information, file archiving etc.

Among three types of floppy disk 8’’ floppy disk has no more use today although 5.23’’ mini floppy disk and 3.5’’ micro floppy disk has some use.

3. Optical Disk

Optical disk is also a very popular kind of secondary memory or secondary storage device which can store data permanently.

A light beam is used to read and write data to optical disk. These are comparatively cheaper and can easily transfer from one place to another as it is a removable device.

Data is saved here like a pattern and read when the laser beam of light bounce from its surface.

Types of optical disk

4 types of optical disk is given here.

  • CD
  • DVD
  • BRD
  • HVD

CD (Compact Disc)

CD stands for compact disc. Here data is laid out in a long continuous spiral and stored in the form of lands, which are flat areas on the metal surface.

Although a standard CD can store 650 MB of data or 70 minutes of audio, some of the newer generation of CD can store 700 MB of data or 80 minutes of audio.

Its rotational speed is slower than hard drive and for these CD Rom drives are slower than a hard drive.

Like the track and sectors on a magnetic disk, CD has also the track and sectors.

DVD (Digital Versatile Disc)

DVD stands for digital versatile disc which is a secondary non-volatile storage device. It gives us a random access to its data.

Storage capacity of a DVD is normally 4.7 GB although dual layer DVDs gives us more storage capacity.

BRD (Blue Ray Disc)

BRD stands for blue ray disc which gives us more storage capacity of about 25-50 GB, where double layer Blue Ray disc can store double data.

Generally, BRD is used to store HD videos for their high storage capacity.

HVD (Holographic Versatile Disc)

HVD stands for holographic versatile disc. It can store more data of near about 4 TB although it looks like a DVD.

Holographic storage devices use laser beam to store data in 3 dimensions which increase its capacity to store data.

4. Flash Memory

Flash memory is very popular types of secondary memory or secondary storage device which gives us a faster speed.

We can transfer data using flash memory very easily. It is also non-volatile memory as well as a permanent memory which can store data when the power supply is disconnected.

Memory card and pen drive are two very common types of flash memory we use today. We all know the use of these storage devices today.

The process when CPU needs some data

CPU first looks for required data in its register when need. Then it looks inside cache memory like L1 cache.

If it does not find the data inside the L1 cache then it will find inside the L2 cache then L3 cache.

If the CPU finds the data inside the cache memory, then it is known as the cache hit.

But if data is not available inside the cache, then it is known as the cache miss.

Suppose, if data is not available inside the L3 cache then the CPU will look inside the RAM.

Still if it doesn’t find the data inside the RAM and if it not there, then system input/output channel copy data from secondary memory like HDD to primary memory for further use.

So, when you are starting your computer for the first time or open any application for the first time then that data is not available inside the cache memory or in the RAM.

At that time, the CPU will get the data from the HDD. Once this application is run then if the CPU needs some data, then it will get this from the RAM or cache memory.

Please, let us know your opinion in the comment box bellow. If you have any query then don’t forget to tell us in the comment section bellow.

This Post Has 9 Comments

  1. Aileen

    Ahaa, its fastidious discussion on the topic of this post
    here at this blog, I have read all that, so at this
    time me also commenting here.

  2. Numbers

    Right now it looks like Expression Engine is the top blogging
    platform available right now. (from what I’ve read) Is that what you’re using on your blog?

  3. Lashay

    Hey! I know this is kind of off topic but I was wondering if you knew where I could locate a
    captcha plugin for my comment form? I’m using the same blog platform as
    yours and I’m having problems finding one? Thanks a lot!

  4. Merrill

    Thanks for some other great post. The place else may anyone get that type of info in such
    an ideal means of writing? I have a presentation subsequent week, and I
    am on the look for such info.

  5. Jennie

    Having read this I believed it was very informative.
    I appreciate you taking the time and energy to put this information together.

    I once again find myself personally spending way too much time both reading and commenting.

    But so what, it was still worth it!

  6. new kitchens 2017

    Quality articles or reviews is the secret to attract the
    people to pay a visit the
    site, that’s what this web site
    is providing.

  7. main site

    It’s a shame you don’t have a donate button!
    I’d without a doubt donate to this brilliant blog!

    I suppose for now I’ll settle for bookmarking and adding your RSS feed
    to my Google account.
    I look forward to brand new updates and will talk about this site with
    my Facebook group. Chat soon!

  8. The Stainless

    fantastic and impressive blog site. I actually intend to thank you, for offering us better information.

  9. Tobias

    Hey very interesting blog!

Leave a Reply