Operating System#
An operating system (OS) is the foundational software that manages computer hardware and software resources, serving as the critical bridge between applications and the physical machine. It handles core tasks like process management, memory allocation, and file systems, ensuring your device runs smoothly and efficiently. It also acts as the primary interface between the computer hardware and the user.
Applications send requests to the operating system, and the operating system directs those requests to the hardware. The hardware also sends information back to the operating system, and the operating system sends it back to applications. Without an OS, each application would need direct control over the CPU, memory, files, devices, and security. This would quickly cause conflicts, and the OS handles this by acting as the central organizer.
Operating systems include the software that is always running, called a kernel—but can include other software as well. The two other types of programs that can run on a computer are system programs—which are associated with the operating system, but may not be part of the kernel—and applications—all other software.
OS Types: Desktop, Server, Mobile, Embedded, Virtual/Cloud
UI#
A user interface is a program that allows a user to control the functions of the operating system.
- A GUI (graphical user interface) is a user interface that uses icons and menus on the screen to interact and manage different tasks on the computer.
- Basic GUI components: Start menu, Task bar, Desktop with icons and shortcuts
- The CLI (command-line interface) is a text-based user interface that uses commands to interact with the computer. These commands communicate with the operating system and execute tasks like opening programs.
System Privilege Layers#
Inside a modern computer, different parts of the system operate at various permission levels. Some components can communicate directly with the hardware, while regular applications run in a safer, restricted environment. This separation is intentional and helps prevent conflicts and security issues.
- Kernel space: The privileged, locked-down core of the OS. This is where the kernel, the part of the operating system that directly manages hardware and system resources, runs. It has unrestricted access to the CPU, memory, storage, and all hardware components.
- User space: Where all standard applications run. Applications in the user space are deliberately prevented from accessing hardware directly. Whenever they need to open or save a file, play a sound, or connect to Wi-Fi, they must make a system call and request that the kernel act on their behalf.
Operating System Duties#
| OS Responsibility | What the OS Does | Example |
|---|---|---|
| Process Management | Creates, schedules, prioritizes, and terminates running programs. The OS decides how much CPU time each process gets, making multitasking feel seamless | Opening multiple apps, like your browser, music player, and social media, without your computer freezing |
| Memory Management | Allocates RAM to processes, protects the app’s memory from other processes, and reclaims memory when apps are closed. When RAM runs low, the OS uses virtual memory to keep your system stable | Opening multiple app at once, the OS allocates RAM to each one and keeps them isolated so they don’t interfere or crash each other |
| File System Management | Organizes files into directories, handles naming, paths, permissions, metadata (name, size, type, timestamps) | Creating a new folder, saving a photo, or setting a file to “read only” |
| User Management | Handles multiple user accounts, authentication, and permissions to determine who can access what | Logging in with your password and keeping your files inaccessible to other user accounts |
| Device Management | Loads drivers and provides a universal interface (hardware abstraction layer), so apps can say “print this” or “play this sound” | Plugging in a new mouse, printer, or external hard drive and having it work immediately |
Operating System Security#
At a basic level, your operating system handles
- Authentication: Verifies who you are through login passwords and biometrics
- Permissions: Controls exactly what each user and app is allowed to read, write, or execute
- Isolation: Keeps every process in its own protected box (kernel/user space separation)
- System Protection: Safeguards critical system files and settings from unauthorized changes
Booting the computer#
When you boot, or turn on, your computer, either a BIOS or UEFI microchip is activated. The Basic Input/Output System (BIOS) is a microchip that contains loading instructions for the computer and is prevalent in older systems. The Unified Extensible Firmware Interface (UEFI) is a microchip that contains loading instructions for the computer and replaces BIOS on more modern systems.
One of the routines that the UEFI loads is the Power-On Self Test, which tests if every required component is present, configured correctly, and functioning.
The UEFI holds an ordered list which prioritizes on which device to look first for the bootloader.
The last instruction from the BIOS or UEFI activates the bootloader. The bootloader is a software program that boots the operating system. The bootloader transfers the Operating System from the selected boot device to the RAM. Once the OS is transferred, the UEFI gives control over the different components to the OS and your computer is ready for use.