FCA2
FCA2
2. Secondary Memory
This is your computer’s permanent storage – where all your files, apps,
and the operating system live.
It's slower than primary memory but keeps data even when power is off.
Example: Hard Drives (HDDs), Solid State Drives (SSDs).
Think of it as:Your computer’s filing cabinet.
CLASSIFICATION BASED ON STORAGE PURPOSE
3. Tertiary Memory
This is used for backups and archiving – to store data that’s not needed
often.
It's even slower and sometimes needs to be manually loaded.
Example: Magnetic Tapes, CDs/DVDs
Think of it as: Long-term storage or a warehouse for old files.
TYPES OF MEMORY
Type Function Example
Magnetic storage Long-term data storage (using magnetic disks) Hard Disk Drive (HDD), Floppy Disk
for files and programs
Stack Keeps track of what happens during program Call Stack, Execution Stack
execution.
Register Super fast memory inside the CPU. CPU Registers: Program Counter
(PC), Accumulator
REGISTER MEMORY
Register Full Name Function Typical Size
Name
Memory Address Holds the memory address of the data or instruction that needs 32 bits (4 Bytes)
MAR
MDR or
Register
Memory Data CACHE MEMORY
to be accessed.
Levels
L1 Cache Fastest, smallest cache directly in the CPU. Used for most frequently accessed
data.
L2 Cache Larger and slower than L1. Often on the CPU chip.
Stores recently used data not in L1.
L3 Cache Shared among CPU cores. Larger and slower than L2. Improves performance in multi-core
systems.
Term What It Does Extra Info
Direct-Mapped
CACHE MEMORY
Cache Mapping Technique
Each memory block maps to one cache line only Easy but can cause more "misses"
Cache
Fully Associative Data can go in any cache line. Fewer cache misses, but more
Cache complex.
N-Way Set- Data can go to one of N possible cache lines in a set. Balanced speed and efficiency. Most
Associative Cache commonly used in CPUs.
Locality of Reference: is a key concept that explains and justifies the structure of the memory
hierarchy—especially cache, main memory, and virtual memory.
It supports why data is organized across faster and slower layers, based on access patterns, and is crucial
for understanding cache effectiveness and performance optimization.
1. Temporal Locality Recently accessed data is likely to be accessed again soon
2. Spatial Locality Data near recently accessed memory is likely to be accessed soon
DYNAMIC RANDOM ACCES
MEMORY (DRAM)
DRAM
DRAM stands for Dynamic Random Access Memory.
It’s the main memory used in most computers, phones, tablets, and other
devices.
It is volatile, meaning it loses all data when power is turned off.
DRAM temporarily stores the data and instructions that the CPU needs
while running programs.
Key Features of DRAM: Volatile, High capacity, Slower than SRAM, Requires
refresh circuits.
There are two main types: Asynchronous DRAM and Synchronous DRAM
(SDRAM).
TYPES OF DRAM
Asynchronous DRAM:
Operates without syncing to the CPU clock, leading to slower access times
and increased latency.
Common in older computer systems before the rise of SDRAM.
Has a basic control interface but requires more wait states for CPU
interaction.
Less suitable for modern multitasking and high-speed applications.
Replaced by faster, clock-synchronized memory like SDRAM and DDR.
TYPES OF DRAM
SDRAM (Synchronous DRAM):
Operates in sync with the CPU clock, enabling faster and more predictable data access
than traditional DRAM.
Supports pipelining, allowing multiple instructions to be queued, improving throughput.
Offers faster access times and lower latency, making it suitable for modern computing
systems.
Commonly used in main system memory (e.g., DDR2, DDR3, DDR4, DDR5) for desktops,
laptops, and servers.
Timed operations enhance performance stability and multitasking efficiency.
DDR (Double Data Rate) SDRAM variants transfer data on both clock edges, increasing
bandwidth and reducing power usage.
DRAM
Advantages Disadvantages
Can store large amounts of data Volatile – data is lost when power is off
Compact – fits more memory in smaller space Requires refreshing thousands of times per second
Widely used – compatible with most systems Consumes more power during refresh operations
Easy to upgrade or expand in most computers Needs extra control circuitry for refresh timing
HOW DRAM WORKS
DRAM stores each bit of data using a capacitor and a transistor.
A charged capacitor = 1, and an uncharged capacitor = 0.
Capacitors leak charge over time, so DRAM must refresh data thousands
of times per second.
manages data
This is done automatically by the memory controller. flow to and from
the computer's
Data is accessed using a grid of rows and columns: main memory
The system selects a row (Row Address Strobe or RAS),
Then a column (Column Address Strobe or CAS),And then reads or writes
data at that intersection.
DRAM
Why It Matters:
Each generation of DDR SDRAM is faster, uses less energy, and offers more
bandwidth than the one before.
They are not backward-compatible, meaning you can't mix different
generations on the same motherboard.
Today’s most used types in consumer devices (Laptop, Desktop PC) are
DDR4 and DDR5, while LPDDR (Low Power DDR) 5 is used in
smartphones for better battery life.
VIRTUAL MEMORY
Term What It Does Extra Info
Direct Addressing Uses a specific memory address. MOV A, 100 (Load from 100)
Indirect Addressing Uses a register holding the memory address. MOV A, (B) (Load from B’s address)
Indexed Addressing Uses a base address plus an index for arrays. MOV A, (100 + I) (Access array)
Stack Addressing Uses the stack for storing/retrieving values. PUSH A (Store A on stack)
UNITS OF MEASUREMENTS
UNITS OF MEASUREMENT IN COMPUTING
Understanding computing units is essential for evaluating storage, memory, and
system performance.
Basic Units of Measurement
Bit (b): The smallest unit of data, representing 0 or 1.
Byte (B): A group of 8 bits, commonly used to store a single character.
Kilobyte (KB): 1,024 bytes, used for small files like text documents.
Megabyte (MB): 1,024 KB, used for images and audio files.
Gigabyte (GB): 1,024 MB, common for device storage.
Terabyte (TB): 1,024 GB, used for large-scale storage.
Petabyte (PB): 1,024 TB, used in data centers and cloud storage.
Exabyte (EB): 1,024 PB, used for massive data processing applications.
CONVERSION BETWEEN UNITS
From Larger to Smaller Units (Divide by 1,024 each step)
Example 1: Convert 2 GB to MB→ 2 GB × 1,024 = 2,048 MB
Example 2: Convert 1 TB to GB→ 1 TB × 1,024 = 1,024 GB
Example 3: Convert 0.5 MB to KB→ 0.5 MB × 1,024 = 512 KB
From Smaller to Larger Units (Divide by 1,024 each step)
Example 1: Convert 10,240 KB to MB→ 10,240 KB ÷ 1,024 = 10 MB
Example 2: Convert 5,120 MB to GB→ 5,120 MB ÷ 1,024 = 5 GB
Example 3: Convert 2,048 GB to TB→ 2,048 GB ÷ 1,024 = 2 TB
UNITS OF MEASUREMENT IN COMPUTING
WORD
In computer architecture, a word is a unit of data with a defined bit length that a CPU can process, move,
and store in one operation.
The word length typically corresponds to the width of the CPU’s data bus, allowing a full word to be
transferred between memory and CPU registers efficiently.
A word can contain:
An instruction
A memory address
Application data (e.g., integers, characters)
The bit length of a word is typically a multiple of 8 bits (1 byte), aligning with byte-based architectures.
Examples of Word Lengths:
16-bit system (e.g., early Intel PCs): Word = 16 bits (2 bytes)
32-bit system (e.g., IBM System/360): Word = 32 bits (4 bytes)
64-bit system (modern CPUs): Word = 64 bits (8 bytes)
WORD SIZE
Word Size (also called word length) refers to how many bits the CPU can process in a single
operation.
A larger word size allows the CPU to process more data per cycle, improving overall
performance.
Impact on Performance:
Faster Data Handling: A bigger word size means the CPU can process more data at
once, speeding things up.
More Memory Access:
32-bit system: Can address up to 232 = 4 GB of memory.
64-bit system: Can theoretically address up to 264 bytes (16 ExaBytes), though practical
limits are lower due to OS and hardware constraints.
Better Software Performance: 64-bit software can utilize more memory, enabling
more complex applications and multitasking.
ADDRESSABLE MEMORY SPACE
This refers to the total memory capacity the CPU can address, which is
determined by the word size and addressing capability.
32-bit CPUs: Up to 4 GB of addressable space.
64-bit CPUs: Can support much more memory (theoretically up to 16 EB).
Memory Limitations:
Operating System and Hardware: May cap usable memory below theoretical limits.
Cost: Larger memory configurations are more expensive.
Software Design: Some applications are not optimized for or capable of handling
large memory sizes.
QUIZ
1. Which type of memory is the fastest but has the least storage capacity?
a) RAM
b) Cache
c) Registers
d) Hard Disk
2. What is the primary purpose of virtual memory?
a) To store frequently accessed data
b) To extend RAM by using storage as temporary memory
c) To replace cache memory
d) To improve CPU speed
QUIZ
3. What is the main reason cache memory improves performance?
a) It is larger than RAM
b) It stores frequently accessed data close to the CPU
c) It has unlimited storage capacity
d) It replaces secondary storage
4. Which memory type retains data even when the computer is turned off?
a) RAM b) ROM c) Cache d) Register
5. What unit of memory is typically used to measure the storage capacity of
hard drives?
a) Kilobytes b) Megabytes c) Gigabytes d) Bits
QUIZ
6. Convert the following unit of measures?
a) 2 GB to KB
b) 200 KB to b
c) 2 TB to MB
d) 1000000000B to GB
REFERENCE
Englander, I. (2014). The Architecture Of Computer Hardware, Systems Software, &
Networking. (5th Edition). John Wiley & Sons, Inc.
Silberschatz A., Galvin P.B., & Gagne G. (2018). Operating System Concepts. (10ed).
John Wiley & Sons, Inc.
Stallings, W. (2020). Computer Organization and Architecture. Pearson.
Tanenbaum, A. S. (2016). Structured Computer Organization. Pearson.
UNIT 2 END