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
- Data Processing: Handles a variety of forms of data and processing requirements.
- Data Storage: Divided into short-term and long-term storage.
- Data Movement: Concerned with Input-Output (I/O) data movement, both from peripheral devices and over longer distances (data communications).
- 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:
- CPU: Controls the system's operations and performs processing functions.
- Main Memory: Stores data.
- I/O: Transfers data between the computer and the external environment.
- 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
- General Purpose Registers (GPR): Used for various data storage purposes.
- Stack Pointer (SP): Points to the current position in the stack for data.
- 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
Single Bus structure: All units connected to a singular I/O bus. Pros: Low complexity and cost. Cons: Slower.
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:
- Programmed I/O: CPU actively waits for the operation completion. Maximizes CPU usage.
- Interrupt-driven I/O: Device generates an interrupt to inform the CPU that it is ready.
- DMA: Direct Memory Access where the DMA controller manages data transfers without CPU intervention.
Instruction Cycle
Steps:
- Fetch from memory
- Decode instruction
- Read operands
- 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:
- SISD: Single Instruction Single Data.
- SIMD: Single Instruction Multiple Data.
- MISD: Multiple Instructions Single Data.
- 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:
- Volatile: Memory that loses its contents when power is off.
- Non-volatile: Retains information without power.
- Primary Memory: RAM, Cache.
- Secondary Memory: Hard drives, tapes.
Key Characteristics:
- Location, capacity, access method, performance, and physical type.
I/O Organization
Components:
- Peripheral Devices: Input/Output devices.
- Accessing I/O Devices: I/O buses, address mapping.
- 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.