Tujuan Pembelajaran

🏗ïļ

Memahami Hierarki Memori

Mengenal level-level memori dari cache hingga secondary storage

⚡

Prinsip Cache Memory

Memahami konsep temporal & spatial locality dalam caching

📊

Analisis Performa Cache

Mampu menghitung hit ratio, miss penalty, dan effective access time

ðŸ’ū

Teknologi Memory

Mengenal berbagai teknologi RAM, ROM, dan storage modern

Hierarki Memori Komputer

Hierarki memori mengorganisir berbagai jenis memori berdasarkan kecepatan, ukuran, dan biaya.

🚀

Registers

CPU Internal Storage

Size: 1-2 KB
Speed: 0.1-1 ns
Cost: Highest
⚡

Cache Memory

L1, L2, L3 Cache

Size: 1-32 MB
Speed: 1-10 ns
Cost: Very High
ðŸ’ū

Main Memory (RAM)

Primary Storage

Size: 4-64 GB
Speed: 10-100 ns
Cost: Medium
ðŸ’ŋ

SSD Storage

Secondary Storage

Size: 256 GB-4 TB
Speed: 10-100 Ξs
Cost: Low
ðŸ–ī

HDD Storage

Tertiary Storage

Size: 1-16 TB
Speed: 1-10 ms
Cost: Lowest

Cache Memory Simulator

Cache Structure

Access Flow

1
CPU requests memory address
2
Check cache for data (Hit/Miss)
3
If miss, fetch from main memory
4
Update cache and return data
Hit Ratio
0%
Cache Effectiveness
Miss Ratio
0%
Cache Inefficiency
Access Time
0 ns
Average Latency
Total Accesses
0
Memory Operations
Cache simulator ready...

Teknologi Memory Modern

🚀

SRAM (Static RAM)

  • Use Case: Cache Memory
  • Speed: 1-10 ns
  • Volatility: Volatile
  • Cell Size: 6 transistors
  • Power: High (static current)
⚡

DRAM (Dynamic RAM)

  • Use Case: Main Memory
  • Speed: 10-100 ns
  • Volatility: Volatile
  • Cell Size: 1 transistor + capacitor
  • Power: Medium (refresh needed)
ðŸ’ū

Flash Memory

  • Use Case: SSD Storage
  • Speed: 10-100 Ξs
  • Volatility: Non-volatile
  • Cell Types: SLC, MLC, TLC, QLC
  • Endurance: Limited write cycles
🔄

NVMe SSD

  • Use Case: High-speed Storage
  • Speed: 10-50 Ξs
  • Interface: PCIe
  • Protocol: NVMe
  • Throughput: 2-7 GB/s

Latihan Praktikum

Cache Hit Ratio Analysis

Calculation

Scenario: Sebuah sistem komputer memiliki cache dengan karakteristik berikut:

  • Cache access time: 2 ns
  • Main memory access time: 20 ns
  • Hit ratio: 85%

Pertanyaan: Hitung effective access time sistem tersebut!

Memory Hierarchy Optimization

Analysis

Scenario: Sebuah aplikasi database sering mengakses data yang sama berulang kali.

Pertanyaan: Strategi apa yang dapat digunakan untuk mengoptimalkan performa memory hierarchy?

Cache Mapping Techniques

Comparison

Scenario: Bandingkan tiga teknik cache mapping:

Pertanyaan: Apa kelebihan dan kekurangan dari Direct Mapping, Fully Associative, dan Set Associative?