Foundations: What an Operating System Is

operating-system services

Operating-system services are the useful things the OS will do for your programs when they ask — the menu of help available at the teller window. A program on its own can compute, but the moment it needs to interact with the world (read a file, start another program, talk over the network), it cannot do that directly and must request a service. Knowing the menu of services is a good map of what an OS is actually for, beyond the abstract idea of a resource manager.

The classic services fall into a few groups. Process control: create, run, wait for, and end programs (so you can launch an app, and a program can spawn helpers). File and device input/output: open, read, write, and close files, and read from or write to devices like the keyboard, screen, and disk, all through the same uniform interface. Communication: let separate programs exchange data, whether on the same machine (pipes, shared memory, message passing) or across a network (sockets). Protection and security: enforce who may access what, check permissions, and authenticate users. The OS also offers conveniences like getting the time, error reporting, and accounting (tracking who used which resources). Programs reach all of these through system calls.

These services are exactly why a program does not have to reinvent the world. Without them, every app would need its own disk driver, its own way to start other programs, its own networking stack — an impossible burden, and a security nightmare. By centralizing these services in the OS, the system shares one correct, protected implementation among all programs. The honest note is that services are a contract, not magic: the OS decides the policy (which program gets the CPU next, who may open which file), and that policy can differ between systems, which is part of why the same program can behave differently on different operating systems.

Launching a game uses several services at once: process control creates the game's process, file I/O loads its data, device I/O reads the controller and draws to the screen, and protection checks the game may not touch other programs' memory — all requested through system calls.

Even a simple action draws on process, file, device, and protection services.

Services define what the OS offers; system calls are how programs request them. The OS sets the policy behind a service, so a service guarantees an interface, not a particular speed or scheduling outcome.

Also called
OS serviceskernel servicessystem services系統服務