COMP30660 Memory Bart Edit

Memory Module Overview

Module Coordinator: Asst. Prof. Madhusanka Liyanage

Lecturer: Dr. Bart Siniarski

Course: COMP 30660: Computer Architecture and Organization (CONV)

Learning Objectives

  • Understand what memory is and why it's important in computer architecture.

  • Learn about different types of memory: internal and external.

  • Analyze how different types of memory relate in a memory hierarchy.

  • Discuss the efficiency of various memory types and their roles.

Concept of Memory

Digital computers use something called the stored-program concept, introduced by John von Neumann. This means that both data and instructions (the programs) are kept in memory. This allows the CPU to access everything it needs to execute tasks. Memory is crucial for storing both program instructions and data so that the CPU can perform calculations and process information efficiently. Different types of memory are needed to handle various tasks effectively.

Von Neumann Architecture Components

  • Input Devices: Tools like keyboards and mice that help users input data into the computer.

  • Central Processing Unit (CPU): The main part of the computer where calculations happen, consisting of these units:

    • Control Unit (CU): Directs the CPU operations and manages instruction execution.

    • Arithmetic/Logic Unit (ALU): Performs arithmetic and logical operations.

    • Registers: Fast storage within the CPU for quick access to data and instructions.

    • Memory Unit: Main storage for data and instructions central to CPU operations.

Memory Categories

  1. Internal Memory (Primary Memory)

    • Used directly by the CPU for tasks. Fast access but limited storage.

    • Example: RAM (Random Access Memory) which temporarily holds active data.

  2. External Memory (Auxiliary/Secondary Memory)

    • Provides large-scale storage for software and persistent data.

    • Examples: Hard drives, SSDs, CDs which are slower than internal memory but crucial for saving data long-term.

Memory Hierarchy

Different types of memory are organized by their speed, size, and cost:

  1. Registers: Fastest but very limited in size.

  2. Cache Memory: Quick but smaller capacity for frequently accessed data.

  3. Main Memory (RAM): Slower than cache but has more capacity for active data.

  4. Magnetic Disk: Used for bulk storage, slower than RAM but essential for large data storage.

  5. Removable Media: External storage like flash drives used for archiving and backups.

Memory Access Methods

  • Random Access: Any memory location can be accessed at high speed.

  • Sequential Access: Data is accessed in a set order, which can take longer.

  • Direct Access: Quickly retrieves data from specific locations, improving efficiency.

Memory Types

  • Volatile Memory: Loses data when powered off (e.g., RAM).

  • Non-Volatile Memory: Retains data without power (e.g., ROM).

Cache Memory Functionality

Cache memory helps speed up processes by using recently accessed data, based on:

  • Temporal Locality: Repeated access of the same data.

  • Spatial Locality: Accessing data near each other.

  • Sequential Locality: Accessing data in a predictable sequence.

Performance Metrics

  • Hit Ratio: The success rate of accessing cache memory compared to the main memory.

  • Average Memory Access Time (AMAT): Calculation of how quickly data can be accessed, accounting for both hits and misses.

Types of RAM

  1. DRAM (Dynamic RAM): Slower and needs refreshing.

  2. SRAM (Static RAM): Faster and does not require refreshing, suitable for cache.

  3. NVRAM (Non-Volatile RAM): Retains data without power.

Virtual Memory

Uses hard drive space to act like extra RAM, allowing more programs to run. However, too much use can slow down the system.

Types of ROM

  1. PROM: Can be programmed once.

  2. EPROM: Can be reprogrammed using UV light.

  3. EEPROM: Allows changes without affecting other data.

Memory Addressing

  • Byte Addressable: Each byte can be accessed, common in modern systems.

  • Word Addressable: Accesses larger data units, less common today.

Secondary Storage

Includes slow access but large capacity devices:

  • Floppy Disks: Older, mostly obsolete.

  • Flash Drives: Portable and durable.

  • Hard Drives: Large storage using magnetic properties.

RAID

Redundant Array of Independent Disks combines several disks into one unit for data protection, offering configurations for improved performance and reliability.

Summary

This overview covers essential memory concepts, types, and their roles in computer architecture. Understanding the memory types and hierarchy is crucial for efficient computing.