Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
13 views8 pages

Lecture 2

The document provides an overview of computer memory units, categorizing them into primary and secondary memory, and detailing their characteristics, including volatile and non-volatile types. It explains the memory hierarchy, including registers, cache memory, main memory (RAM), secondary storage, and tertiary storage, along with their respective roles and technologies. Additionally, it discusses the differences between static RAM (SRAM) and dynamic RAM (DRAM), their applications, and the organization of memory modules in computer systems.

Uploaded by

nqt978v2qz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views8 pages

Lecture 2

The document provides an overview of computer memory units, categorizing them into primary and secondary memory, and detailing their characteristics, including volatile and non-volatile types. It explains the memory hierarchy, including registers, cache memory, main memory (RAM), secondary storage, and tertiary storage, along with their respective roles and technologies. Additionally, it discusses the differences between static RAM (SRAM) and dynamic RAM (DRAM), their applications, and the organization of memory modules in computer systems.

Uploaded by

nqt978v2qz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

University of Babylon /IT college/SW Dept.

/ Computer Organization /1st class

Memory unit

o The Memory unit can be referred to as the storage area in which programs are kept which
are running, and that contains data needed by the running programs.
o The Memory unit can be categorized in two ways namely, primary memory and secondary
memory.
o It enables a processor to access running execution applications and services that are
temporarily stored in a specific memory location.
o Primary storage is the fastest memory that operates at electronic speeds. Primary memory
contains a large number of semiconductor storage cells, capable of storing a bit of
information. The word length of a computer is between 16-64 bits.
o The most common examples of primary memory are RAM and ROM.
o It is also known as the volatile form of memory, means when the computer is shut down,
anything contained in RAM is lost.
o Cache memory is also a kind of memory which is used to fetch the data very soon. They
are highly coupled with the processor.
o Secondary memory is used when a large amount of data and programs have to be stored
for a long-term basis.
o It is also known as the Non-volatile memory form of memory, means the data is stored
permanently irrespective of shut down.
o The most common examples of secondary memory are magnetic disks, magnetic tapes,
and optical disks.

The unit of information in a computer is a bit. A bit is either 0 or 1. Eight bits make a byte. Storage
capacity of either the RAM or Hard Drive is measured in bytes. The increments in capacity are in
powers of 2 (210 = 1024). Here are some commonly used units:

1 KiloByte (KB) = 210 Bytes


1 MegaByte (MB) = 220 Bytes
1 GigaByte (GB) = 230 Bytes
1 TeraByte (TB) = 240 Bytes
1 PetaByte (PB) = 250 Bytes

2 4 8 16 32 64 128 256 512


0
2 21 22 23 24 25 26 27 28 29

Address contents

1
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

Example/size of memory 1K byte

Size of memory=2k *n
K=Address bits
n=Data bits 0 9 8 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
No. of locations=2k (0……2k-1)
K=log2(2k)
1
Size of memory=1k Byte
=2k *n =210*8
K=10 bit
n=8 bit
No. of locations=210 (0……2k -1)
=1024 location (0…..1023)

210-1
=1023

Memory Hierarchy
Memory hierarchy refers to the organization of computer memory in a system, arranged in levels
based on speed, size, and cost. The primary goal of memory hierarchy is to provide the fastest
possible access to data while minimizing cost. The hierarchy typically consists of several levels,
each with varying characteristics:

1. Registers: Registers are the fastest and smallest type of memory directly accessible by
the CPU. They hold data temporarily during processing. Registers are usually measured in
bytes and are part of the CPU itself.
2. Cache Memory: Cache memory is a small amount of high-speed memory located
between the CPU and main memory (RAM). Its purpose is to store copies of frequently
accessed data and instructions to reduce the average time to access memory. Cache
memory is divided into several levels (L1, L2, L3) based on their proximity to the CPU
and their size, with L1 being the closest and smallest, and L3 being the farthest and largest.
3. Main Memory (RAM): Main memory, or RAM (Random Access Memory), is the
primary storage area for data that the CPU needs to access quickly. It is larger and slower
than cache memory but faster than secondary storage devices like hard drives. RAM is
volatile, meaning it loses its contents when the power is turned off.

