What is an operating system?
An operating system (OS) is the main system software. It is loaded first when the computer starts, manages all hardware and software, and acts as an interface between the user and the hardware. Without an OS a general-purpose computer cannot be used.
Functions of an OS
- Process management – creates, schedules and ends programs (processes); decides which gets the CPU (CPU scheduling).
- Memory management – gives RAM to programs and takes it back; uses virtual memory when RAM is short.
- File management – creates, names, stores, organises files and folders (directories).
- Device management – controls input/output devices through drivers; uses spooling for printers.
- Security – passwords, user accounts, permissions.
- User interface – CLI or GUI.
- Error detection, job accounting, resource allocation.
Parts of an OS
- Kernel – the core; always in memory; talks directly to hardware.
- Shell – the outer layer that takes user commands and passes them to the kernel (e.g. Bash in Linux, Command Prompt/PowerShell in Windows).
- System call – the way a program asks the kernel for a service.
User interfaces
- CLI (Command Line Interface) – user types commands. MS-DOS, Unix/Linux terminal.
- GUI (Graphical User Interface) – windows, icons, menus, pointer (WIMP). First commercial GUI ideas came from Xerox PARC (Xerox Alto); popularised by Apple Macintosh (1984) and Microsoft Windows.
Types of OS
| Type | Key idea |
|---|---|
| Batch | Similar jobs grouped and run one after another without user interaction. |
| Multiprogramming | Several programs kept in memory; CPU switches when one waits for I/O – keeps CPU busy. |
| Multitasking / Time-sharing | CPU time divided into small slices (time slice / quantum) among many tasks or users so each seems to run at once. |
| Multiprocessing | Two or more CPUs in one computer working together. |
| Multi-user | Many users use one computer at the same time (Unix, Linux servers). |
| Real-time (RTOS) | Response within a fixed, very short time – missile systems, air-traffic control, ABS brakes, pacemakers. Hard RTOS: deadline must never be missed; soft: occasional delay tolerated. |
| Distributed | Many networked computers appear as one system. |
| Network OS | Runs on a server and manages network resources – Windows Server, Novell NetWare. |
| Embedded | Built into devices – washing machines, ATMs, smart TVs. |
| Mobile | Android (Google), iOS (Apple), HarmonyOS (Huawei), KaiOS (feature phones). |
Single-user single-task: MS-DOS. Single-user multitasking: Windows, macOS.
Booting
- Booting – starting the computer and loading the OS into RAM.
- Cold boot – switching on from power off. Warm boot – restarting an already running computer (Restart, or Ctrl+Alt+Del in old systems).
- Steps: power on → BIOS/UEFI runs POST (Power-On Self-Test) → finds the boot device → bootstrap loader / boot loader loads the kernel → OS starts.
- Boot loaders: GRUB (Linux), Windows Boot Manager.
- Safe Mode starts Windows with only basic drivers to fix problems.
Important operating systems
- Unix – developed in 1969 at AT&T Bell Labs by Ken Thompson and Dennis Ritchie; later rewritten in C. Multi-user, multitasking.
- MS-DOS – Microsoft Disk Operating System (1981) for IBM PC; CLI, single-user, single-task. Microsoft bought 86-DOS (QDOS) from Seattle Computer Products.
- Windows – Microsoft GUI OS. Windows 1.0 (1985), 95, 98, XP (2001), Vista, 7, 8, 10 (2015), 11 (2021).
- Linux – open-source, Unix-like; kernel by Linus Torvalds (1991). Mascot: penguin Tux. Distributions (distros): Ubuntu, Fedora, Debian, Red Hat, Linux Mint, Kali; India's BOSS Linux (Bharat Operating System Solutions, by C-DAC).
- macOS – Apple's OS for Mac computers (Unix-based).
- Android – Google's mobile OS based on the Linux kernel; developed by Android Inc. (Andy Rubin), bought by Google in 2005; first phone 2008.
- iOS – Apple's iPhone OS. ChromeOS – Google's OS for Chromebooks.
- Maya OS – Ubuntu-based OS adopted by India's Ministry of Defence (2023).
Other terms
- Process – a program in execution. Thread – smallest unit of a process that can be scheduled.
- Deadlock – two or more processes wait for each other forever.
- Thrashing – the system spends more time swapping pages than doing work.
- Paging – memory split into fixed-size pages; used with virtual memory.
- Spooling (Simultaneous Peripheral Operations On-Line) – jobs placed in a queue on disk for a slow device such as a printer.
- Scheduling algorithms: FCFS (First Come First Served), SJF (Shortest Job First), Round Robin (time slices; used in time-sharing), Priority.
- File systems: FAT32, NTFS (Windows), ext4 (Linux), APFS (Apple).
- Interrupt – a signal that makes the CPU stop and attend to an urgent event.
Quick recall: OS = resource manager + interface · Kernel = core, Shell = command interpreter · Unix 1969 Bell Labs · DOS = CLI · Linux = Torvalds 1991, Tux · RTOS = fixed-time response · Round Robin = time-sharing · POST checks hardware at boot.