operating-systems hardware computer-architecture

Definition

Processor

A processor is the primary electronic circuitry executing instructions specified by a computer program. It performs arithmetic, logic, control, and I/O operations. Behaviour is dictated by its ISA, defining operations and software interface.

Components

ALU

Performs mathematical operations (addition, subtraction) and logical comparisons (AND, OR, NOT). See ALU.

Control Unit

Decodes instructions from memory and coordinates data movement between ALU, registers, and other components.

Registers

High-speed internal storage for data being processed: Program Counter (PC), PSW, general purpose. See Registers.

Cache

Fast local memory reducing average access time to main memory.

Instruction Cycle

Fetch-Decode-Execute

  1. Fetch: Retrieve next instruction from memory at address in PC
  2. Decode: Control unit interprets instruction
  3. Execute: ALU or component performs operation
  4. Store: Results written to registers or memory

OS Interaction

Execution Modes

Hardware support for User and Kernel modes allows OS to protect sensitive instructions.

Interrupts

Hardware mechanisms for asynchronous events, enabling OS to react to I/O completion or timer timeouts. See Interrupts.