Computer Architecture : Computer Memory

Computer memory is any physical device capable of storing information temporarily or permanently. Computer memory is an essential component in digital computers since it is needed for storing programs and data. A memory unit is the collection of storage units or devices together. The memory unit stores the binary information in the form of bits.

Types of Memory :

The Memory is primarily categorized in two types :

  • Volatile Memory
  • Non-Volatile Memory

Volatile Memory :  

Volatile memory is a memory that losses its contents when the computer or hardware losses power or switched off. Computer RAM (Random Access Memory) is an example of a volatile memory.

Non-Volatile Memory : 

Non-Volatile Memory is memory that keeps its contents even if the power is lost. EPROM (Erasable Programmable Read-Only Memory)is an example of a Non-Volatile memory.

Memory Hierarchy :

To identify the behavior of various memories certain characteristics are considered. On the basis of their location inside the computer, memory can be placed in four groups 
  • CPU Registers
  • Cache Memory
  • Main Memory  (Primary Memory)
  • Auxiliary Memory (Secondary Memory)

CPU Registers :

A processor Register or simply A Register is a very fast computer memory, used to store data/instruction in-execution. Register is a quickly accessible location available to a computer's central processing unit (CPU). Registers are speed up CPU's operations by providing quick access to commonly used values such as an instruction, a storage address, or any kind of data (such as a bit sequence or individual characters). Registers are the top of the memory hierarchy and are the fastest way for the system to manipulate data. Registers are normally measured by the number of bits they can hold, for example, an 8-bit register means it can store 8 bits of data or a 32-bit register means it can store 32 bit of data. A Register is a group of flip-flops with each flip-flop capable of storing one bit of information. An n-bit register has a group of n flip-flops and is capable of storing binary information of n-bits. A register consists of a group of flip-flops and gates. The flip-flops hold the binary information and gates control when and how new information is transferred into a register. Registers are used to store data temporarily during the execution of a program. Some of the registers are accessible to the user through instructions. Data and instructions must be put into the system.

Cache Memory :

Most computers have another level of IC memory called cache memory. It is placed between CPU registers and main memory. The cache memory is used to store program data which is currently being executed in the CPU. The data or contents of the main memory that are used again and again by CPU, are stored in the cache memory so that we can easily access that data in shorter time. Whenever the CPU needs to access memory, it first checks the cache memory. If the data is not found in cache memory then the CPU moves onto the main memory. It also transfers block of recent data into the cache and keeps on deleting the old data in cache to accomodate the new one. The capacity if a cache memory is less then main memory. But in terms of speed and access time ratio, it is faster than the main memory because some or all of it can reside on the same IC as the CPU. Approximate access time ratio between cache memory and main memory is about 1 to7~10. Cache memories are essential components of high performance computers. 

Main Memory :

The Main Memory size is larger than cache memory and it has very fast speed to access programs and data stored in external memory. It communicates directly with the CPU. The Main Memory is slower compared to CPU registers and cache memory. It is also known as Primary Memory. Main memory is made up of RAM and ROM, with RAM integrated circuit chips holing the major share.

Auxiliary Memory :

Auxiliary memory is much larger in size than main memory but is slower. It normally stores system programs, instruction and data files. It is also known as secondary memory. It can also be used as an overflow/virtual memory in case the main memory capacity has been exceeded. Secondary memories cannot be accessed directly by a processor. First the data/information of auxiliary memory is transferred to the main memory and then that information can be accessed by the CPU. Auxiliary memory usually consists of magnetic disk and tape, which is much less expensive than RAM, but also much slower. Disks are used to store programs and data that are not currently in use. When a program is executed, it is loaded from disk into main memory. The program may then load data from disk into memory for processing. 

Next Topic :

No comments:

Post a Comment