What an operating system is

On this page
  1. Definition
  2. Three roles
  3. OS challenges
  4. A short history
  5. Questions to think about

An operating system is software that manages a computer's resources for its users and applications. It plays three roles at once – referee, illusionist and glue – and is judged on reliability, security, portability and performance.

Definition

An operating system (OS) is software to manage a computer's resources for its users and applications. The course follows the textbook Operating Systems: Principles and Practice (Anderson & Dahlin) and is taught as a flipped classroom: video lectures at home, practical exercises in class.

Three roles

Referee
Resource allocation among users and applications, isolation of users and applications from each other, and communication between them.
Illusionist
Each application appears to have the entire machine to itself: an infinite number of processors, (near) infinite memory, reliable storage and reliable network transport. This is what virtualisation means in an OS: providing the illusion of resources that may not be physically present.
Glue
Common services: libraries, user interface widgets and so on.

Example: file systems

  • Referee: prevent users from accessing each other's files without permission, even after a file is deleted and its space re-used.
  • Illusionist: files can grow (nearly) arbitrarily large, and they persist even when the machine crashes in the middle of a save.
  • Glue: named directories, printf, and so on.
On the exam

Isolation is the reason an error in one application should not disrupt other applications (2023, Q1). A memory leak in one program that makes other programs stop responding is a symptom of poor reliability (2024, Q1).

OS challenges

Reliability
Does the system do what it was designed to do?
Availability
What portion of the time is the system working? Measured with mean time to failure (MTTF) and mean time to repair (MTTR). Availability improves if MTTF goes up or MTTR goes down.
Security
Can the system be compromised by an attacker?
Privacy
Data is accessible only to authorised users.
Portability
For programs: an application programming interface (API) and an abstract virtual machine (AVM). For the OS itself: a hardware abstraction layer.

Performance

Latency (response time)
How long does an operation take to complete?
Throughput
How many operations can be done per unit of time?
Overhead
How much extra work is done by the OS?
Fairness
How equal is the performance received by different users?
Predictability
How consistent is the performance over time?

The same terms come back in scheduling.

A short history

EraWhat was expensiveWhat the OS did
Early systemsComputersOne application at a time, with complete control of the hardware. The OS was a runtime library and users stood in line.
Batch systemsComputersKeep the CPU busy with a queue of jobs; load the next job while the current one runs. Users submitted jobs and waited.
Time-sharingComputers and peopleMultiple users at the same time. Multiprogramming and interactive performance: as computers got cheaper, optimising for user time mattered more than computer time.
TodayNeitherSmartphones, embedded systems, laptops, tablets, virtual machines, data-centre servers.

Looking ahead, the lecture lists giant-scale data centres, more processors per computer, more computers per user and very large-scale storage.

Questions to think about

  • What hardware and software do you need to safely run an untrustworthy application? (Answered in the kernel abstraction.)
  • How should the OS divide processing time between competing uses? First to arrive, smallest, largest? (Answered in scheduling.)
  • How does a web server manage many simultaneous requests, keep clients safe from malicious scripts, and give clients a consistent view while the site is updated?

On earlier exams

Practise this topic in the quiz (9 questions)