Type a branch, a subject or a topic — “round robin”, “paging”, “civil”.

Types of Operating System

The same three jobs run through batch, multiprogramming and time-sharing, on one shared time axis.

Skip to the animation

The classic types of operating system — batch, multiprogrammed, time-sharing, real-time — are really one question answered four ways: when is the OS allowed to take the CPU away from a running job?

The problem all of them are solving

A CPU executes billions of instructions per second. A disk takes several milliseconds to answer — millions of CPU cycles of nothing. Almost every real program alternates between short CPU bursts and long I/O waits.

So the machine's efficiency comes down to one question: what happens to the CPU while a job is waiting for its disk? The history of operating systems is a sequence of better answers.

Batch systems

Jobs are collected together and run one at a time, to completion. You submitted a deck of punched cards and came back hours later for the printout. There is no interaction — you cannot influence a job once it is running, because there is no way to reach it.

When a job blocks on I/O the CPU simply idles, because no other job is allowed to start. Utilisation is poor and the last job in the queue waits for all of the ones ahead of it.

Multiprogramming

Keep several jobs in memory at once. When the running one blocks for I/O, hand the CPU to another that is ready. When the first job's data arrives, it queues up for its next turn.

This is the idea that made operating systems necessary — it needs memory protection (jobs are resident simultaneously), a scheduler, and interrupt handling. Its goal is CPU utilisation: keep the expensive part busy.

The switch happens only when a job *chooses* to block. A job in a pure computation loop can hold the CPU forever, and nothing can stop it.

Time-sharing (multitasking)

Add a hardware timer that interrupts every few milliseconds. Now the OS regains control whether the running job likes it or not, and can rotate the CPU among all of them. Each user gets the illusion of a private machine.

The goal changes from utilisation to response time. Switching more often costs a little throughput — every context switch is real work thrown away — and buys a lot of interactivity. Every desktop, phone and server you have used is a time-sharing system.

The rest of the family

Real-time
Correctness depends on *when* the answer arrives, not just what it is. Hard real-time guarantees a deadline (engine control, pacemakers, airbags); soft real-time merely prioritises it (video playback, where a late frame is ugly but not fatal). Note it is about predictability, not raw speed.
Distributed
Many machines presented to the user as one. Adds network failure, clock skew and consistency to every problem the OS already had.
Network
Machines stay visibly separate; the OS just provides shared services — files, printers, logins — across them.
Embedded / mobile
Fixed hardware, tight memory and power budgets, often a real-time core. Your phone's OS is a time-sharing system that also cares enormously about battery.

Side by side

TypeCPU is taken away…Optimises for
Batchnever — job runs to completionthroughput, simplicity
Multiprogrammingwhen the job blocks on I/OCPU utilisation
Time-sharingon a timer, at any momentresponse time
Real-timeby deadline prioritymeeting deadlines predictably

Watch it work

loading visualisation…

Check yourself

question 1 / 4

One question at a time. Pick an answer to see why it is right or wrong, then move on — there is no score to keep and nothing is saved.

A batch system and a multiprogrammed system run the same three jobs. What actually changed?
What does time-sharing add on top of multiprogramming?
A system must respond to a sensor within 5 ms, every time, or the machine it controls is damaged. Which kind of OS is that?
Why did batch systems have such poor CPU utilisation, even with fast hardware?

0 / 4

4 still unanswered — the dots above jump straight to them.