Lecture 1: Introduction to operating systems
Exam
Introduction to operating systems and their history
Important questions:
- Why were operating systems developed initially?
- How did the features of operating systems evolve along with the development of the available hardware?
- How do we define the term "operating system" today?
You do not need to know details about the historical computers and operating systems discussed in that lecture
Defining an OS
- There are many definitions of the term 'operating system'
- Common ideas are:
- The OS serves the users and their programs, it is never an end to itself
- The OS has to know the hardware in detail and provides suitable abstractions to application programs
- Hardware and application requirements determine the services provided by an OS
- From this, its structure and functionality derives
- To understand which hardware abstractions are provided by operating systems today, we take a look at their history of development along with advances in hardware and typical applications
In the beginning: Punched cards
- Punched cards - paper cards with holes indicating a '1'
- Since 1725 used to control weaving looms
- Used by Hermann Hollerith for the 1890 US census
- Hollerith and two other companies formed IBM later
- Used until 1970s as versatile memory
The first Norwegian computer
- NUSSE - 'Norsk Universell Siffermaskin Selvstyrt Elektronisk", developed at UiO
- Constructed between 1950-1955
- 1000 vacuum tubes, 2 kB main memory, 40 kHz clock time
The first computer at NTNU (NTH)
- GIER - 'Geodætisk Instituts Elektroniske Regnemaskine', from Denmark in 1962
- 5 kB main memory
- Already provided:
- Operating system
- Algol-60 compiler
- Runtime library with virtual memory management
Serial processing
- Non-interactive programming of computers
- Input via punched card reader
- Output via printer
- Errors indicated using lamps
- Minimal CPU utilisation
- Because of slow I/O devices
- First system software as reusable program libraries
- Linker, loader, debugger, device drivers
Simple batch systems (from 1955)
- Reduced frequency op operator interactions
- First operating systems: 'resident monitors'
- Interpretation of job control commands
- Loading and execution of programs
- Device control
- The monitor stayed resident in memory and executed one application after the other
- Problems due to erroneous applications:
- Program doesn't terminate
- Writes in the memory of the resident monitor
- Accesses card reader directly and interprets control commands as data
- Solutions:
- Addition of a timer circuit generating interrupts
- Traps for erroneous programs
- Fence register to realise primitive memory protection
- Privileged operating mode of the CPU (supervisor mode)
- Deactivates fence register
- Allows input and output
Input/Output bottleneck
- Problem: CPU is faster than card reader and printer
- Valuable compute time is wasted by (active) waiting
- Solution 1: off line processing
- Enabled by magnetic tape dries
- Parallelisation of I/O using multiple satellite computers
- Solution 2: spooling
- Enabled by magnetic disk drives (random access) and direct memory access (DMA)
- Computation and I/O can now overlap
- Requires rules for processor allocation
Multiprogramming (from 1965)
- Despite spooling, a single program does not utlise the CPU efficiently
- System operation alternates between CPU bursts and I/O bursts, during with the CPU has to wait
- With multiprogramming, the CPU works on multiple jobs at the same time
- Consequence:
- The operating system becomes increasingly more complex
- Handling concurrent I/O activites
- Managing the main memory for multiple programs
- Internal management of pragrams in execution (processes)
- Processor scheduling
- Multi user operation: security and accounting
- The operating system becomes increasingly more complex
- Memory managmement
- Programs to be started need an assigned memory range
- Memory protection
- Simple fence register is no longer sufficient to isolate processes from each other
- Solution: use a simple memory management unit (MMU)
- Process management
- Every 'program in execution' has its own context
- When switching between processes, the context has to be switched as well
Dialog computing (from 1970)
- New I/O devices enable interactive software
- Keyboard, screen, later mouse
- Time sharing operation
- Enables acceptable response times for interactive users
- Timer interrupts ensure the preemption of processes which run (too) long
- System programs enable interactive software development
- Editor, shell, compiler, debugger
- Disks and file systems allow to allow access to programs and data at any time