OS

An OS (operating system) is the layer of software that turns hardware into durable abstractions, so that programs can share one machine without handling it directly: processes instead of raw CPU execution, virtual memory instead of physical addresses, files instead of storage sectors, and sockets instead of network-device registers.


An OS (operating system) is the layer of software that turns hardware into durable abstractions, so that programs can share one machine without handling it directly: processes instead of raw CPU execution, virtual memory instead of physical addresses, files instead of storage sectors, and sockets instead of network-device registers.

It multiplexes scarce resources while enforcing isolation between programs that do not trust one another. The kernel is the privileged part that does the enforcing, and the process is the unit it isolates, schedules and limits.

Scheduling, caching, buffering, and virtual memory make the machine easier to program, but also make timing indirect. Code that sits idle does not mean the system is doing nothing.

The same idea scales up to whole environments: an OS can give groups of processes their own view of the machine, and a hypervisor can give whole operating systems their own virtual hardware (virtualization), which is what containers and virtual machines are.

Concurrency is unavoidable inside an OS because devices, processes, interrupts, and cores progress independently.

The operating system is not merely software between an application and hardware. It is the authority that decides which version of the machine each application is allowed to believe it owns.