Operating System Evolution
Serial Processing
Operating systems are continually updated, and a version upgrade changes the operating system. Reasons include fixing bugs, supporting new services, hardware upgrades, and improving performance.
Computers in the serial-processing period were very large and had no operating system. They were operated using switches and displayed results through lights. Experts normally operated these machines, which were difficult for ordinary users to use. This caused two main problems:
- Inefficient scheduling: the machine waited for a person to operate switches, wasting time.
- Long setup time: without automation, compilers and source programs had to be loaded and intermediate code saved manually.
Simple Batch Systems
Simple batch systems were an early generation of operating systems. A batch of jobs could wait in secondary storage. When no job was available to run in memory, the monitor selected a job from secondary storage and loaded it. The simplest selection method follows queue order, but this is not necessarily the most suitable order, introducing scheduling algorithms.
Multiprogramming
A multiprogramming system allows several programs to be ready to run. When the running program temporarily cannot continue, for example while waiting for input or output, the system automatically runs another ready program. Once the cause disappears, such as input arriving or output completing, the paused program can resume at some later time.
Hide I/O waiting with useful work
A: CPU 2 ms, I/O 4 ms, CPU 2 ms. B: CPU 4 ms. Both arrive at 0; A starts first. One CPU and one independent I/O device; no switching overhead.
CPU runs A.
Final completion: 12 ms · Final CPU utilization: 66.7%
Concurrent Programming
Concurrent programming can improve operating-system and server performance. Concurrency is an important feature of modern operating systems. Multicore CPUs also allow tasks to run in parallel, but concurrency does not require multiple cores.
Traditional DOS normally ran one foreground program at a time. Viruses can interfere with program execution, but a single-process model does not explain why all programs would stop running.
Windows uses a multiprocess model and can run several programs within the same interval. Task Manager shows processes in the system, but these processes are not necessarily executing in parallel. Multiple processes do not guarantee normal operation after a virus infection.
On early hardware without multicore CPUs, round-robin time slicing allowed several processes to execute alternately within the same interval. At a particular instant, only one process executed instructions, with resources switched between processes.
KNOWLEDGE QUIZ
Server hardware has finite performance, and some programs do not fully use its resources. With a traditional single-process model, some hardware resources may remain idle while the process waits for I/O.
Time-Sharing Systems
A time-sharing system is a multiprogramming system that allocates time slices to tasks. When a slice expires, execution switches to the next ready task. This suits interactive systems, such as network servers using round robin to serve tens or hundreds of users within the same interval.
Time sharing has drawbacks: very short slices cause frequent interrupts and substantial overhead. Some kernel operations cannot be interrupted at arbitrary points and temporarily defer preemption, rather than becoming impossible to resume. Scheduling policies must therefore suit the application environment.
Concurrent time slices or parallel cores?
C and D each need 4 ms of CPU work and arrive at 0. Ignore switching overhead. One core shares time; two independent cores can run one job each.
At 0 ms, only C occupies the one core.
Completion: 8 ms · D first service: 1 ms
Mobile Systems
Mobile devices are small, handheld, and portable. They generally have flat-panel displays such as LCD or OLED and touchscreens with digital buttons and keyboards. Examples of mobile operating systems include Apple iOS, Google Android, and the historical Research in Motion's BlackBerry OS.
Compare batch, multiprogramming, and time sharing
Jobs A and B arrive at time 0. Ignore switching overhead and choose A first.
| Job | Arrival | CPU | I/O | CPU again |
|---|---|---|---|---|
| A | 0 ms | 2 ms | 4 ms | 2 ms |
| B | 0 ms | 4 ms | — | — |
- Draw CPU and device timelines for serial batch processing and multiprogramming. In the latter, run B while A waits for I/O; finish B before A resumes.
- Calculate completion time and CPU utilization for each.
- CPU-only jobs C and D each need 4 ms and arrive at 0. Draw one-core round robin with a 1 ms quantum and two-core parallel execution; ignore overhead.
- Draw monolithic and microkernel service paths, showing where the file service runs and how requests reach it.