Learning Objectives
By the end of this chapter, you will be able to:
- Define an operating system and its role in a computer.
- Identify the main functions of an operating system.
- Differentiate between a command-line interface (CLI) and a graphical user interface (GUI).
- Describe the booting process and types of operating systems.
- Provide examples of common desktop, mobile, and server operating systems.
What is an Operating System (OS)?
The operating system (OS) is the most important software that runs on a computer. It is the core piece of system software that manages all of the computer’s hardware and software resources. The OS acts as an intermediary between the computer hardware and the application programs, ensuring that everything works together smoothly.
flowchart TB
USER[User] --> APP[Application Programs]
APP --> OS[Operating System]
OS --> CPU[CPU]
OS --> RAM[Memory]
OS --> DISK[Storage]
OS --> IO[I/O Devices]
Figure 1: OS as Interface Between User, Apps, and Hardware
The central part of the OS that stays in memory and controls the hardware is called the kernel.
Main Functions of an Operating System
-
Hardware Management: The OS controls and coordinates all of the computer’s hardware components, including the CPU, memory, storage devices, and peripherals.
- Providing a User Interface: The OS provides the interface that allows the user to interact with the computer. There are two main types:
- Command-Line Interface (CLI): The user types text commands to tell the computer what to do.
- Graphical User Interface (GUI): The user interacts with the computer using visual elements like icons, windows, and menus. This is the standard for all modern operating systems.
-
Running Applications: The OS provides the platform on which application software runs. It is responsible for launching applications and providing them with the resources they need to function.
-
Memory Management: The OS manages the computer’s primary memory (RAM), allocating it to different applications as needed and ensuring that they do not interfere with each other.
-
File Management: The OS provides a file system that organizes how data is stored and retrieved from secondary storage devices. It allows users to create, delete, move, and copy files and folders.
-
Process Management: The OS schedules which program uses the CPU and for how long, so many programs appear to run at once (multitasking).
-
Device Management: Using device drivers, the OS communicates with printers, keyboards, cameras, and other devices.
-
Security and Access Control: The OS manages user accounts, passwords, file permissions, and built-in protection such as firewalls and updates.
- Error Detection and Logging: The OS detects hardware and software problems and records them for troubleshooting.
| Aspect | Command-Line Interface (CLI) | Graphical User Interface (GUI) |
|---|---|---|
| Interaction | Typing text commands | Clicking icons, windows, menus |
| Ease of use | Harder for beginners | Easy and intuitive |
| Speed for experts | Very fast; easy to automate with scripts | Slower for repetitive tasks |
| Resources | Uses little memory and CPU | Needs more memory and graphics power |
| Example | Windows Command Prompt, Linux terminal | Windows desktop, macOS, Android home screen |
Example CLI commands: dir (Windows) or ls (Linux) lists files; mkdir Reports creates a folder.
The Booting Process
When you switch on a computer:
- The BIOS/UEFI firmware runs the POST (Power-On Self-Test) to check hardware.
- The firmware finds the boot device (usually the SSD).
- The bootloader loads the OS kernel into RAM.
- The OS starts its services and drivers and shows the login screen.
A cold boot starts from power off; a warm boot is a restart without switching off.
Types of Operating Systems
| Type | Description | Example |
|---|---|---|
| Single-user, single-task | One user, one program at a time | MS-DOS (old) |
| Single-user, multitasking | One user, many programs at once | Windows, macOS on a personal computer |
| Multi-user | Many users share the same computer’s resources | Linux and Windows servers |
| Real-time OS (RTOS) | Responds within strict time limits | Airbag controllers, industrial machines, medical devices |
| Embedded OS | Built into devices with a dedicated purpose | Smart TVs, routers, ATMs, washing machines |
| Mobile OS | Designed for touch screens, battery life, and apps | Android, iOS |
| Network/server OS | Manages network resources, users, and services | Windows Server, Linux (Ubuntu Server) |
Examples of Operating Systems
- Desktop Operating Systems:
- Microsoft Windows: The most popular desktop OS in the world.
- Apple macOS: The operating system used on Apple’s Macintosh computers.
- Linux: A popular open-source operating system.
- Mobile Operating Systems:
- Google Android: The most popular mobile OS in the world.
- Apple iOS: The operating system used on Apple’s iPhone and iPad.
- Server Operating Systems: Linux distributions (such as Ubuntu Server and Red Hat) run most web servers; Windows Server is common in corporate networks.
Open source vs proprietary OS
| Aspect | Open source (e.g., Linux) | Proprietary (e.g., Windows, macOS) |
|---|---|---|
| Cost | Usually free | License cost (often included with the device) |
| Source code | Available to view and modify | Closed |
| Support | Community or paid vendors | Official vendor support |
| Software availability | Fewer mainstream desktop apps | Widest range of business software and games |
Nepal Context
In Nepal, most office and home computers run Windows, and almost all smartphones run Android. Many banks, ISPs, and hosting companies run Linux servers for websites and core systems, while embedded OS run inside ATMs, POS terminals, and routers. Keeping the OS updated is one of the simplest defenses against malware.
Summary
The operating system is the essential piece of system software that brings a computer to life. Its kernel manages all hardware and software resources: processes, memory, files, devices, and security. It provides a user interface (usually a GUI, with a CLI for advanced tasks) and creates the platform for running application programs. The OS is loaded during booting, and different types exist for desktops, mobiles, servers, real-time control, and embedded devices. From managing memory and files to controlling hardware, the OS is the foundational layer that makes modern computing possible.
Key Takeaways
- The OS is the most important software on a computer, managing all hardware and software.
- Key functions include hardware, process, memory, file, device, and security management, plus the user interface.
- A GUI (Graphical User Interface) is the standard for modern operating systems; CLI remains useful for experts.
- Booting loads the OS from storage into memory.
- Common examples include Windows, macOS, Linux, Android, and iOS.
Discussion Questions
- What are the main advantages of a GUI over a CLI?
- Could you use a computer that did not have an operating system? What would it be like?
- What are some of the key differences between a desktop OS (like Windows) and a mobile OS (like Android)?
Exam-Style Questions
Short answer
- Define an operating system. Give four examples.
- Differentiate between CLI and GUI.
- What is a real-time operating system? Give an example.
Long answer
- Explain the main functions of an operating system.
- Describe the types of operating systems with examples.

