CS111 Key Concepts
Instructor: Mark Kampe
Last updated: Jan 1, 2008
This is a list of the key concepts that I cover in the lectures,
and that I want to make sure you understand. I base over 90% of
all test questions on these topics.
If, after a lecture, you find
that you do not have a good understanding of one of these topics,
please ask me for clarifications.
If, when studying for the exams,
you make sure that you have a good understanding of all of these
concepts, you should do well on the tests.
First Exam
Lecture 1 - Course Introduction
- key principles
- mechanism policy separation
- modularity/encapsulation
- intefaces vs implementations
- appropriate abstraction
- resources (serial, partitionable, sharable)
- resource abstractions (simplifying and generalizing)
- roles and functions of the operating system
- manage and abstract the hardware
- relation of os, libs, apps
- why functionality goes in the OS (vs. in apps/libs)
- batch vs. timesharing operating systems
Lecture 2 - Introduction to Operating Systems
- viewing services in terms of objects and operations
- service interfaces: ISAs, APIs and ABIs
- threads and processes
- definitions, differences, uses
- thread state vs process state
Lecture 3 - Computer and I/O and Architecture
- supervisor vs user mode execution
- traps and interrupts
- state save and restore
- vectoring, 1st and 2nd level handlers
- busses, controllers, devices, interconnections
- I/O mechanisms, what they are, how they work
- polled I/O
- direct I/O
- memory mapped I/O
- I/O interrupts
- interrupt driven I/O
- DMA
- smart controllers
- disk geometry, factors influencing disk I/O performance
Lecture 4 - Processes, the user view
- object modules, load modules
- contents, characteristics, definitions
- the linkage editing process
- process address spaces
- text, data, stack segments and their characteristics
- the process of program loading
- shared libraries and DLLs, structure and loading
- process stacks and thread stacks
- registers and process context
- procedure calls and stacks
- system calls
- asynchronous exceptions and signals
- signals as s/w analog to traps
- signal linkage mechanisms
- details of call stacking (procedures, traps, signals)
Lecture 5 - Processes, the system view
- process descriptors
- general contents (state, references to resources)
- resident and non-resident state
- (clone vs tabula rasa process creation)
- process/thread context switching
- general activities and their costs
- details of the context switching process
- user vs kernel mode threads
- user and supervisor mode execution
- system call trap gates, reasons, how they work
- message based requests, costs and benefits
- synchronous vs asynhconous, costs and benefits
- virtual machines and OS emulations
- blocking and unblocking, dispatching and yielding
- swapping, primary and secondary storage
Lecture 6 - Scheduling
- goals responsibilities of schedulers
- (measuring scheduler performance)
- pre-emptive scheduling, advantages and disadvantages
- scheduling mechanisms and algorithms
- starvation, how it happens, how to prevent
- optimal time slice length
- priority based scheduling
- (multi-queue scheduling)
- scheduler behavior
- (ideal and real throughput and response time)
- starvation
Lecture 7 - Synchronization
- general classes of race conditions
- conflicting updates
- the sleep/wakeup race
- all or none transactions (to be addressed later)
- distributed consensus (to be addressed later)
- critical sections
- what they are, when they happen
- protecting critical sections with locks
- problems/limitations with disables and spin locks
- atomic instructions
- what they are, what they do
- atomic updates in critical sections
- implementing locks with atomic instructions
- where to lock, advisory vs enforced locking
- synchronous vs asynchronous delilivery and receipt
- the sleep/wakeup-race
what it is, how it can be solved,
- resource contention and convoys,
- how they happen, how to avoid,
- lock granularity, shared locks
Lecture 8 - Synchronization continued
- semaphores and their use
- how semaphores work
- semaphores for locking
- semaphores for asynchronous completion
- semaphores for producer/consumer synchronization
- correct semaphore implementation
- solving the sleep/wakeup race
- (limitations and correct use of interrupt disables)
- (limitations and correct use of spin locks)
- priority inversion
Lecture 9 - Advanced Synchronization
- monitors and condition variables,
- why monitors, how they work,
- why condition variables, how they are used
- advantages of monitors over semaphores
- problems with monitors
- the dining philosopher problem
- how it illustrates deadlock
- how to solve it with monitors
- inter process communnication
- shared memory and messages, characteristics and advantages
- synchronous vs asynchronous operations
- in-band vs out-of-band communication
- (flow control)
- (stream vs msg)
- (unicast, multicast, pub/sub)
Lecture 10 - Deadlocks
- deadlocks, what they are, how they happen
- commodity vs general resources
- commodity deadlock avoidance techniques
- reservations, how and why, graceful failure
- bankers algorithm, safe over-booking
- four necessary conditions for deadlock,
- what they are, why each is necessary
- how to apply each to preventing deadlocks
- live locks, hangs, (hang detection)
Second Exam (first half of final)
Lecture 11 - Memory Management
- responsibilities of memory manager
allocation, map it in/out, migration
- user address space
- fixed partition, internal fragmentation
calculating and mitigating fragmentation
- variable partition, external fragmentation
- variable partition algorithms, and their performance
- free lists and coalescing
- (special pools of fixed size buffers)
- garbage collection, what it is, why and how
- the relocation problem
- what it is
- how virtual address spaces solve it
- segment and paged relocation
- advantages of paging, effects on fragmentation
Lecture 12 - Virtual Memory
- paging
- paging MMUs and how they work
- demand paging
- steps of page fault handling
- replacement algorithms and performance
- spatial reference locality
- belady's optimal algorithm
- (stack algorithms)
- LRU algorithms (clock implementations)
- working sets, working set algorithms
- (pre-loading, dirty pages, preemptive write-back)
- paging and segmenation, address space layout
- scatter/gather for DMA transfers
- moving data between kernel and user space
Lecture 13 - Device I/O and Drivers
- device drivers
- roles and functions, block vs. character devies,
special files.
- classes of drivers and their clients, driver instances
- DDI, DKI, why they exist, types of functions included
- dynamic module loading, dynamic vs static configuration
- driver use sessions, flow of control, execution context
- layered drivers, why, how organized, how interconnected
- I/O techniques
- DMA w/completion, chain scheduling, double buffering
request scheduling, differences between
read and write, solicited vs unsolicited input
- scatter/gather
- top-half/bottom-half interrupt handling
- driver synchronization needs and techniques
Lecture 14 - File Systems (files)
- abstraction of storage, named data w/attributes
- layers of implementation, block I/O, file system integration layer
- levels of indirection in open file reference
- sequential files vs random access
- mapping between blocks and streams
- keeping track of allocated blocks (general approaches)
- DOS, Unix, MVS
- (performance of page finding)
- free lists (general approaches)
- DOS, Unix, BSD, MVS
- (defragmentation and performance issues in space allocation)
- indexed sequential files, MVS VSAM
- structure, motivations
- record insertion process (and performance)
- volumes and file system structure
- (DOS, UNIX, MVS volume structure)
Lecture 15 - File Systems (directories and volumes)
- file names, flat, tree structured
- MVS catalogs, DOS directories,
- absolute and relative path names
- Unix directories
- links vs copies
- hard and symbolic links (refrence counting)
- file attributes, operations on containers
- file system performance, block size, cylinder locality
- LRU block caching and cache performance
- read ahead and deferred writes
- file system robustness
- causes of corruption
- ordered writes
- audits
- journaling
- disk partitioning, motivations, FDISK
- file system mounting
- RAID
- basic types (0, 1, 5) & motivations
Lecture 16 - Protection
- authentication, authorization
- Unix and DOS authorization mechanisms
- access checking, enforcement, and trusted policy data
- (ways of guaranteeing enforcement)
- capabilities and access control lists
- privileged users and trusted software, SETUID
(viruses and trojan horses)
- network security, why it is worse
- man in the middle attacks
- session keys and SSL
- modern applications of encryption technology
- public key encryption
- cryptographic hashes
- digital signatures
- public key certificates
- (certificate authorities and delegated trust)
Lecture 17 - Networking
- Interaction Paradigms
- work-group computing
- client-server computing
- peer-to-peer networking
- implementations
- layered protocol implementations
- performance issues and approaches
- challenges of distributed computing
- Deutsch's seven falacies
- leases and revocation
- atomic transactions
- three-phase commits
- distributed election protocols
- cluster membership
- heart-beating
Lecture 18 - Distributed Filesystems
- classes of solutions
- (copying, remote disks, explicit, implicit)
- partitioning the work, client/server architecture
- goals and issues in remote file systems
- performance, robustness, synchronization, propagation
- authentication and authorization, [peer-peer vs client session protocols]
- caching, transactions, stateless servers, idempotent ops,
- centralized synchronization, server fail-over
- partition/rejoin, disconnected operation
- examples: NFS, Andrew, HTTP, CIFS
- design centers, characteristics, advantages, disadvantages
- layers of implementation, client/server architecture
Lecture 19 - Distributed Computing
- goals for distributed systems
- classes of distributed computing systems
- SMP, NUMA
- SSI clustering
- loosely coupled systems, horizontal scalability
- motivations, architectures, challenges for each
- distributed computing paradigms: network aware, RPC, object
- basic RPC model, procedure to RPC mapping
- local vs. remote objects, issues and solutions
- Obeject Referenc Brokerss
- evolution from ABIs to protocols
- effect of distributed computing on system architecture