2
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

4. Secondary Storage: This level includes storage devices such as hard disk drives
(HDDs), solid-state drives (SSDs), and optical drives. Secondary storage provides a much
larger capacity than main memory but is slower to access. Data is typically transferred
between secondary storage and main memory as needed.
5. Tertiary Storage: Tertiary storage refers to long-term archival storage systems such as
magnetic tape libraries. While tertiary storage offers even greater capacity than secondary
storage, it is even slower to access and is often used for backup and archival purposes rather
than everyday computing tasks.

Storage Technologies
Much of the success of computer technology stems from the tremendous progress in storage
technology. Early computers had a few kilobytes of random-access memory.
Random-Access Memory
Random-access memory (RAM) comes in two varieties—static and dynamic. Static RAM (SRAM)
is faster and significantly more expensive than Dynamic RAM (DRAM). SRAM is used for cache
memories. DRAM is used for the main memory. Typically, a desktop system will have no more
than a few megabytes of SRAM, but hundreds or thousands of megabytes of DRAM.

3
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

Static RAM
Static RAM (SRAM) is a type of volatile semiconductor memory that uses bistable latching
circuitry to store each bit of data. Unlike dynamic RAM (DRAM), which requires periodic
refreshing to maintain its data, SRAM retains its data as long as power is supplied to the system.
SRAM is commonly used in applications requiring fast access and low power consumption, such
as CPU caches and high-speed registers.

Here are some key features of static RAM:

