Administrivia
- Project 2 deadline extended 2 days (now due Wed, Feb 6).
- Midterm tomorrow.
Midterm Review
Disclamer: This is not a complete list (in fact, it's only the most
obvious topics, there will surely be topics on the test not mentioned
here), nor is it based on the test. See Prof. Zahorjan's email for a more
comprehensive list. Also, don't expect the midterm to be as
straight-forward as these questions.
General OS Concepts
- What is an OS? (Ch. 1)
- Goals?
- Functions? (Ch 3.2)
- What support do OSs get from computer architecture? Do OSs actually
need all of the support, or is it just an optimization? (Ch. 2)
- Protected mode bit, priveleged instructions
- TLB/address translation system
- I/O protection
- CPU protection (timers)
- What resources do OSs manage/allocate?
- How do programs make resource requests? (Describe steps in
detail.)
- What advantages/disadvantages does the layered structure
have?
- What is the difference between mechanism and policy?
Processes (Ch. 4)
- What is the difference between multiprogramming, multithreading,
and multiprocessing?
- How do the different types of OSs (dedicated, batch, timeshare,
desktop PC, embedded/real-time) manage/schedule processes
differently?
- What is the difference between preemptive and non-preemptive
scheduling? What are advantges/disadvantages of each?
- What does a context switch involve?
- Draw the state diagram (with transitions) for processes. (Ch. 4.1.2)
- What are the components of the Process Control Block (PCB)?
- Is the PCB a kernel or user-level data structure?
- Name a few of the reasons a process might block. What happens to
the PCB when a process blocks?
- Under UNIX, what happens when you type a command into the
shell? (Assume it is not an internal shell commmand).
- What mechanisms might the OS provide for IPC?
Multithreading
- Define thread.
- What benefits does multithreading provide?
- Under kernel-threads (one-to-one model), what happens when a
thread makes a blocking system call? What happens in a switch between
two threads in the same process? What happens in a switch between two
threads in different processes?
- Under user-level threads only (many-to-one model), what happens
when a thread makes a blocking system call? Why must it be this
way? (Describe the answer in terms of the kernel's view, and the
process state diagram from 4.1)
- How many threads are in a single process?
- In a multithreaded process, what is shared between all the
threads, and what is private to each thread?
- What are thread pools? What are the advantages/disadvantages?
Synchronization
- When is synchronization neccessary?
- Define atomic (as used in CS).
- Bonus: define idempotent.
- Answer: Idempotent operations are operations that can be repeated
without changing the final outcome. For example,
i=5
is
idempotent, while i++
is not.
- Comes from idem (same) and potent (having effect, powerful).
- What are two components of synchronization?
- Define 4 synchronization primitives, the operations on
them, and describe what they provide.
- What 2 properties of semaphores distinguish them from the other
synchronization primitives?
- What is the critical section problem? (Ch. 7.2)
- What is busy waiting? Why is it bad? Why is it good?
- What makes a routine thread-safe?