Computer Organization and Architecture Study Notes

Computer Organization and Architecture

Introduction

Overview of the Module
  • Key topics include computer architecture, computer organization, structure and function, functional units, basic operational concepts, registers, bus interconnection, bus structures, Harvard architecture, Von Neumann architecture, and IAS architecture.

What is a Computer?

  • A computer is defined as an electronic device that can be programmed to process information and data to yield meaningful results.

Computer Architecture vs. Computer Organization

Definitions
Computer Architecture
  • Refers to a set of attributes of a system that are visible to a programmer. This includes:
    • The instruction set.
    • The number of bits used to represent various data types.
    • I/O mechanisms and techniques for addressing memory.
Computer Organization
  • Involves the operational units and their interconnections that realize architectural specifications. It encompasses:
    • Hardware details that are transparent to the programmer.
    • Control signals and interfaces between the computer and peripherals; memory technology used.
    • Attributes that have a direct impact on how a program executes logically.

Structure and Function

Structure
  • Refers to how components relate to each other in a hierarchical system that includes interrelated subsystems.
Function
  • Describes the operation of individual components as parts of the overall structure.

Computer Functions

  1. Data Processing: Handles a variety of forms of data and processing requirements.
  2. Data Storage: Divided into short-term and long-term storage.
  3. Data Movement: Concerned with Input-Output (I/O) data movement, both from peripheral devices and over longer distances (data communications).
  4. Control: Managed by the control unit which oversees resources and operational performance.

Structural Functional Units of the Computer

The computer is structured around four main functional units:

  1. CPU: Controls the system's operations and performs processing functions.
  2. Main Memory: Stores data.
  3. I/O: Transfers data between the computer and the external environment.
  4. System Interconnection: Mechanism for communication among CPU, memory, and I/O devices.

Internal Components of CPU

Major components include:
  • Control Unit (CU): Directs CPU operations.
  • Arithmetic and Logic Unit (ALU): Executes mathematical and logical functions.
  • Registers: Small storage locations for data within CPU (General Purpose Registers are labeled R0, R1,…,Rn-1).

Basic Operational Concepts

Main Memory Components
  • Memory Address Register (MAR): Holds the address in memory for data to be written from or read into.
  • Memory Buffer Register (MBR): Contains the current opcode of the instruction being executed.
  • Instruction Register (IR): Holds the current instruction for processing.
  • Program Counter (PC): The pointer to the next instruction to be fetched.
Types of Registers
  1. General Purpose Registers (GPR): Used for various data storage purposes.
  2. Stack Pointer (SP): Points to the current position in the stack for data.
  3. Flag Register (FR): Indicates various states of the CPU during processing.
    • Flags include Carry flag (CF), Overflow flag (OF), Zero flag (ZF), etc.

Bus Interconnection

Key Aspects
  • A bus is a collection of wires that connects different devices to carry information.
  • Types of buses include: Data bus, Address bus, and Control bus.
  • Different transfers supported:
    • Memory to Processor
    • Processor to Memory
    • I/O to Processor
    • Processor to I/O
    • I/O to/from Memory (via DMA)

Bus Structure

Types
  1. Single Bus structure: All units connected to a singular I/O bus. Pros: Low complexity and cost. Cons: Slower.

  2. Multi Bus structure: Separate buses for processing and I/O such as memory bus.

    • Flexible for better performance, but can lead to idle CPU time.

Architectures

Harvard Architecture
  • Features separate memory for data and instructions.
Von Neumann Architecture
  • Uses a single read-write memory for both data and instructions, with sequential execution unless modified.
    • Example: IAS Computer developed by John Von Neumann.

Instruction Set Architecture (ISA)

Definition:
  • A collection of instructions that the processor can execute. Key components:
    • Operation code (opcode): Defines the operation to be performed.
    • Operands: Inputs for the operations.
    • Result Operand: Where to store results.

Data Transfer Methods

Types:
  1. Programmed I/O: CPU actively waits for the operation completion. Maximizes CPU usage.
  2. Interrupt-driven I/O: Device generates an interrupt to inform the CPU that it is ready.
  3. DMA: Direct Memory Access where the DMA controller manages data transfers without CPU intervention.

Instruction Cycle

Steps:
  1. Fetch from memory
  2. Decode instruction
  3. Read operands
  4. Execute operation
Components:
  • Control Unit: Coordinates the execution of instructions.
  • Timing Unit: Generates necessary timing signals for execution.

Parallel Processing

Basics:
  • Improves performance by executing multiple instructions simultaneously.
Flynn's Classification:
  1. SISD: Single Instruction Single Data.
  2. SIMD: Single Instruction Multiple Data.
  3. MISD: Multiple Instructions Single Data.
  4. MIMD: Multiple Instructions Multiple Data.

Pipeline Architecture

Concept:
  • Divides instruction execution into sub-operations executed in sequence in dedicated segments. Enhances instruction throughput.
Pipeline Hazards:
  • Can occur due to resource conflicts, various dependencies, and incorrect instruction sequencing.

RISC vs CISC

RISC:Reduced Instruction Set Computer - Focuses on smaller, simpler instruction sets.
CISC:Complex Instruction Set Computer - Contains many more instructions with complex addressing modes.

Memory Organization

Types:
  1. Volatile: Memory that loses its contents when power is off.
  2. Non-volatile: Retains information without power.
  3. Primary Memory: RAM, Cache.
  4. Secondary Memory: Hard drives, tapes.
Key Characteristics:
  • Location, capacity, access method, performance, and physical type.

I/O Organization

Components:
  1. Peripheral Devices: Input/Output devices.
  2. Accessing I/O Devices: I/O buses, address mapping.
  3. Interrupts: Hardware and software, prioritized service.

Final Summary

  • This lecture series delves into the intricate workings of computer organization and architecture including structural components, instruction sets, data transfer methods, and advanced concepts like parallel processing and I/O management.