Lesson
06 of 26
Translate

Storage, Memory & File Systems

RAM, ROM, cache, Flash, NAND SSD, HDD, FAT32 vs NTFS, magnetic tape, registers, memory hierarchy for UPSSSC AGTA.

Memory Hierarchy

Computer memory is organized in a hierarchy — faster memory is smaller and more expensive, while slower memory is larger and cheaper.

LevelMemory TypeSpeedSizeCost
1 (Fastest)RegistersFastestBytesMost expensive
2Cache (L1, L2, L3)Very fastKB–MBVery expensive
3RAMFastGBModerate
4SSD / HDDModerateTBCheaper
5 (Slowest)Magnetic TapeSlowestTB–PBCheapest

Key Rule: As you go DOWN the hierarchy → speed decreases, capacity increases, cost per GB decreases.


Primary Memory (Main Memory)

Primary memory is directly accessible by the CPU. It is fast but limited in size.

RAM — Random Access Memory

RAM is volatile memory — data is lost when power is turned off. It stores currently running programs and data.

TypeFull FormKey Feature
SRAMStatic RAMFaster, no refresh needed, used in cache, expensive
DRAMDynamic RAMSlower, needs periodic refresh, used as main memory, cheaper
DDRDouble Data RateTransfers data on both edges of clock signal

DDR Generations:

GenerationSpeedCommon Use
DDR3Up to 2133 MHzOlder computers
DDR4Up to 3200 MHzCurrent standard
DDR5Up to 6400+ MHzLatest, high-performance

ROM — Read Only Memory

ROM is non-volatile memory — data is retained even when power is off. It stores permanent instructions like the BIOS/boot program.

TypeFull FormFeature
ROMRead Only MemoryFactory-written, cannot be changed
PROMProgrammable ROMWritten once by user, then permanent
EPROMErasable PROMErased using ultraviolet (UV) light, then rewritten
EEPROMElectrically Erasable PROMErased electrically, byte by byte — used in BIOS chips
Flash MemoryType of EEPROM, erased in blocks — USB drives, SSDs

RAM vs ROM Comparison

FeatureRAMROM
VolatilityVolatile (loses data on power off)Non-volatile (retains data)
PurposeTemporary storage for running programsPermanent storage for boot instructions
SpeedFasterSlower
SizeLarger (4–64 GB typical)Smaller (few MB)
ModifiableRead and writeRead only (mostly)
ExampleDDR4 RAM moduleBIOS chip on motherboard

Cache Memory

Cache memory is ultra-fast memory placed between the CPU and RAM. Its purpose is to bridge the speed gap between the very fast CPU and the slower RAM.

LevelLocationSizeSpeed
L1 CacheInside CPU core32–128 KBFastest
L2 CacheInside CPU (per core or shared)256 KB–1 MBFast
L3 CacheShared among all cores4–64 MBModerate
  • CPU first checks L1 → L2 → L3 → RAM (in order)
  • Cache Hit = data found in cache (fast)
  • Cache Miss = data not in cache, must fetch from RAM (slower)
  • SRAM technology is used for cache (no refresh needed)

Registers

Registers are the smallest and fastest memory units, located inside the CPU itself.

RegisterPurpose
MAR (Memory Address Register)Holds the address of memory location being accessed
MDR (Memory Data Register)Holds data being transferred to/from memory
AccumulatorStores intermediate results of ALU calculations
Program Counter (PC)Holds address of the next instruction
Instruction Register (IR)Holds the currently executing instruction

Secondary Storage

Secondary storage is non-volatile — retains data permanently even without power. It is slower but much larger than primary memory.

HDD — Hard Disk Drive

HDD stores data on magnetic spinning platters with a read/write head that moves across the surface.

  • Magnetic storage technology
  • Moving parts → prone to physical damage
  • Capacity: typically 500 GB – 4 TB
  • RPM (Revolutions Per Minute): 5400 or 7200 RPM
  • Cheaper per GB than SSD

