An OS is a program that manages a computer’s hardware and provides a basis for application programs. It’s the first software loaded when the computer starts (after the bootloader) and remains in memory at all times — this part is called the kernel.
Core Roles
- Resource Manager — allocates CPU time, memory space, disk storage, and I/O devices to competing programs. The OS decides who gets what, when, and how much.
- Extended Machine — presents a virtual interface that’s simpler than the raw hardware. Instead of tracking disk sectors, you use files. Instead of managing physical memory addresses, you use virtual addresses.
OS Services
| Service | What it does |
|---|---|
| Program execution | Load program into memory, run it, handle its termination |
| I/O operations | Provide a uniform interface for reading/writing devices |
| File system | Create, delete, read, write, and organize files |
| Communication | IPC between processes via pipes, shared memory, messages |
| Error detection | Detect hardware failures, software bugs, and handle gracefully |
| Resource allocation | CPU scheduling, memory allocation, device assignment |
| Protection | Ensure one process can’t corrupt another or the OS itself |
| Accounting | Track resource usage for billing or optimization |
The Process View
The OS manages processes — programs in execution. It handles:
- Creation —
fork(),exec() - Scheduling — which process runs when
- Synchronization — coordinating access to shared resources
- Communication — data exchange between processes
The Resource Manager View
Every request for CPU, memory, or I/O goes through the OS. It:
- Multiplexes — shares one CPU among many processes via scheduling
- Protects — prevents processes from accessing each other’s memory
- Virtualizes — gives each process the illusion of having its own dedicated machine
Q: What is the process view of an OS?
A: The OS manages the lifecycle of processes — creating them (fork), scheduling them (which one runs on the CPU next), synchronizing them (preventing race conditions), and terminating them. The process abstraction lets each program think it has its own CPU and memory.
Q: What is the resource manager view?
A: The OS is a resource allocator — it decides which process gets the CPU, how much memory each process can use, and which process can write to disk. Without this management, programs would interfere with each other and the system would crash.
Q: List three essential OS services.
A: (1) Process management — create, schedule, terminate processes. (2) Memory management — allocate, track, protect memory. (3) I/O management — coordinate communication with external devices.
Premium Content
Unlock OS Fundamentals & Services and all premium lessons with a subscription.
From ₹199.99/year — See plans