Topic 2.1 · Computer Architecture & Kernel Design

Storage Hierarchy & 32-bit vs 64-bit Systems

3 min read1 question to test yourself

1Definition

The Storage Hierarchy arranges computer memory technologies based on access speed, monetary cost per bit, storage capacity, and volatility. System architectures are classified into 32-bit and 64-bit systems based on processor register size, ALU data bus width, and addressable physical memory limits.

2Simple Explanation

Computer memory is structured like a pyramid. At the top of the pyramid are CPU registers and cache—they are blazingly fast and expensive, but extremely small. Below them is main memory (RAM), which is medium speed, volatile, and holds active software. At the bottom is secondary storage (SSDs, hard drives), which is slow and cheap, but retains data permanently when turned off.

The bit-width (32-bit vs 64-bit) determines how wide the CPU's internal memory pipes are. A 32-bit CPU can only write down memory address numbers up to 2322^{32} (4 Gigabytes of RAM). A 64-bit CPU can address 2642^{64} memory addresses (17.1 Billion Gigabytes), unleashing massive performance.

3Real-Life Example / Analogy

  • CPU Registers: The sticky notes in your hand while doing mental math (instant, tiny capacity).
  • CPU Cache: The open notebook on your desk right in front of you (fast, small capacity).
  • Main Memory (RAM): The bookshelf in your study room (medium speed, medium capacity).
  • Secondary Memory (Hard Drive): The public city library down the street (slow access, vast capacity).

4Diagram / Visual Representation

CPU Registers
Fastest · smallest

L1 / L2 / L3 Cache

Main Memory (RAM)

SSD

Hard Disk (HDD)

Optical media / Tape
Slowest · largest capacity

5Working / How It Works

  • Memory Read Cycle: CPU requests data at virtual address -> Checks L1/L2/L3 Cache -> If hit, data returned in 1-5 CPU cycles -> If miss, fetches from RAM (100-200 cycles) -> If page not in RAM, fetches from Disk (millions of cycles).
  • Register Calculations: Operands are loaded from RAM/Cache into CPU registers -> ALU executes instruction in 1 cycle -> Result stored in output register.
  • 32-bit vs 64-bit Execution: A 32-bit CPU fetches 4 bytes per instruction cycle; a 64-bit CPU fetches 8 bytes per instruction cycle, doubling data throughput per cycle.

6Types / Components / Characteristics

Memory Parameter CPU Registers Cache Memory Main Memory (RAM) Secondary Disk
Location Inside CPU Core On-chip / CPU Die Motherboard Slot SATA/NVMe Bus
Access Speed < 1 ns (1 cycle) 1 - 15 ns 50 - 100 ns 50 us - 10 ms
Capacity Bytes / KB Megabytes (MB) Gigabytes (GB) Terabytes (TB)
Cost / Bit Extremely High Very High Moderate Extremely Low
Volatility Volatile Volatile Volatile Non-Volatile
  • Architecture Comparison:
    • 32-Bit System: 32-bit registers, 2322^{32} address space = 4 GB Max Physical RAM limit.
    • 64-Bit System: 64-bit registers, 2642^{64} address space = 17,179,869,184 GB Max RAM limit.
    • Backward Compatibility: 64-bit CPUs run 32-bit and 64-bit OSs; 32-bit CPUs can only run 32-bit OSs.

7Solved Examples / Problems

Problem: Calculate the exact maximum memory address space for a 32-bit system in Gigabytes. Solution: Max Addresses=232=4,294,967,296 bytes\text{Max Addresses} = 2^{32} = 4,294,967,296 \text{ bytes} In Kilobytes (KB)=4,294,967,2961024=4,194,304 KB\text{In Kilobytes (KB)} = \frac{4,294,967,296}{1024} = 4,194,304 \text{ KB} In Megabytes (MB)=4,194,3041024=4,096 MB\text{In Megabytes (MB)} = \frac{4,194,304}{1024} = 4,096 \text{ MB} In Gigabytes (GB)=4,0961024=4 GB\text{In Gigabytes (GB)} = \frac{4,096}{1024} = \mathbf{4 \text{ GB}}

8Advantages, Disadvantages & Applications

  • 64-bit Architecture Advantages: Eliminates 4GB RAM ceiling, allows massive parallel processing, enhances 8-byte graphics calculations, improves application performance.
  • Disadvantages: 64-bit pointers consume slightly more memory space than 32-bit pointers.

9Important Points to Remember

  • Primary storage (Registers, Cache, RAM) is volatile; Secondary storage (HDD, SSD) is non-volatile.
  • Adding extra RAM beyond 4GB to a 32-bit system yields zero performance benefit because the CPU cannot generate addresses above 232−12^{32}-1.

10Test Your Understanding

  1. MCQ: Why does installing 16GB of RAM on a 32-bit operating system fail to increase usable memory beyond 4GB?
    • A) 32-bit motherboard slots are physically too small.
    • B) 32-bit register architecture generates a maximum of 2322^{32} unique memory addresses.
    • C) RAM memory chips are non-volatile.
    • D) 32-bit operating systems do not support multi-threading.
    Show answer
    B.
  2. Conceptual Question: Arrange the following memory types in increasing order of access latency: Main Memory, L1 Cache, Registers, NVMe SSD, L3 Cache.
  3. Application Question: Explain how large 64-bit register sizes accelerate graphics-intensive mathematical applications.

Finished this topic?

0 of 27 topics read in Operating Systems

Handwritten notes for the exam

Unit-wise SPPU notes and PYQs for this subject.

Helpful? Share it with your class

Free for everyone, no login needed.

Share topic