SSD — Solid State Drive

SSD stores data on NAND Flash memory chips — no moving parts.

  • Flash-based storage (NAND technology)
  • No moving parts → shock-resistant, silent, faster
  • Capacity: typically 128 GB – 4 TB
  • Much faster boot and load times than HDD

HDD vs SSD Comparison

FeatureHDDSSD
TechnologyMagnetic plattersNAND Flash chips
Moving PartsYes (spinning disk + head)No moving parts
SpeedSlower (80–160 MB/s)Much faster (500–7000 MB/s)
DurabilityFragile (sensitive to drops)Shock-resistant
NoiseAudible spinning noiseSilent
Power UsageHigherLower (better for laptops)
Cost/GBCheaperMore expensive
LifespanLonger (mechanical wear)Limited write cycles
Boot Time30–60 seconds10–15 seconds

Flash Memory

Flash memory is a type of EEPROM that can be erased and rewritten in blocks. It is the technology behind USB drives, SD cards, and SSDs.

DeviceCapacityUse Case
USB Flash Drive (Pen Drive)4 GB – 256 GBPortable file transfer
SD Card2 GB – 1 TBCameras, phones, tablets
MicroSD2 GB – 1 TBSmartphones, drones
CompactFlashUp to 512 GBProfessional cameras
  • Based on NAND technology
  • Non-volatile — retains data without power
  • No moving parts — durable and portable

Optical Storage

Optical storage uses laser beams to read and write data on reflective discs.

TypeFull FormCapacityLaser Color
CDCompact Disc700 MBRed (infrared)
DVDDigital Versatile Disc4.7 GB (single) / 8.5 GB (dual)Red
Blu-ray25 GB (single) / 50 GB (dual)Blue-violet laser

Disc Types:

  • ROM (Read Only) — factory pressed, cannot be written (commercial movies, software)
  • R (Recordable) — write once (CD-R, DVD-R)
  • RW (ReWritable) — can be erased and rewritten (CD-RW, DVD-RW)

Magnetic Tape

Magnetic tape is the oldest and cheapest storage medium, still used for backup and archival storage.

  • Sequential access only — must read data in order (like a cassette tape)
  • Cannot directly jump to a specific location (unlike HDD/SSD which have random access)
  • Very high capacity (up to several terabytes per cartridge)
  • Used by large organizations for data backup and disaster recovery
  • Extremely low cost per GB

Storage Units

UnitAbbreviationSize
BitbSmallest unit (0 or 1)
ByteB8 bits = 1 Byte
KilobyteKB1024 Bytes
MegabyteMB1024 KB
GigabyteGB1024 MB
TerabyteTB1024 GB
PetabytePB1024 TB
ExabyteEB1024 PB

Exam Tip: 1 Byte = 8 Bits. Remember the sequence: B → KB → MB → GB → TB → PB → EB (each × 1024).


File Systems

A file system is a method used by the operating system to organize, store, and retrieve files on a storage device.

FAT32 vs NTFS vs ext4

FeatureFAT32NTFSext4
Full FormFile Allocation Table 32New Technology File SystemFourth Extended File System
DeveloperMicrosoftMicrosoftLinux community
Max File Size4 GBNo practical limit (16 TB)16 TB
Max Volume2 TB256 TB1 EB
SecurityNo file permissionsFull permissions + encryptionFull permissions
JournalingNoYes (crash recovery)Yes
OS SupportWindows, Mac, Linux, camerasWindows only (read on Mac/Linux)Linux only
Use CaseUSB drives, SD cardsWindows hard drivesLinux systems

Other File Systems:

  • FAT16 — older version, max 2 GB file, used in very old systems
  • APFS (Apple File System) — macOS, iOS; optimized for SSD and Flash storage
  • exFAT — designed for flash drives, no 4 GB limit like FAT32, cross-platform

Exam Favourite: FAT32 cannot store files larger than 4 GB. NTFS supports file permissions and encryption.


Cloud Storage

