3 - Hardware

Von Neumann Architecture

Definition

The Von Neumann Architecture is a foundational computer architecture model that organizes the design and operation of a stored-program computer. This architecture enables the storage of both data and instructions in the same memory space, allowing for flexibility and efficiency in processing tasks.

Components

  • Central Processing Unit (CPU): The core component responsible for executing instructions from programs. It is often referred to as the brain of the computer.

    • Arithmetic Logic Unit (ALU): A critical part of the CPU that performs all arithmetic and logical operations, such as addition, subtraction, comparison, and bitwise operations.

      • Responsible for performing arithmetic operations which include addition and subtraction.

      • Handles logical operations such as AND, OR, NOT.

    • Control Unit (CU): Controls the operation of the CPU by managing the data flow to and from the various components.

      • Interprets instructions from the program and generates control signals.

      • Coordinates how data moves between RAM, CPU, and I/O devices.

    • Registers: Small, fast storage locations within the CPU for holding temporary data and instructions, which significantly expedite processing speeds.

      • Instruction Register (IR): Holds the current instruction being executed.

      • Status Register: Contains flags that indicate the status of the processor (e.g., zero flag, carry flag).

      • Additional specialized registers may include a Memory Address Register (MAR) and Memory Data Register (MDR).

  • Program Counter (PC): A specialized register that tracks the address of the next instruction to be executed, incrementing with each instruction cycle to ensure proper sequence of execution.

    • Helps manage the order of instructions, ensuring none are skipped.

  • Memory Address Register (MAR): Holds the memory address of the data that needs to be accessed, either for reading from or writing to memory.

    • Acts as a pointer to memory to fetch instruction or data as needed.

  • Memory Data Register (MDR): Buffers data being transferred to and from memory, facilitating smooth communication between the CPU and memory.

    • Temporarily holds data fetched from memory before it is processed by the CPU.

  • Current Instruction Register (CIR): Temporarily holds the instruction currently being executed by the CPU, after it has been fetched from memory.

  • Accumulator (ACC): A special register used for storing intermediate results of arithmetic and logic operations before they are transferred to memory.

Buses

Buses are essential communication pathways that facilitate data transfer between the CPU, memory, and I/O devices. They are classified into three types:

  • Address Bus: Transmits memory addresses from the CPU to other components for read/write operations.

    • Determines which memory location to read from or write to.

  • Data Bus: Carries actual data between the CPU, memory, and peripheral devices. The data bus width (in bits) impacts how much data can be transferred simultaneously.

    • Wider data buses can transfer larger chunks of data simultaneously, improving performance.

  • Control Bus: Transfers control signals that manage the operations of the CPU and interaction among other components. It enables the coordination of all system activities.

    • Ensures all components are synchronized and operate in harmony.

Factors Affecting CPU Performance

  1. Cores: A CPU can have multiple cores that enable it to process several instructions simultaneously, improving performance in multi-threaded tasks.

  • Each core can handle different tasks, making it efficient for tasks like gaming, video editing, and complex calculations.

  1. Cache: This small-sized type of volatile computer memory provides high-speed data access to the CPU. Common cache levels include L1 (fastest, closest to the core), L2, and L3, with L1 being the fastest and closest to the CPU.

  • Multilevel Cache Systems improve speed by storing frequently accessed data closer to the CPU.

  • Helps reduce latency in data access, which enhances overall efficiency.

  1. Internal Clock: The clock speed, measured in Hertz, affects how many instructions the CPU can execute in a second.

  • Overheating can reduce clock speed, thus degrading performance.

  • Modern CPUs may utilize dynamic frequency scaling to optimize performance under varying loads.

  1. Width of Buses: The width (in bits) of the buses affects the amount of data that can be transmitted simultaneously; wider buses improve data transfer efficiency, leading to faster processing.

  • Can impact memory bandwidth, especially under heavy load conditions.

  1. Instruction Set Architecture (ISA): The complexity and efficiency of the instruction set influence the performance of the CPU.

  • RISC (Reduced Instruction Set Computing) architectures focus on executing a small set of instructions quickly, while CISC (Complex Instruction Set Computing) architectures handle more complex instructions.

  • The choice of ISA affects the compiler design and influences software performance.

Fetch-Decode-Execute Cycle (FDE)

Overview

The Fetch-Decode-Execute Cycle is a fundamental process that the CPU uses to carry out instructions.

