Objectives of Operating System
1. The Three Primary Objectives
- Convenience — make the computer comfortable to use. The OS hides registers, tracks and device protocols behind files, folders, windows, printers and menus.
- Efficiency — make the hardware productive. The OS keeps the CPU, memory and devices busy through scheduling, multiprogramming, caching and buffering, so expensive hardware is not idle.
- Ability to evolve — allow new hardware, new services and new features to be added without rewriting existing programs (drivers, modules, updates, backward compatibility).
2. Role 1 — Resource Manager
The computer contains finite resources: CPU time, main memory, disk space, printers, network bandwidth. Many programs compete for them, so the OS must:
- keep track of every resource and who is using it (tables for processes, memory maps, device queues);
- allocate and reclaim resources on request (scheduler, memory allocator, file-space manager);
- mediate conflicts — if two processes want the printer, the OS queues them; if two processes want the same file, it locks it;
- account for usage — time and memory consumed per user/process for billing or quotas.
3. Role 2 — Extended Machine (Abstraction)
Hardware offers an ugly interface: disk cylinders, head numbers, sectors, interrupts. The OS presents a virtual (extended) machine that is far easier to program:
| Real hardware | What the OS shows the programmer |
|---|---|
| Disk platters, tracks, sectors | Files and directories |
| CPU registers, memory words | Processes, threads, variables |
| Interrupt lines, device registers | read(), write(), printf() |
| Physical RAM | Virtual memory address space |
| Network adapter + frames | Sockets, URLs, connections |
| Timer chip | Sleep, timeouts, scheduling |
4. Specific Objectives (the checklist)
| Objective | Meaning |
|---|---|
| Efficiency / high utilisation | Keep CPU and devices busy; minimise idle time |
| Throughput | Maximise the number of jobs completed per unit time |
| Minimise response time | Interactive users must get quick replies (typical target: < 1 s) |
| Minimise turnaround time | Batch jobs finish as soon as possible after submission |
| Fairness | Every job gets its share; no process is starved indefinitely |
| Protection, security | Users and programs are isolated; data is protected from unauthorised access |
| Reliability / fault tolerance | Detect and contain hardware and software failures; keep the system usable |
| Convenience / user-friendliness | Simple interfaces (GUI, CLI), consistent commands, help |
| Portability | The OS itself should move to new machines with minimal changes |
| Scalability / multiuser support | Work well from one user to thousands of users |
| Backward compatibility | Old applications continue to run on the new version |
| Error detection & reporting | Clear diagnostics instead of silent corruption |
5. User Goals vs System Goals
| User's view | Designer's/owner's view |
|---|---|
| Convenient to use | Easy to design, implement and maintain |
| Fast response | Reliable and error free |
| Safe and secure | Efficient in using resources |
| Predictable, consistent | Flexible and easy to extend or port |
| Data never lost | Support many users and device types |
6. Objective Measurements (performance metrics)
Worked mini-example: jobs arriving at time 0 with burst times 5, 3 and 8, run without pre-emption in that order:
| Job | Burst | Completion | Turnaround | Waiting |
|---|---|---|---|---|
| J1 | 5 | 5 | 5 | 0 |
| J2 | 3 | 8 | 8 | 5 |
| J3 | 8 | 16 | 16 | 8 |
| Average turnaround = 29/3 ≈ 9.67, average waiting = 13/3 ≈ 4.33, CPU utilisation = 16/16 = 100% (no idle time in this schedule). |
7. Inherent Trade-offs
Objectives conflict, so an OS cannot optimise all of them at once:
- Response time vs throughput — giving every small process a slice quickly means more context switching overhead, less total work done.
- Convenience vs security — automatic login and open shares are convenient but unsafe.
- Fairness vs priority — a strict FIFO is fair but a critical real-time task may miss its deadline; priority scheduling is responsive but can starve low-priority jobs (solved by ageing).
- Utilisation vs overhead — multiprogramming keeps the CPU busy but consumes memory and adds bookkeeping.
8. Exam Points
- What are the main objectives of an operating system? Explain convenience, efficiency and ability to evolve — 5 marks, very frequent.
- Explain the OS as a resource manager and as an extended machine — 5 marks, frequent.
- List the goals of OS design from the user's and the designer's point of view — 5 marks.
- Define throughput, turnaround time, waiting time, response time and CPU utilisation — 3-5 marks; numerical on a small job set — 5 marks.
- How does the OS provide protection and fairness? — 3 marks.
- Give any two trade-offs in OS design — 3 marks.