2026-06-08 / Fundamentals

Why Computers Can Run Programs: Components, Storage, Linking, and Concurrency

A program does not run by magic. It runs because hardware, operating systems, compilers, linkers, memory, and scheduling cooperate through clear responsibilities.

FundamentalsAlgorithmProgramming

From Source Code to Running Program

Developers write source code, but computers execute machine instructions. Between the two are compilation, linking, loading, memory allocation, and scheduling.

flowchart LR
    A["Source code"] --> B["Compiler"]
    B --> C["Object files"]
    C --> D["Linker"]
    D --> E["Executable"]
    E --> F["Process"]

Core Components

The CPU executes instructions. Memory stores data and instructions while the program runs. Storage persists files. The operating system manages processes, files, devices, and permissions.

These responsibilities make programs portable enough that developers do not need to control hardware directly in most cases.

Linking and Loading

Linking connects compiled code with the libraries it depends on. Loading places the executable and its dependencies into memory so the operating system can start a process.

Static linking packages dependencies into the executable. Dynamic linking resolves dependencies at runtime.

Concurrency

Concurrency allows multiple tasks to make progress during overlapping periods. It can be implemented through processes, threads, async IO, or event loops.

Concurrency improves responsiveness and throughput, but it also introduces shared-state problems such as race conditions and deadlocks.

Best Practices

  • Understand the runtime model of the language you use.
  • Treat memory, IO, and CPU as different bottlenecks.
  • Avoid shared mutable state when possible.
  • Use profiling instead of guessing performance problems.
  • Learn the operating-system concepts behind your deployment environment.
Why Computers Can Run Programs: Components, Storage, Linking, and Concurrency | Remi Resume