Assignments due: Problem Set 1 is due on Tuesday, September 10 (11:59pm).
Problem Set 2 will be posted by tomorrow and due on 24 September.
For PS2, you are required to work with a partner (you can choose on your
own), so try to find a partner you want to work with now. To help find
a partner, you can use the Piazza teammates
What is a process?
Some terminology (not really important, but you'll hear people use them):
- Multiprogramming - program gets to run until it gets stuck, then supervisor takes over and selects another program to run.
- Non-pre-emptive multi-tasking (sometimes called co-operative multi-tasking - program gets to run until it voluntarily gives control back to the supervisor. (Sometimes used to mean the programs are all scheduled statically to recieve a particular processing time slice.)
- Normal (pre-emptive) multi-tasking - program gets to run until (approximately) supervisor decides its someone else's turn.
(For historical reasons, the terms and hyphenating-conventions are confusing, using "program", "task", and "process" to essentially interchangably, except that the historical term multiprogramming is different from multitasking.)
What are some consequences of the difference between non pre-emptive multi-tasking and pre-emptive multi-tasking?
How can pre-emptive multi-tasking even be possible with only one processor?
How often should the kernel timer interrupt (a.k.a., "supervisor's alarm clock") go off?
What programs should be able to change the kernel timer interrupt frequency?
Who prefers the kernel timer interrupt interval to be shorter? Who prefers it to be longer?
The main command we used in the shell demo is:
Try running it on your machine (if you are running Mac OS X or Linux, probably won't work on Windows unless you have installed lots of extra stuff) to see what processes are running.
- Unix History
- PKR for the iPhone
- Jekyll on iOS (Tielei Wang, Kangjie Lu, Long Lu, Simon Chung, and Wenke Lee, USENIX Security 2013)
- Aaron Sorkin interview
- More about Sorkin's previous movie about virtual memory. This is the lecture from the movie - we'll get into virtual memory some later in the course, but the lecture in the movie is pretty good if you want to get a head start. ("The take-away from the movie is clear: nerds win. Ideas are cheap and don't mean squat if you don't know how to execute on them. To have an impact you need both the vision and the technical chops, as well as the tenacity to make something real." - Matt Welsh on The Social Network)
Kernel Timer Frequency Challenge
I'm not certain this is completely reliable, but here's what I used to determine the kernel timer frequency for my MacBook Air: How To determine Linux Kernel Timer Interrupt Frequency
$ gcc timer.c ; ./a.out kernel timer interrupt frequency is approx. 4016 Hz or higher
It is worth a midterm exemption (and Rust sticker!) for the first person (or team of two people) who writes an accurate kernel timer in Rust.