1. Stability: SRAM stores data using flip-flops made of transistors, which remain in their
state (either ON or OFF) as long as power is applied. This eliminates the need for periodic
refreshing, making SRAM faster and more reliable than dynamic RAM.
2. Speed: SRAM offers faster access times compared to DRAM because it does not require
time-consuming refresh cycles. This makes SRAM ideal for applications where fast access
to data is crucial, such as CPU caches and high-performance computing systems.
3. Complexity: The cell structure of SRAM requires multiple transistors per bit, making it
more complex and expensive to manufacture compared to DRAM. However, this
complexity also contributes to SRAM's high speed and stability.
4. Power Consumption: While SRAM consumes less power than dynamic RAM during
normal operation (since it doesn't require refreshing), it still consumes more power than
non-volatile memory technologies like flash memory. As a result, SRAM is commonly
used in applications where power consumption is a concern but not as critical as in battery-
powered devices.
5. Applications: SRAM is commonly used as cache memory in CPUs to store frequently
accessed data and instructions, improving overall system performance by reducing access
latency to main memory. It is also used in networking devices, embedded systems, and
other applications requiring fast, reliable memory access.

Dynamic RAM

Dynamic RAM (DRAM) is a type of volatile semiconductor memory that stores each bit of data
as an electrical charge in a capacitor within an integrated circuit. Unlike static RAM (SRAM),
which uses bistable latching circuitry to store data, DRAM requires periodic refreshing to maintain
the stored information. DRAM is widely used in computer systems for main memory (RAM) due
to its high density and relatively low cost per bit.

Here are some key features of dynamic RAM:

1. Storage Mechanism: DRAM stores data as electric charge in tiny capacitors, typically
arranged in a grid of rows and columns. Each capacitor represents one bit of data. To read
the data, the capacitor's charge is sensed, and to write data, the charge is modified.
2. Refresh Requirement: Unlike SRAM, which retains its data as long as power is supplied,
DRAM cells gradually lose their charge over time due to leakage. Therefore, DRAM
requires periodic refreshing, where the data is read and then immediately rewritten to the

4
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

same cell to restore its charge. This refreshing process is typically performed thousands of
times per second.
3. Slower Access Times: Compared to SRAM, DRAM typically has slower access times due
to the need for refreshing and the more complex circuitry required to read and write data
from the capacitors. However, advancements in DRAM technology have led to faster
access times in modern systems.
4. Higher Density and Lower Cost: DRAM offers higher memory density and lower cost
per bit compared to SRAM, making it suitable for use as main memory in computer
systems. This higher density is achieved by storing data in capacitors, which are smaller
and require less space compared to the transistor-based flip-flops used in SRAM.
5. Power Consumption: DRAM consumes power both during normal operation and during
the refreshing process. However, modern DRAM modules incorporate power-saving
features to reduce energy consumption when not in active use.
6. Applications: DRAM is commonly used as main memory (RAM) in computer systems,
including desktops, laptops, servers, and mobile devices. It is also used in graphics cards,
networking equipment, and other electronics that require relatively large amounts of
volatile memory.

Despite its slower access times and the need for periodic refreshing, DRAM remains the dominant
form of main memory in computer systems due to its high density, low cost, and suitability for a
wide range of applications.

5
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

Memory Modules
DRAM chips are packaged in memory modules that plug into expansion slots on the main system
board (motherboard). Common packages include the 168-pin dual inline memory module (DIMM),
which transfers data to and from the memory controller in 64-bit chunks, and the 72-pin single
inline memory module (SIMM), which transfers data in 32-bit chunks.

Figure 6.5 shows the basic idea of a memory module. The example module stores a total of 64 MB
(megabytes) using eight 64-Mbit 8M × 8 DRAM chips, numbered 0 to 7. Each supercell stores 1
byte of main memory, and each 64-bit doubleword1 at byte address A in main memory is
represented by the eight supercells whose corresponding supercell address is (i, j). In the example
in Figure 6.5, DRAM 0 stores the first (lower-order) byte, DRAM 1 stores the next byte, and so
on.

To retrieve a 64-bit doubleword at memory address A, the memory controller converts A to a


supercell address (i, j) and sends it to the memory module, which then broadcasts i and j to each
DRAM. In response, each DRAM outputs the 8-bit contents of its (i, j) supercell. Circuitry in the
module collects these outputs and forms them into a 64-bit doubleword, which it returns to the
memory controller.
Main memory can be aggregated by connecting multiple memory modules to the memory
controller. In this case, when the controller receives an address A, the controller selects the module
k that contains A, converts A to its (i, j) form, and sends (i, j) to module k.

6
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

Example/A computer uses DRAM with 256K Byte, this memory consists of many chips. The size
of each chip is 128K *?. Give the best organization using"

1- A-Linear array.

2- A Multi-dimensional array

Note /number of rows>=number of columns

A-Linear array.
Chip 1
For Memory
128 k byte
size of memory =256k Byte=218 byte

The total number of Address bits =18 bit Chip 2

The total number of Data bits=8 bit 128 k byte

For chip

The size of chip=128 K=217

The number of chips=size of memory/size of chip

No. of chips =218/217=21=2 chip

The number of addresses for each chip=17bit

The number of Data bits for each chip= The number of Data bits for total memory=8

=========================

B- A Multi-dimensional array

For memory

size of memory =256k Byte=218 byte

The total number of Address bits =18 bit

The total number of Data bits=8 bit

The number of chips=size of memory/size of chip

7
University of Babylon /IT college/SW Dept./ Computer Organization /1st class

No. of chips =218/217=21=2 chip

(512*256)*4

(512*256)*4

7 4 3 0

For each chip

Number of Data bits for each chip=total data bits/No. of chips


=byte/2=8/2=4bit

The size of each chip (array)= 217 =(29*28)*4→(512*256)*4

Number of address bits of Rows (RAS)=9 bit

Number of address bits of Columns(CAS)=8bit

Number of pins=Max(RAS,CAS)=9 bit

You might also like