{"canonical_url":"https://engineer.company/glossary/operating-system/","content_markdown":"# Operating system\n\n## What it is\n\nAn operating system is the software that starts first on a computer and stays\nrunning underneath everything else, sharing the processor, memory, storage and\nnetwork out among programs and giving all of them the same ways to read files,\nuse devices and reach the network. It is usually shortened to OS. Windows,\nmacOS, Android, iOS and the Linux distributions such as Debian and Ubuntu are\noperating systems.\n\nNIST's glossary carries two descriptions that fit together. One calls it the\nmaster control application that runs the computer: “the first program loaded\nwhen the computer is turned on”, whose main component, the kernel, stays in\nmemory at all times, and which “sets the standards for all application\nprograms”, such as the web server. The other, from NIST's guide to operational\ntechnology security, calls it “an integrated collection of service routines for\nsupervising the sequencing of programs”, which may perform input and output\ncontrol, resource scheduling and data management, and which gives application\nprograms the fundamental commands for controlling the computer.\n\nThe kernel is the core, but an operating system is more than its kernel. Around\nit sit the system libraries that programs call, the shell and the everyday\ncommand-line tools, a supervisor that starts services at boot and restarts them,\na package manager that installs and updates software, and a large body of\ndefault configuration that decides what is switched on, where logs go and who\nmay log in. A Linux distribution assembles all of that around the Linux kernel,\nwhich is why two systems with the same kernel can behave very differently.\n\nMost of what an operating system offers a program is a short list of\nabstractions that stand in for the hardware. POSIX, the standard behind\nUnix-like systems, defines them precisely. A process is an address space in\nwhich one or more threads run, together with the system resources those threads\nneed. A file is an object that can be written to, read from or both, with access\npermissions and a type: regular file, directory, symbolic link, FIFO, socket, or\na character or block special file standing for a device. A block special file\ngives access to a device in a way that keeps its hardware characteristics out of\nview. A device itself is defined as “a computer peripheral or an object that\nappears to the application as such”. POSIX's stated purpose is to make\napplications portable at the source code level, so a program written to these\ninterfaces can be compiled on another conforming system and run.\n\nMemory gets the same treatment. The Linux kernel's documentation starts from the\nfact that physical memory is a limited resource and describes virtual memory as\nthe layer that abstracts its details from application software. Each program\nsees an address space of its own, and the operating system decides, moment by\nmoment, which parts of which programs are held in real memory and which are\ncompressed, written out to disk or dropped to be read back later.\n\n## Why it matters\n\nChoosing an operating system settles a great deal at once: which software will\nrun, which tools the people running it already know, who supplies security fixes\nand for how long, and what a support contract, if any, will cost. Changing it\nlater means moving every program and every habit built on it, so the choice\nusually outlives the hardware it was first made on.\n\nIt is also the main boundary of trust inside one machine. Users, groups, file\npermissions and the separation between processes are all operating system\nfeatures, and they decide how far a flaw in one program can reach. A machine on\nwhich every service runs with full rights has one wall left, the network edge.\n\nIts defaults are decisions somebody else made. A fresh install comes with\nservices enabled, files in agreed places and settings already chosen. Most are\nsensible; a few will not suit the work, and nobody is told which. Running a\nmachine well includes knowing which defaults you have accepted.\n\nAnd it decides how far code travels. A program that keeps to the portable\ninterfaces moves to another system with a rebuild. A program or script that\nleans on one system's extensions moves only as far as those extensions do.\n\n## What it looks like in practice\n\nOn a laptop,\n[a macOS application's diagnostic reports recorded 111 GB of compressed pages on a 36 GB machine](/portfolio/an-app-that-ate-41-mb-a-second-stopped/)\non 2026-09-01. A separate footprint sample recorded growth of about 41 MB per second during\na connection retry loop emitting core events; those are separate observations, not one\ncontinuous measurement. The event path was changed to bound buffers, filter subscriptions\nby event type and give logging a rate budget. A full test-run comparison recorded core log\nlines falling from 610,996 to 1,411. Tests defend the bounded design, but that comparison\nis neither a production benchmark nor a measured post-fix memory figure. Separate shutdown\ntimeouts required their own correction.\n\nOn the company's host, an automation role had written its SSH settings on every\nrun for months when an access report read the daemon's own resolved settings and\nfound two of them disagreeing. The account of\n[hardening SSH with three-stage validation](/portfolio/hardened-ssh-to-24-validated-directives/)\ngives the cause: the operating system ships its own defaults uncommented, above\nwhere a drop-in file lands, and for those two settings the first occurrence\nwins. The fix was a filename prefix that sorts ahead of the vendor's, and 24\ndirectives are now asserted against what the daemon reports back.\n\nThe same host met another of the system's choices when its intrusion-banning\nservice was set up.\n[The log source is set to detect](/portfolio/proved-the-intrusion-ban-works-every-run/)\nbecause the operating system ships no traditional authentication log, and the\nwrong choice fails silently by watching a file that never appears.\n\n## Where it goes wrong\n\n**A script carries the habits of the system it was written on.** A shell script\nwritten on a Mac and run on a Linux server, or the other way round, meets the\nsame command names with different options. The POSIX `sed` accepts `-E` and\n`-n`; editing a file in place with `-i` is an extension, and the two common\nversions take it differently:\n\n```sh\nsed -i 's/old/new/' notes.txt     # GNU sed, on most Linux systems\nsed -i '' 's/old/new/' notes.txt  # BSD sed, on macOS\n```\n\nEach form breaks on the other system. Keep to what POSIX defines where it is\nenough, run the script on the system that will run it in production, and install\nthe same tool on both when an extension is worth having.\n\n**Two machines with the same operating system differ.** “Debian” names a family\nof releases, and two hosts both described as running it can be years apart in\nrelease, kernel and package versions, with different packages installed and\ndifferent local changes. Read what each machine actually is before comparing\nthem:\n\n```sh\ncat /etc/os-release\nuname -srm\n```\n\nThe first prints the distribution's name and release, the second the kernel's\nname and release and the machine's processor type. Build every host from the\nsame written description and keep the release in the inventory.\n\n**Services run as the administrator.** A service running as root on a Unix-like\nsystem can read every file and change every setting, so any flaw in it is a flaw\nin the whole machine. Give each service its own unprivileged user, with write\naccess only where it writes, and grant extra rights one at a time when the\nservice shows it needs them.\n\n**A release outlives its security support.** Every release stops receiving fixes\non a published schedule. Debian's security team, for example, supports each\nstable distribution for three years from the day it is released. A host left on\nan old release keeps working, which is exactly why it gets forgotten. Record\neach host's end-of-support date beside its other renewal dates and plan the\nupgrade well before it.\n\n## Further reading\n\n- [operating system — NIST CSRC Glossary](https://csrc.nist.gov/glossary/term/operating_system)\n  — both definitions, from the master control application to the collection of\n  service routines.\n- [POSIX.1-2024, Base Definitions: Definitions](https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap03.html)\n  — the exact wording for process, file, device and the other words an operating\n  system is built from.\n- [POSIX.1-2024: sed](https://pubs.opengroup.org/onlinepubs/9799919799/utilities/sed.html)\n  — the options every conforming `sed` accepts, as a measure of what a portable\n  script may use.\n- [Linux kernel documentation: Concepts overview](https://docs.kernel.org/admin-guide/mm/concepts.html)\n  — virtual memory, the page cache and reclaim, as the kernel itself describes\n  them.\n- [Debian security FAQ](https://www.debian.org/security/faq) — how Debian\n  handles security fixes and how long a stable release receives them.\n\n\u003chttps://engineer.company/glossary/operating-system/\u003e\n","date_modified":"2026-11-08T02:22:23Z","description":"What an operating system adds to a kernel, the processes and files it hands every program, why its defaults are decisions, and how scripts and hosts drift.","formats":{"gemtext":"https://engineer.company/glossary/operating-system/index.gmi","gopher":"https://engineer.company/glossary/operating-system/gophermap","html":"https://engineer.company/glossary/operating-system/","json":"https://engineer.company/glossary/operating-system/index.json","markdown":"https://engineer.company/glossary/operating-system/index.md","pdf":"https://engineer.company/glossary/operating-system/index.pdf"},"kind":"page","language":"en","title":"What is an operating system?","url":"https://engineer.company/glossary/operating-system/","version":1}