Understanding Computer Memory: Cache, Dynamic Memory, SRAM vs DRAM, and Internal Chip Organization

 Introduction to Computer Memory

What is Computer Memory?

Memory in computers is a system that encodes, stores, and retrieves data or instructions as bits (0s and 1s). It includes components like RAM, cache, and hard drives, enabling the processor to access and process information efficiently.

What is Cache Memory?

Cache memory increases the accessing speed of the CPU. It is not a technique but a memory unit a storage device. In cache memory, recently used data is copied. Whenever the program is ready to be executed, it is fetched from the main memory and then copied to the cache memory. But, if its copy is already present in the cache memory then the program is directly executed.

What is Virtual Memory?

Virtual Memory increases the capacity of main memory. Virtual memory is not a storage unit, its a technique. In virtual memory, even such programs which have a larger size than the main memory are allowed to be executed.

Differences between cache and virtual memory?

Virtual Memory

Cache Memory

Virtual memory increases the capacity of main memory.

While cache memory increase the accessing speed of CPU.

Virtual memory is not a memory unit, its a technique.

Cache memory is exactly a memory unit.

The size of virtual memory is greater than the cache memory.

While the size of cache memory is less than the virtual memory.

Operating System manages the Virtual memory.

On the other hand hardware manages the cache memory.

In virtual memory, the program with size larger than the main memory are executed.

While in cache memory, recently used data is copied into.

It is not as speedy as cache memory.

It is a fast memory.

source: https://www.geeksforgeeks.org/computer-organization-architecture/cache-memory-in-computer-organization/

 

 Internal Organization of a 16×8 Memory Chip

 

 

 

SRAM vs DRAM – Key Differences

Parameter

SRAM

DRAM

Full Form

SRAM stands for Static Random Access Memory.

DRAM stands for Dynamic Random Access Memory.

Component

SRAM stores information with the help of transistors.

DRAM stores data using capacitors.

Need to Refresh

In SRAM, capacitors are not used which means refresh is not needed.

In DRAM, contents of a capacitor need to be refreshed periodically.

Speed

SRAM provides faster speed of data read/write.

DRAM provides slower speed of data read/write.

Power Consumption

SRAM consumes more power.

DRAM consumes less power.

Data Life

SRAM has long data life.

DRAM has short data life.

Cost

SRAM are expensive.

DRAM are less expensive.

Density

SRAM is a low density device.

DRAM is a high density device.

Usage

SRAMs are used as cache memory in computer and other computing devices.

DRAMs are used as main memory in computer systems.

 Read/write operation of Static RAM cell:

Figure 1:A static RAM cell

Read Operation:

In order to read the state of the SRAM cell, the word line is activated to close switches T1 and T2. If the cell is in state 1, the signal on bit line b is high and the signal on bit line b is low. The opposite is true if the cell is in state 0. Thus, b and b’ are always complements of each other. The Sense/Write circuit at the end of the two-bit lines monitors their state and sets the corresponding output accordingly.

Write Operation:

During a Write operation, the Sense/Write circuit drives bit lines b and b’, instead of sensing their state. It places the appropriate value on bit line b and its complement on b’ and activates the word line. This forces the cell into the corresponding state, which the cell retains when the word line is deactivated

Read/write operation of Dynamic RAM cell:

An example of a dynamic memory cell that consists of a capacitor, C, and a transistor, T, is shown in Figure. To store information in this cell, transistor is turned on and an appropriate voltage is applied to the bit line. This causes a known amount of charge to be stored in the capacitor. After the transistor is turned off, the charge remains stored in the capacitor, but not for long. The capacitor begins to discharge.

Write operation:

a voltage is applied on the bit line and a signal applied to the address line to close the transistor. Then the voltage applied on the bit line will transfer to capacitor and store in the capacitor

However, the capacitor has tendency to discharge and has to refresh to maintain the bit.

Reading Operation:

the instruction finds the bit store using the address line to read the data or bit. When the address line is selected, the transistor turns on and the charge stored on the capacitor is fled out onto a bit line and to sense amplifier. Sense amplifiers compare the capacitor voltage to reference value to determine the logic 1 or logic 0. The read out from cell must be restored to complete the operation.

No comments

Theme images by hdoddema. Powered by Blogger.