Hardware & OS: Overview

From MediaWiki
Jump to navigation Jump to search

Hardware & OS: Overview

This page introduces the basic model of a computer and explains how the hardware and the operating system interact. It provides the mental map for the following pages.

What is a Computer Built Of?

A computer can be very simple (a microcontroller in an electric toothbrush) or highly complex (a multi-CPU server). In both cases, the core elements are the same:

  • Central Processing Unit (CPU): executes instructions (computation, comparison, data movement).
  • Memory: stores instructions and data.
  • Peripherals: devices for input, output, and storage (keyboard, display, disk, network, USB, …).
Minimal model → CPU + memory.
Extended model → CPU + memory + peripherals.

Memory as “Remembered State”

The essential feature of memory is to store information until changed.

  • Everyday metaphor: a light switch remains on or off until someone flips it.
  • In computers: states are represented electrically (voltage = 1, no voltage = 0).
  • Changing state = overwriting a previous value.

This idea underlies all later forms of computer memory, from punch cards to DRAM.

The CPU at a Glance

The CPU is often described as the “brain” of the computer. Its core tasks:

  • Arithmetic (addition, subtraction, logic).
  • Comparisons (greater/less/equal).
  • Moving data (load from memory, store to memory).
  • Controlling execution flow (jumps, calls).

Modern systems blur boundaries: A graphics processor (GPU) or a network card may include their own CPUs for specialized tasks.

Why the Operating System Exists

Without an OS, a program would have to:

  • Control every piece of hardware directly,
  • Handle memory layout itself,
  • Decide which program runs when.

The OS solves this by:

  • Acting as a resource manager (CPU time, memory, I/O).
  • Providing abstractions (files, processes, devices).
  • Enabling multitasking and multi-user operation.

Putting It Together

A working system typically looks like this:

[ Peripherals ][ CPU ][ Memory ][ Operating System ]
  • Hardware provides the raw capabilities.
  • The OS organizes and controls access.
  • Programs run *on top of* the OS, not directly on the hardware.