NOTE: details about the project at the end of this note What scheduling scheme is used in current OSs? Most modern OSs have a scheduler that can handle "real time" and prioritized tasks. The "real time" status is intended for tasks like video and audio playback, although whether these processes actually use the real-time status isn't completely clear. The remaining tasks all have a priority assigned by the user/sysadmin (adjusted via "nice"), and then a separate dynamic priority that indicates how long they've been waiting to run, whether they're interactive or not, etc. The scheduler tries to balance all of these factors in some sort of reasonable way. My laptop seems to run slower when running on batteries. Is this possible, and is it to save energy? Many laptops will use the same chips designed for desktop systems, which aren't designed to conserve energy. One trick they use is to run the processor at roughly half-speed when running on batteries. Another trick is to make the screen dimmer. Chips designed specially for laptops will have more power conservation features, but are also more expensive than their desktop counterparts. On low-power CPUs, after doing a halt, will the CPU ignore clock interrupts (it seems like it should)? The CPUs designed for power conservation generally have different levels of "sleeping", each of which shut off progressively more of the system. As they shut down more things, they take longer to recover. With non-preemptive scheduling on Macs, were there problems with viruses that did infinite loops? Were programs made for Macs always protected against hogging the CPU? Regarding the viruses (virii?) I guess it was possible, but I don't really have any expertise in the field. Regarding applications, the programs that wanted to be successful generally tried to make sure that they didn't hog the CPU without yielding periodically. Otherwise, people could pretty easily tell what was the culprit. What does a scheduler do about a programs/processes with a lot of jumps/branches? Not sure I understand the question - the scheduler only gets invoked when the program terminates, blocks, yields, or when the timer goes off. If the process internally has a lot of twisty code, the scheduler never sees it. Do all media players use undirected yields to play smoothly? Note that the yield isn't there to be smooth - it's there because the process has nothing else to do until the next update time. Does the program or the OS determing its priority by yield? The OS ultimately determines the priority of a process. A process that blocks/yields before its time slice is over may get better treatment from the OS than one that runs until it's out of time. I'm still confused about blocking - how does a process become blocked? What exactly does it mean to be blocked instead of ready? A process is blocked when it needs "something" in order to continue - that "something" may be that it's waiting on some kind of I/O (network data to arrive, user to type on keyboard, disk activity to finish). When the process initiates one of these, either directly or indirectly, if the data isn't available, the process gets blocked. The "indirectly" mentioned above may be something like a major page fault. Do all threads in a multithreaded program have their own address space, or are all threads in the same space? All threads share the same address space. They'll have their own registers, and their own stacks. You may notice that we were assuming one stack that grows toward the heap. With multiple stacks, you have to set some predetermined maximum size for each stack since the simpler organization isn't an option anymore. Why is the Mac system called "cooperative" scheduling? It seems like the opposite of cooperative. In order for scheduling to work, all of the processes involved have to cooperate. That's why it's called "cooperative" - note that this is just another way of saying "non-preemptive". Note from a marketing point, it's generally good to call something a name that doesn't start with "non". When did the Mac switch from cooperative to pre-emptive? With the advent of OS X, apparently, which would put it relatively recently. I believe we're talking about 1-2 years old for the public release, although bits have been dribbling out to developers for some time now. How do computers communicate overseas? Are there wires in the ocean? What happens if a wire breaks in the ocean? There are in fact trans-oceanic cables in addition to satellites. These systems have some amount of redundancy so that alternate paths tends to take over when a main link fails. When communication satellites were launched, people assumed that the undersea cable would be its backup for reliability purposes. What they discovered was that the reverse tended to be true. Boats will sometimes not raise anchor when they should. Is the problem with interrupts causing the process to not yield that the timer resets when we re-enter the process that was running? Is this what is meant by the timer not having enough granularity? It seems that granularity refers to the smallest unit of time that the timer can measure. Does the timer not reset when re-entering the process and it just rounds the unit of time down? The problem is related to timer granularity. If the system's clock is only running at 100 interrupts/second, and the running process always gets interrupted after 1ms, then there's no way to determine how much time it really used. If the scheduler is not a process, is it part of the running process? The scheduler is part of the kernel. Can EE's get a CS account so we have enough disk space to test our programs remotely? I don't have any control over policy - maybe you should send a mail to csstaff@cs.princeton.edu and ask them. Do you know which book will be used for the networking class next semester? The latest edition of the Peterson & Davie book, I'd imagine. Details on thread.c? I'll give you the code for the hardest of the condition_* functions: void condition_wait(lock_t *m, condition_t *c) { CRITICAL_SECTION_BEGIN; lock_release_helper(m); block(&c->waiting); lock_acquire_helper(m); CRITICAL_SECTION_END; } I'll also say that condition_signal and condition_broadcast take 3 semicolon-terminated statements each.