Steps:

  1. Fetch:

    • The instruction is retrieved from memory, indicated by the address in the Program Counter (PC).

    • The instruction is then stored in the Current Instruction Register (CIR).

  2. Decode:

    • The control unit interprets the instruction to understand what operation is to be performed.

    • The necessary resources are prepared, including accessing memory or ALU components.

  3. Execute:

    • The execution of the operation takes place, utilizing the ALU or control unit as required.

    • The results of the operation are calculated and stored in the Accumulator (ACC).

  4. Store:

    • If necessary, the results of the operation are written back to memory or passed to the appropriate register, ready for the next cycle.

Input & Output Devices

Definition

Input and output devices are peripherals that allow for interaction between the user and the computer.

Types of Input Devices:

  • Sensors: Devices that detect changes in the environment (e.g., temperature, light) and relay this information to the CPU for processing.

  • Keyboards: Allow users to input text and commands.

  • Mouse: A pointing device that facilitates user interaction with the computer interface.

  • Barcode Scanners: Used for reading barcodes on products.

  • Digital Cameras: Capture visual information and input it to processing units.

  • Microphones: Allow for audio input, useful for voice commands and recording.

  • Game Controllers: Enable user interaction in gaming environments.

  • Touchscreens: Provide a direct interaction method allowing users to select options by touching the screen.

  • Trackpads: Serve as input devices for laptops, allowing control similar to a mouse without needing an external device.

Data Storage

Primary Storage

Includes directly accessible memory by the CPU:

  • RAM (Random Access Memory): Volatile memory that temporarily stores data for quick access during processing. Once power is lost, data is erased. Generally comes in two types: Dynamic RAM (DRAM) and Static RAM (SRAM).

    • DRAM requires periodic refresh cycles while SRAM does not, which makes SRAM faster and more expensive.

  • ROM (Read-Only Memory): Non-volatile memory that holds permanent instructions, such as firmware necessary for booting the computer. Types of ROM include PROM (Programmable ROM), EEPROM (Electrically Erasable Programmable ROM), and Flash memory.

    • EEPROM can be rewritten, while conventional ROM cannot be modified after manufacturing.

Secondary Storage

Used for permanent data storage and is not directly accessed by the CPU:

  • Hard Disk Drives (HDDs): Use spinning disks to read/write data. They offer large capacity but lower speed compared to SSD.

    • Mechanical parts make HDDs more prone to failure due to wear and tear over time.

  • Solid State Drives (SSDs): Use flash memory for data storage, leading to faster data access and lower latency.

    • No moving parts in SSDs provide higher durability and reliability compared to HDDs.

  • Optical Discs: CDs, DVDs, and Blu-rays are used for media storage and sharing.

    • These types of storage are often used for long-term archival purposes due to their stability over time.

  • USB Flash Drives: Portable storage devices that offer convenience but generally less capacity than HDDs and SSDs.

    • Ideal for transferring files between devices quickly due to their plug-and-play functionality.

Virtual Memory

Definition

Virtual memory is a memory management technique provided by the operating system that uses disk space to extend RAM.

How It Works

Less frequently used data is moved from RAM into a designated area on the secondary storage. This method improves multitasking by allowing the system to swap data in and out of RAM as needed. This creates an illusion of a larger memory space than is physically available, thereby enhancing multitasking capabilities.

Cloud Storage

Overview

An online model that stores data across multiple remote servers, accessible via the internet.

Advantages

  • Accessibility: Data can be accessed from anywhere with an internet connection, promoting mobility.

  • Scalability: Users can easily adjust storage capacity according to their needs, accommodating growing data.

  • Cost-Effective: Reduces the need for physical infrastructure and storage personnel, often offering pay-as-you-go pricing.

  • Redundancy: Data backup is usually included at no additional cost, protecting against loss.

  • Collaboration: Teams can share and edit files in real-time from different locations, enhancing productivity and teamwork.

Disadvantages

  • Dependency on Internet: Requires a reliable internet connection for access; failures can disrupt workflow.

  • Security Concerns: Storing sensitive information with third-party providers raises privacy issues and the potential for data breaches. Encryption and secure authentication are essential to mitigate these risks.

  • Limited Control: Users have less control over physical location and handling of their data.

Network Interface Card (NIC)

Purpose

A NIC connects a computer to a network, enabling communication with other devices.

Features

  • Each NIC has a unique Media Access Control (MAC) address essential for identifying the device on a network, facilitating communication and access control between different devices in the network.

  • Types of NICs: Wired (Ethernet NIC) and wireless NICs (Wi-Fi) support different local connectivity types.

  • Speeds: Vary by technology, from older standards (10/100 Mbps) to modern standards (1 Gbps and up).

  • Full-Duplex & Half-Duplex: NICs can operate in full-duplex (send and receive simultaneously) or half-duplex (send or receive, not both).

robot