Introduction and Motivation

1. Formalia

  • Participants: me, Magnus, you
  • Material: litterature, course web page, Wiki, login
  • Examination: 2 parts (labs/assignments)
    • assigments: continuous examination in groups of 3; PM (esp. 1DT632)
    • labs: continuous examination in groups of 2
    • handins: secure email certificates from e.g. Thawte (see also instruction (section 1.1) and FAQ).
  • Registration

2. Operating systems

What is an operating system (OS)?

Which OS have you used? Which do you know exist?

Why do you study operating systems?

What does an OS do? Which parts (components) does it consist of?

2.1. What is an operating system?

OS sits "between the hardware and the software".

  • makes the hardware easier to use
    • by abstraction
  • makes more efficient use of the hardware
    • by optimising the use
    • by sharing the hardware between "users"
  • helps protection:
    • protects the hardware against programs
    • protects the "users" from eachother (and themselves), needed for efficient sharing
2.2. Why should you study operating systems?

E.g.

  • to learn why the computer works as it does (or not)
  • to be able to write real programs which use the computer efficiently
  • to be able to evaluate, adapt, and configure OS for your needs
  • to be able to modify or construct OS (components/modules) for your needs
  • gives more thorough understanding of computers, useful in "normal" programming (e.g. runtime systems for high-level languages)
2.3. A quick history of OS concepts

From few, extremely expensive and slow, computers, to modern interactive computing.

  • jobs, batch, overhead, job scheduling, spooling, multiprogramming, CPU scheduling, memory management, multitasking, processes, timesharing, file systems...
2.4. OS abstractions / components

Abstractions of hardware makes the computer easier to use and program.

  • Hardware: CPU, physical memory, disk (platters), keyboard (codes, up/down), screen (characters/pixels), network (bits, bytes, packets, streams)...

2.4.1. Processes

Program which can run on CPU, using other resources
Operations: create, start, stop, schedule (when should it run?), interact (with processes/users)

2.4.2. Memory

All programs (instructions) and data must be in main (physical) memory for CPU to use (fetch/store).

  • Memory typically too small: sharing necessary
  • Protection/separation, allocation, efficiency

2.4.3. Storage

Files, directories, file systems: stored on secondary/persistent storage medium.

  • sharing, protection/security, efficiency,

2.4.4. Interaction

I/O using keyboard, screen, disk, network...

  • stream/block access, synchronous/asynchronous, efficiency, ...

2.4.5. Time

What time is it now? How long time has passed now? Awake me in 3 ms! (Needed also internally, e.g. for scheduling)

2.4.6. Protection/Security

  • hardware protection: user/supervisor mode, controlled I/O, set/stop clock, memory protection
  • software protection: between users/processes/systems, e.g. file protection, memory sharing
2.5. Types of operating systems

Examples of classifications/aspects:

  • Batch: non-interactive, longer turn-around time (salary systems, administrative systems)
  • Interactive: one- or multi-user systems, faster response
  • Real-time: hard RT (process control, cars, airplanes), soft RT (transaction systems, databases, ATMs)
  • Embedded: in cars/factories/washing machines/phones
  • Parallel: more than one CPU in same box, sharing memory/devices (closely coupled)
  • Distributed: separate systems looking as one (loosely coupled, networking)
  • Centralised: not parallel/distributed

3. Course overview

Follows book pretty closely (chapters 1-15).

3.1. Process and process interaction
  • How do we run more than one program on the CPU "at the same time"?
  • Scheduling: in which order should processes be allowed to run?
  • Interaction: how should processes interact/collaborate? How do we avoid bad interaction (deadlock, starvation etc)?

Lab: process management in Unix/Linux.

3.2. Memory management
  • How to share available memory between processes
  • How to successfully fool the processes to believe we have more/enough memory
  • How to do this efficiently

Lab: process synchronisation and shared memory

3.3. Storage management
  • File systems: organisation and implementation
  • Efficient disk utilisation/use
  • Security and protection

Lab: Unix file system

3.4. PM and presentation

An opportunity to learn more, in depth: write a short PM on a subject in operating systems and present it to the others.

Examples:

  • why does NTFS suffer from fragmentation?
  • what is EROS (or some other "different" OS), and how does it differ from "standard" OSs such as Unix/Linux/Windows/MacOS?
  • how to make your Palm more useful by running Linux on it
  • an overview of a historically important OS (e.g. Multics, TOPS-20, ITS, MS-DOS)
  • [fill in your topic here]