36d ago
DD

Computer Systems Study Guide

Memory and Storage

Memory Hierarchy

  • Definition: An arrangement of memory types balancing cost, speed, and storage capacity.

  • Order (Fastest to Slowest):

    • Registers

    • Cache (L1, L2, L3)

    • Main Memory (RAM)

    • Secondary Storage (SSD, HDD)

  • Diagram: Pyramid-shaped diagram showing Registers at the top and Secondary Storage at the bottom.

Primary and Secondary Storage

  • Primary Storage: Volatile memory directly accessible by the CPU (e.g., RAM).

    • Use Cases:

    • Running applications

    • System software

    • Active data

  • Secondary Storage: Non-volatile, long-term data storage (e.g., HDD, SSD).

    • Use Cases:

    • Storage of files

    • Backups

    • Operating system installations

Cache Memory

  • Levels:

    • L1: Fastest, smallest, closest to CPU cores.

    • L2: Larger, slightly slower than L1.

    • L3: Largest, slowest cache, shared among cores.

  • Organization Techniques:

    • Direct Mapping: Each block of main memory maps to exactly one cache line.

    • Associative Mapping: Any block can go into any cache line (flexible but slower).

    • Set-Associative Mapping: Combines direct and associative; memory blocks map into a set of lines.

Operating Systems

Introduction to Operating Systems

  • Definition: Software managing hardware resources, providing services to the software.

  • Examples: Windows, macOS, Linux, Android.

  • Functions:

    • Resource management

    • Memory management

    • Task scheduling

    • I/O control

    • Security

Core OS Concepts

  • Multiprogramming: Several programs running simultaneously to maximize CPU usage.

  • Multithreading: Concurrent execution of threads within a single program.

  • OS Kernel: Core component managing system resources, memory, processes, and hardware interaction.

Operating System Modes

  • User Mode: Restricted mode where applications run, no direct hardware access.

  • Kernel Mode: Full access to hardware and memory, OS code execution.

Processes

  • Definition: A running instance of a program.

  • Importance: Necessary for allocating resources, managing tasks, and maintaining efficiency.

  • Process States: Transition through New → Ready → Running → Waiting → Terminated.

    • Diagram: Include a diagram showing processes states.

Interrupts vs. Traps

  • Interrupts: Hardware-generated signals that temporarily halt CPU tasks to handle important events.

  • Traps: Software-generated exceptions or errors requiring OS intervention.

Virtual Memory

  • Definition: Technique providing programs the illusion of a large memory space.

  • Necessity: Allows execution of processes larger than the available physical memory.

  • Paging: Divides memory into fixed-size blocks for easier management.

  • Page Tables: Structures mapping virtual memory addresses to physical addresses.

  • MMU & TLB:

    • Memory Management Unit (MMU): Translates virtual to physical memory addresses.

    • Translation Lookaside Buffer (TLB): Fast memory storing recent page translations, improving access speed.

Tips for Exam Preparation

  • Clearly label all diagrams.

  • Provide examples wherever possible.

  • Understand key terms and concepts deeply rather than relying on memorization.

  • Practice drawing diagrams and explaining concepts in your own words.


knowt logo

Computer Systems Study Guide

Memory and Storage

Memory Hierarchy

  • Definition: An arrangement of memory types balancing cost, speed, and storage capacity.
  • Order (Fastest to Slowest):
    • Registers
    • Cache (L1, L2, L3)
    • Main Memory (RAM)
    • Secondary Storage (SSD, HDD)
  • Diagram: Pyramid-shaped diagram showing Registers at the top and Secondary Storage at the bottom.

Primary and Secondary Storage

  • Primary Storage: Volatile memory directly accessible by the CPU (e.g., RAM).

    • Use Cases:
    • Running applications
    • System software
    • Active data
  • Secondary Storage: Non-volatile, long-term data storage (e.g., HDD, SSD).

    • Use Cases:
    • Storage of files
    • Backups
    • Operating system installations

Cache Memory

  • Levels:

    • L1: Fastest, smallest, closest to CPU cores.
    • L2: Larger, slightly slower than L1.
    • L3: Largest, slowest cache, shared among cores.
  • Organization Techniques:

    • Direct Mapping: Each block of main memory maps to exactly one cache line.
    • Associative Mapping: Any block can go into any cache line (flexible but slower).
    • Set-Associative Mapping: Combines direct and associative; memory blocks map into a set of lines.

Operating Systems

Introduction to Operating Systems

  • Definition: Software managing hardware resources, providing services to the software.
  • Examples: Windows, macOS, Linux, Android.
  • Functions:
    • Resource management
    • Memory management
    • Task scheduling
    • I/O control
    • Security

Core OS Concepts

  • Multiprogramming: Several programs running simultaneously to maximize CPU usage.
  • Multithreading: Concurrent execution of threads within a single program.
  • OS Kernel: Core component managing system resources, memory, processes, and hardware interaction.

Operating System Modes

  • User Mode: Restricted mode where applications run, no direct hardware access.
  • Kernel Mode: Full access to hardware and memory, OS code execution.

Processes

  • Definition: A running instance of a program.
  • Importance: Necessary for allocating resources, managing tasks, and maintaining efficiency.
  • Process States: Transition through New → Ready → Running → Waiting → Terminated.
    • Diagram: Include a diagram showing processes states.

Interrupts vs. Traps

  • Interrupts: Hardware-generated signals that temporarily halt CPU tasks to handle important events.
  • Traps: Software-generated exceptions or errors requiring OS intervention.

Virtual Memory

  • Definition: Technique providing programs the illusion of a large memory space.
  • Necessity: Allows execution of processes larger than the available physical memory.
  • Paging: Divides memory into fixed-size blocks for easier management.
  • Page Tables: Structures mapping virtual memory addresses to physical addresses.
  • MMU & TLB:
    • Memory Management Unit (MMU): Translates virtual to physical memory addresses.
    • Translation Lookaside Buffer (TLB): Fast memory storing recent page translations, improving access speed.

Tips for Exam Preparation

  • Clearly label all diagrams.
  • Provide examples wherever possible.
  • Understand key terms and concepts deeply rather than relying on memorization.
  • Practice drawing diagrams and explaining concepts in your own words.