What is Computer Memory

Computer Memory

In this article you will learn, what is computer Memory ? , Functions Of system Memory , System Memory Hierarchy , What is Primary And Secondary Memory  And Many other important topics related to Computer Memory.  

Table Of Contents

What Is Computer Memory ?

Human brain is super intelligent and amazing organ of our body .  It helps us do all the calculations , make decisions , control all other organs of  the body , store and retrieve information .  Human brain  can  store  information  in  the  brain cells  in  different parts  of  our  brain  and  we  can  also  retrieve  this  information  depending  upon  how  that  information  is  stored  in  our  brain . 

Human brain  can  store  information  in  the  brain cells  in  different parts  of  our  brain  and  we  can  also  retrieve  this  information  depending  upon  how  that  information  is  stored  in  our  brain . 

Human brain  can  store  information  in  the  brain cells  in  different parts  of  our  brain  and  we  can  also  retrieve  this  information  depending  upon  how  that  information  is  stored  in  our  brain . 

Computer System Memory

A  Memory Unit is an essential feature of all computer system . The Computer memory  can store information ( Data ) and instructions ( Computer Program ).  A computer memory  is  the storage space in the computer system where both data and the program instructions are first stored .

A  Memory Unit is an essential feature of all computer system . The Computer memory  can store information ( Data ) and instructions ( Computer Program ).  A computer memory  is  the storage space in the computer system where both data and the program instructions are first stored .

Computer Block Diagram

Computer System Block Diagram

During the program execution , the computer CPU ( Central Processing Unit ) fetches the data and program instructions into the processor’s internal memory and then operates on the data as per program instructions. The Processed data then either sent to the output devises or stored in computer system permanent memory ( Storage Device )  for future use.

Types Of Computer Memory

The computer system makes use of different types memory depending upon the functional requirements .The  system memory  is  mainly  divided  in to  two basic types  based on the  data  retention  by the system memory when the electric  power  is  switched  off  to  the  computer system.

Primary Memory OR Volatile Memory

The  primary  memory  is  also  known  as  Temporary  Memory  OR  Volatile  Memory   OR  Main System  Memory. The primary memory retains the data till the time the computer system is switched on . Once the computer system is switched Off the data will be lost . And therefore this memory is referred as volatile memory OR temporary memory .

(  Example – RAM , CACHE Memory  ).

Secondary Memory OR Non-Volatile Memory

The  Secondary  memory  is  also  known  as  Permanent  Memory  OR  Non-Volatile  Memory   OR  Storage Memory. The Secondary  memory is mainly used to permanently store the data . The secondary memory  retains the data even after  the  computer system is switched off and electric power is disconnected . And therefore ,this memory is referred as Non-volatile memory OR Permanent memory . 

(  Example : Hard Disks , CD ROM Disks , Pen Drives  ).

www.learncomputerscienceonline.com

In a computer system , different types of memories are used  which are part of the overall system memory unit . These different types of memories are organized in hierarchical order to optimize the CPU performance.  

This  hierarchical arrangement of  different types  memory storages used in  computer architecture is called the memory hierarchy. The memory hierarchy in a computer system is  designed  in such a manner that CPU can quickly access the data and the program instructions . This hierarchical memory arrangement significantly improves CPU  performance .  

Hierarchy

The  CPU  can process the data and instructions  at a very high  speed  as  compared  to the  speed of  the  data  that can be accessed  by the CPU from  the  disk  (  permanent / secondary  )  memory  which  limits the CPU  performance . And therefore ,  intermediate  high speed memories ( Cache Memories L1 , L2 , L3 )  are placed in between  the CPU  and  the disk memory to enhance the CPU performance by providing quick data access .

As shown in the memory hierarchy diagram , the computer system memory unit consist of different types of memories arranged in hierarchical order . The CPU registers are the fastest , smallest and closest to the CPU . 

Whereas the the secondary memory ( disk memory ) is the  slowest in data access speed , largest in memory capacity and farthest from the CPU in a typical system memory hierarchy.

Computer Memory Hierarchy
Computer Primary And Secondary Memory

Computer Primary Memory

The primary memory in a  computer system  is  also called  as  main  system memory  . The main memory stores the data in  RAM – Random Access Memory  of  the computer system  which is  a volatile memory

In order to execute any program , the computer program and the data must be first loaded into the RAM . The memory resource is managed by the operating system . The computer CPU starts fetching data and program instructions from the RAM during the program execution.

The RAM ( Random Access Memory )  is the main memory of any computer system .The RAM is  directly readable by the Central Processing Unit ( CPU ) of a computer system. Every computer system must have a  RAM . The RAM  module  is   installed into the motherboard slots of a computer system.  Additional  RAM  modules can  be added  to  the  system   to  increase  the size of the  main memory  available  to  the  computer system.

Computer Secondary Memory

The  secondary memory  is  also alternately referred as permanent memory Or Non volatile memory Or disk memory and  used  to store  the programs and data  on a long-term basis. The commonly used  secondary storage  devices  are  the  hard  disk  and optical disks