Cloud storage stores data on remote servers accessed via the internet, instead of local hard drives.

ServiceProviderFree Storage
Google DriveGoogle15 GB
OneDriveMicrosoft5 GB
iCloudApple5 GB
DropboxDropbox Inc.2 GB

Advantages: Access from anywhere, automatic backup, sharing, no physical damage risk Disadvantages: Requires internet, privacy concerns, subscription costs for more storage


Storage Unit Conversion Table

UnitEquivalentApproximate Decimal
1 Nibble4 bits
1 Byte8 bits
1 KB1024 Bytes~1 Thousand Bytes
1 MB1024 KB~1 Million Bytes
1 GB1024 MB~1 Billion Bytes
1 TB1024 GB~1 Trillion Bytes
1 PB1024 TB~1 Quadrillion Bytes
1 EB1024 PB~1 Quintillion Bytes

Exam Favourite: 1 Nibble = 4 bits. 1 Byte = 8 bits = 2 Nibbles. 1 Terabyte = 1024 GB = approximately 1 trillion bytes.


DDR RAM Generations

GenerationData RateVoltageTypical SpeedYear Introduced
DDR1200–400 MT/s2.5V200–400 MHz2000
DDR2400–1066 MT/s1.8V400–800 MHz2003
DDR3800–2133 MT/s1.5VUp to 2133 MHz2007
DDR41600–3200 MT/s1.2VUp to 3200 MHz2014
DDR53200–6400+ MT/s1.1VUp to 6400+ MHz2020

Each DDR generation doubles the data rate, uses lower voltage (more energy efficient), and is physically incompatible with previous slots — DDR4 RAM cannot fit in a DDR3 slot.


SSD Types: SATA vs NVMe

FeatureSATA SSDNVMe SSD
InterfaceSATA III (same as HDD)PCIe (direct to CPU)
SpeedUp to 550 MB/sUp to 3500–7000 MB/s
Form Factor2.5-inch driveM.2 stick (small)
Performance3–5× faster than HDD5–7× faster than SATA SSD
PriceModerateHigher
Best ForBudget upgradesHigh-performance, gaming, workstations

Exam Tip: NVMe (Non-Volatile Memory Express) connects via PCIe and is significantly faster than SATA SSD. Both use NAND Flash technology.


RAID — Redundant Array of Independent Disks

RAID combines multiple physical disks into a single logical unit for improved performance, redundancy, or both.

RAID LevelMethodFeatureMin. Disks
RAID 0StripingFastest speed, no redundancy — if one disk fails, all data lost2
RAID 1MirroringData duplicated on two disks — full redundancy, 50% usable space2
RAID 5Striping + ParityGood balance of speed and redundancy — can survive 1 disk failure3

RAID 0 = speed only (risky). RAID 1 = safety only (expensive). RAID 5 = best of both.


Volatile vs Non-Volatile Memory

FeatureVolatile MemoryNon-Volatile Memory
Data on Power OffLostRetained
SpeedFasterSlower
CostMore expensive per GBCheaper per GB
PurposeTemporary working memoryPermanent storage
ExamplesRAM (SRAM, DRAM), Cache, RegistersROM, Flash, SSD, HDD, Optical discs, Magnetic tape

Access Time Comparison

Memory TypeApproximate Access Time
Register~1 nanosecond (ns)
Cache (L1)~1–5 ns
RAM~50–100 ns
SSD (NVMe)~0.05–0.1 ms (50,000–100,000 ns)
SSD (SATA)~0.1 ms
HDD~5–10 ms (5,000,000–10,000,000 ns)

HDD is approximately 100,000× slower than cache memory. This is why cache and RAM are essential for performance.


Blu-ray Disc Capacity

TypeCapacity
Single Layer Blu-ray25 GB
Dual Layer Blu-ray50 GB
BD-XL (Triple Layer)100 GB
BD-XL (Quad Layer)128 GB

