All chapter #s are for the 9th edition.
Chapter
1
What
is an O.S?
The kernel
A traffic cop
A resource
allocator
The kernel + utilities and stuff
Chapter 2
System Calls
It’s a request to the OS to do something
It’s
Load registers
TRAP
Answer in a return register
I/O Overlap
Why
How to achieve
Chapter 3
What is a process
Different from thread
Different from executable
Process queues
Running
Ready
New
Exit
Wait
Ways to make a new process
Fork
Spawn/system
Chapter 4
Threads -- definition of
Threads share code, heap(global variables and new/delete stuff) but not stack(local variables)
How to program threads using the pthread library
pthread_creat()
pthread_join
C++ Threads
Java threads
locking
Even readers need to lock if there is anyone writing.
Chapter 5 (Skip)
Chapter 6
CPU Burst -- definition
Preemptive scheduling
Aging
Criteria
CPU Utilization
Throughput
Wait time
Starvation
Fairness
Algorithms
FCFS
Shortest Job Next
Round Robin
Priority
Multi-level feedback queues (yes, really)
Real Time
Priority Inversion -- the definition and the solution
Which process goes next
Most important????
Soonest deadline???
Soft vs Hard real time
Chapter 7
Deadlock
Definition
Avoid by ordering resources
Avoid by using two phases
Avoid by drawing the wait-for graph
Avoid by timeouts
Chapter 8 and 9
Definition of swapping
Segments
Hardware needed
External fragmentation
Choosing a spot
First fit
Best fit
Worst fit
Paging
Hardware needed
What do do on an MMU interrupt (see chart 9.2.2, page 405)
Page Tables
Protection
Computing the size
Multi-level page tables
Page table base registers
Translation lookaside buffer
Internal fragmentation
Sharing pages
Code
Heap (if you’re two threads of the same process)
copy-on-write
Replacement algorithms
Optimal (Belady's Min)
LRU
FIFO
Additional bits
Chapter 10
Disk scheduling algorithms
FCFS
Elevator
Cyclic elevator
Shortest seek next
RAID (especially levels 0, 1, 5)
What to do for error
What to do when a new disk is inserted
Speed
Small reads
small writes
large reads
large writes
Capacity
Sledge hammer factor
File systems (Chapter 11)
Files
Have data
Have metadata - name, permissions, times, locations on disk, size ….
File Operations
Open – finds the file, check permissions, expensive
Create – Make a new file
Unlink – delete a file or reduce it’s reference count
Close – Free resources, maybe cheap
Read – get data off disk or from cache
Write – often just store in cache and schedule the write to hard storage
Append – might be nice to have, but we don’t
Seek – move to new location in the file
Stat – Get metadata
Truncate – cut file back to N bytes. Often back to zero bytes.
Directory Operations
Create a file
Delete a file
Rename a file
opendir/readdir/closedir
Directory Structure
Sometimes just one directory – sucks
Sometimes are trees
Sometimes are full graphs
How to tell a file’s type
extension – what everyone uses
MacOS creator app code
Code in the file-- this method is bad
Partitions – divide the hard drive into chunks and treat each chunk a a separate file system
Mounting is putting a file system on top of a directory
UNIX does this
Windows sometimes uses drive letters instead.
Consistency Semantics (11.5.3)
Session (open/close) consistency
Unix (single image) consistency
Immutable consistency
Ad hoc consistency (not in the book)
File systems
VFAT (http://euclid.nmu.edu/~rappleto/Classes/CS426/Notes/FileSystems/vfat-file-system.html)
VFAT organization
Master boot record
Two vfats
root directory
data stuff
File names and long file names
EXT2 (http://euclid.nmu.edu/~randy/Research/Papers/EXT2/)
EXT2 organization
Many groups .. each group has a
superblock – stuff about the whole file system like free space in file system
group descriptor block – stuff about that block like free space in this block
inode bitmap – which inodes are free
block bitmap – which blocks are free
data blocks
root directory is always inode #2
directories are – list of (file_name_length, file_name, inode_number)
inodes are
metadata like permissions and times
a list of 13 pointers to data
a pointer to an indirect block
a pointer to a double-indirect block
How to program a shell
no fork bombs please
iterate through the path and try to exec
dup2 is used for pipe and file redirection
Can catch ^C using a signal handler
Opendir/Readdir/Cloasedir
Supercomputers
Are zillions of cores (and maybe older cores too)
Programming them is very hard
The network costs as much as the computers
Use 5-15 MW of power