Operating Systems Overview

All of these operating system services, except for the user interface, are provided by a core component called the kernel, which acts as an intermediary between hardware and software. The kernel is executed by the computer’s bootloader, and first performs privileged initialization routines, such as configuring hardware, in order to prepare the system to run user-space processes. Once the kernel is done initializing the system, it hands execution off to a user-space init process, which is responsible for initializing the remainder of the user-space environment.

For the remainder of the system’s uptime, the kernel no longer runs continuously as a standalone program; instead, it remains loaded into system memory, and part of it is mapped into the virtual address space of every running user-space process–essentially, it embeds itself into every program that is executed. When a user-space process needs to perform a privileged operation, such as accessing the file system, allocating memory, signalling other processes, and so on, it executes a special system call instruction (e.g. syscall), triggers a preconfigured system-call interrupt (e.g. int 0x80), or performs another architecture specific action, and execution jumps into a designated system call entry point in the kernel code, with elevated privileges. Afterwards, the kernel returns execution back to the point of the system call in the user-space process. The kernel also periodically interrupts running processes in order to schedule other processes to run, to respond to external hardware events such as incoming network traffic, and so on.

Along with the kernel, the other major component of an operating system is its system utilities, which are a collection of programs that provide “essential” functionality for managing and maintaining the operating system. These utilities are often associated with administrative tasks, such as managing running processes, mounting and unmounting file systems, starting and stopping services, and so on, but also provide critical components of a basic user interface such as the command-line interface and text editing capabilities.

Linux is perhaps the most well-known kernel, which was developed by Linus Torvalds in 1991 as a de novo reimplementation of Unix which is free and open source, unencumbered by many of the licensing and copyright quagmires that plagued Unix in the 1990s and early 2000s. While “Linux” is often used as a shorthand to refer to Linux-based operating systems, strictly speaking, Linux is not an operating system in and of itself, because it is only a kernel and does not include any system utilities. The majority of Linux-based operating systems are packaged with a set of utilities provided by a project called GNU (which is an initialism for “GNU is Not Unix”), although a few other competitors to GNU exist, such as BusyBox, Heirloom Toolchest, 9base, and so on.

The GNU project was founded in 1983 and was originally meant to produce a stand-alone operating system, including their own GNU kernel called Hurd. Hurd has never progressed to a stable release, while GNU’s system utilities and other software projects have established themselves as de-facto standards for linux-based operating systems, and for Unix software development, such as the GNU compiler (gcc), which is part of the widely used GNU development tool-chain which we will explore in this class: binutils, autotools, gmake, and so on. Another major project, the GNU Object Model Environment (GNOME), is a fully featured graphical desktop environment that is also used as the default user interface in many popular Linux distributions, such as Debian, Fedora, Red Hat, Solaris, and Ubuntu. Overall GNU’s more than 350 individual software projects have exerted a monumental and lasting influence on systems programming and open-source software.

Other operating systems use their own kernels; the kernel used in MacOS is called XNU (X is Not Unix), while the kernel used in Windows is called Windows NT. Overall, the kernel and system utilities work together to provide a stable and secure computing environment for users. The kernel provides low-level access to hardware resources and manages system resources, while system utilities provide additional functionality and a user-friendly interface for managing and using the system.