Blu-ray uses a blue-violet laser (shorter wavelength = more data on same disc area). A single Blu-ray holds 5× more than a DVD.


Key Takeaways

  • Memory hierarchy: Registers → Cache → RAM → SSD/HDD → Tape (fastest to slowest)
  • RAM is volatile (data lost on power off); ROM is non-volatile (retains data)
  • SRAM = cache memory (fast, expensive); DRAM = main memory (slower, cheaper)
  • EPROM erased by UV light; EEPROM erased electrically
  • HDD = magnetic platters with moving parts; SSD = NAND Flash, no moving parts
  • SATA SSD up to 550 MB/s; NVMe SSD up to 3500–7000 MB/s via PCIe
  • DDR generations: DDR1 (2.5V) → DDR2 (1.8V) → DDR3 (1.5V) → DDR4 (1.2V) → DDR5 (1.1V) — each doubles data rate, lower voltage, physically incompatible
  • RAID 0 = striping (speed, no redundancy); RAID 1 = mirroring (full redundancy); RAID 5 = striping + parity (balanced)
  • Volatile memory (RAM, Cache, Registers) loses data on power off; Non-volatile (ROM, Flash, SSD, HDD) retains data
  • Access time: Register ~1 ns → Cache ~1–5 ns → RAM ~50–100 ns → SSD ~0.05–0.1 ms → HDD ~5–10 ms
  • Blu-ray: single layer 25 GB, dual layer 50 GB; uses blue-violet laser
  • 1 Nibble = 4 bits; 1 Byte = 8 bits; 1 KB = 1024 bytes; 1 TB = 1024 GB
  • FAT32 max file size = 4 GB; NTFS = no practical limit with permissions
  • Magnetic tape = sequential access, cheapest, used for backup

Summary Cheat Sheet

ConceptKey Details
RAMVolatile, temporary storage for running programs
ROMNon-volatile, stores boot instructions (BIOS)
SRAMStatic RAM — used in cache, fast, expensive
DRAMDynamic RAM — used as main memory, needs refresh
PROMProgrammable ROM — write once
EPROMErasable by UV light
EEPROMErasable electrically
CacheL1 > L2 > L3; bridges CPU-RAM speed gap
HDDMagnetic platters, moving parts, cheap
SSDNAND Flash, no moving parts, fast
Flash MemoryUSB drives, SD cards — NAND technology
CD / DVD / Blu-ray700 MB / 4.7 GB / 25 GB
Magnetic TapeSequential access, cheapest, backup storage
1 Byte8 Bits
FAT32Max 4 GB file size, no permissions
NTFSNo file size limit, permissions, journaling
ext4Linux file system, permissions, journaling
APFSApple’s file system for SSD/Flash
Cloud StorageGoogle Drive (15 GB), OneDrive (5 GB)
DDR1→DDR5DDR1 (2.5V) → DDR2 (1.8V) → DDR3 (1.5V) → DDR4 (1.2V) → DDR5 (1.1V)
SATA SSDUp to 550 MB/s, 2.5-inch, SATA III interface
NVMe SSDUp to 3500–7000 MB/s, M.2 form factor, PCIe interface
RAID 0Striping — fastest, no redundancy, min 2 disks
RAID 1Mirroring — full redundancy, 50% usable space, min 2 disks
RAID 5Striping + Parity — balanced speed & redundancy, min 3 disks
VolatileRAM, Cache, Registers — data lost on power off
Non-volatileROM, Flash, SSD, HDD, Optical, Tape — data retained
Access TimeRegister ~1 ns → Cache ~1–5 ns → RAM ~50–100 ns → HDD ~5–10 ms
Blu-raySingle 25 GB, Dual 50 GB, blue-violet laser
1 Nibble4 bits
1 TB1024 GB (~1 trillion bytes)

Knowledge Check

Take a dynamically generated quiz based on the material you just read to test your understanding and get personalized feedback.

Lesson Doubts

Ask questions, get expert answers

Lesson Doubts is a Pro feature.Upgrade