The  secondary memory  is  also alternately referred as permanent memory Or Non volatile memory Or disk memory and  used  to store  the programs and data  on a long-term basis. The commonly used  secondary storage  devices  are  the  hard  disk  and optical disks .

Primary And Secondary Memory

The  storage  capacity  of the  hard disk is very high as compared to the RAM . The  common size  of the  RAM  is  generally  4 GB   to  16  GB  whereas  the  common  hard disk size  is  250 GB  to  1 TB ( 1024 GB ) , 5 TB  . However  , the data access speed of the secondary  ( disk memory )  is  very slow  as compared to the  data access speed .of the main memory RAM.

What Is Cache Memory ?

The Cache memory is a small-sized high speed volatile system memory that provides high-speed data access to a processor . The cache memory stores the frequently used computer programs, applications and the program data. 

The cache memory  is the fastest memory in a computer and can be used in three levels ( L1, L2 And L3 ) depending upon system architecture. The L2 cache is generally integrated onto the motherboard and L1 cache is directly embedded in the processor chip . The L3 cache  into the  main memory module RAM – Random Access Memory.

www.learncomputerscienceonline.com

Read Only Memory ( ROM )

In  computer architecture,  a  computer system  makes the use of different types of memories  arranged in a hierarchical order . These memories can be classified as Volatile and Non-Volatile memory  depending upon  the  ability of the  memory  to retain the  data  when  system power supply is switched  off .

The  ROM   stands  for  Read  Only  Memory  which  is  a  non-volatile  memory  that  means  the  contents  of the  ROM  will not be lost  even if the computer system supply  is   switched  off .The  ROM  chip  is  type  of  IC  ( Integrated Circuit  )  chip  in  which  the  data  and  program  is  embedded  by the  chip  manufacturing company . Example :  A   BIOS chip  which  BIOS routines  used  in booting process. 

Read Only Memory ROM

Computer Memory Units

The computer system memory is a crucial resource within a computer system . The computer operating system is responsible to manage this crucial resource. The operating system allocates the required memory to the various processes running on a computer system .The computer system memory is measured using different types of standardized measurement units .

In computing world , a bit represents a 1 memory cell which stores either Binary 1 ( One ) Or 0 ( zero ) .The Byte is  the least measure unit of memory which consist of 8 Bits . The most commonly used data storage units are expressed in terms of multiple of Bytes .

Computer Memory Units

Memory Organization

The  Computer system makes use Of main system memory ( RAM )  to hold  the  programs being executed  and the data associated with these programs on which CPU operates.

The memory is divided into large number of small parts called cells ( 1 Cell = 8 Bits = 1 Byte )  . Each  memory  location or cell has a unique address which starts from zero to memory size minus one. For example if computer has 64 kb words, then  this memory unit has 64 * 1024 = 65536 Bytes cells / memory locations. The address of these locations varies from   0  to  65535.

Learn Computer Science

In computing , with reference to memory organization, a word is defined as specific number of  bits which can be processed  together ( i.e. in one attempt )  by  the  processor . Alternatively , we can say that a Word defines the amount of data in terms of number of bits that can be transferred between the CPU  and  main memory RAM  in  a  single operation.

In this example , the memory word size is 16 Bits . That means the 16 Bits of data can be transferred between CPU and main memory RAM in single operation.

Memory Organization

The  memory  is  generally  organized  as array  of  bytes  (  1 Byte  =  8 Bits  )  and  each  byte  represents  a  memory  location  with  its unique  memory  address  .    The  memory  can  also  be  organized  as  word  addressable  and  each  word with unique  memory  address  . However  the  memory  address numbers  for  each  word  will  be decided  depending upon  the  word  size  (  32 Bit  word  OR  64  Bit  word  ) as shown in this example.

The  program  execution starts when it is loaded in to the RAM by the operating system  . The Operating system   allocates  the required memory for the program execution . The  program  loaded into  the RAM  is  a  set  of  machine code  instructions  in  binary consisting of only 0 and 1 .

World Addressable Memory

The Memory ( RAM ) is composed of bits, groups of   8 bits  which form a 1 byte . Each  byte can be addressed with unique memory address number  and   hence  byte  is a smallest addressable  memory  unit

How CPU Executes Program Instructions ?

The Operating System initiates the program execution by loading the program instructions and associated data into the main system memory ( RAM ) . The CPU ( Central Processing Unit ) fetches these program instructions and data from main memory RAM into first intermediate Cache memory and finally into the CPU Registers which is a internal memory of the processor.

How CPU Executes Program Instructions
Central Processing Unit CPU

The CPU performs the operation on the data as per the program instructions . Once the data is operated , the processed data is sent back to the main memory RAM for further action . At this stage the processed data can be either transferred into permanent storage ( disk memory ) or sent to device such as printer or system monitor for the user .

Don`t copy text!