6.6: Deadlock Prevention
Attack one of the coffman/havender conditions
6.6.1: Attacking Mutual Exclusion
Idea is to use spooling instead of mutual exclusion. Not possible for many kinds of
6.6.2: Attacking Hold and Wait
Require each processes to
RAID (Redundant Array of Inexpensive Disks)
Tanenbaum's treatment is not very good.
The name RAID is from Berkeley.
IBM changed the name to Redundant Array of Independent Disks. I wonder
A simple form is mirroring, where two disks contain the same d
5.2: Principles of I/O Software
As with any large software system, good design and layering is important.
5.2.1: Goals of the I/O Software
We want to have most of the OS, unaware of the characteristics of the specific
4.4.2: Famous flaws
Good bathroom reading.
Trojan horse attack: Planing a program of your choosing in place of a well
known program and having an unsuspecting user execute it.
Some trivial examples:
1. Install a new version of login that does everythin
4.3.3: Shared files (links)
`Shared' files is Tanenbaum's terminology.
More descriptive would be `multinamed files'.
If a file exists, one can create another name for it (quite possibly in another
This is often called creating a (or anothe
4.1.3: File types
1. (Regular) files.
2. Directories: studied below.
3. Special files (for devices). Uses the naming power of files to unify many
# prints on screen
dir > file
# result put in a file
dir > /dev/tape # results
The issue is where on disk do we put pages.
For program text, which is presumably read only, a good choice is the file
What if we decide to keep the data and stack each contiguous on the backing
store. Data and stack grow so must b
3.4.4: Second chance PRA
Similar to the FIFO PRA but when time choosing a victim, if the page at the head of
the queue has been referenced (R bit set), don't evict it. Instead reset R and move the
page to the rear of the queue (so it looks new). The page
Each memory reference turns into 2 memory references
1. Reference the page table
2. Reference central memory
This would be a disaster!
Hence the MMU caches page#->frame# translations. This cache is kept near
the processor and can be
Chapter 3: Memory Management
Also called storage management or space management.
Memory management must deal with the storage hierarchy present in modern
Registers, cache, central memory, disk, tape (backup)
Move data from level to level of th
2.4: Process Scheduling
Scheduling the processor is often called `process scheduling' or simply
The objectives of a good scheduling policy include
Low response time (important for interactive jobs).
Low turnaround t
What follows is Peterson's solution. When it was published, it was a surprise to see
such a simple soluntion. In fact Peterson gave a solution for any number of processes.
A proof that the algorithm satisfies our properties (including a strong fairness
1.3.3: System Calls
System calls are the way a user (i.e. a program) directly interfaces with the OS. Some
textbooks use the term envelope for the component of the OS responsible for fielding
system calls and dispatching them. Here is a picture showing so
Chapter 1. Introduction
Homework: Read Chapter 1 (Introduction)
Levels of abstraction (virtual machines)
Software (and hardware, but that is not this course) is often implemented in
The higher layers use the facilities provided by lower layers.