How exactly were we supposed to follow this lecture? What was the main point? The "main point" of this one was the various system call mechanisms and their interplay with the kernel structures we've covered. So, there wasn't one particular concept to grasp, but more of a taxonomy or laundry list kind of lecture. Can we fall asleep if you don't assign a good night's sleep? I've fallen asleep enough times in class for various reasons, so I won't take the occasional nap personally. If there's something about the course that's causing you to consistently doze off, let me know. I'd rather people get something out of the course than me just follow the syllabus I have in mind. What kind of computer is the AS/400? It's a range of systems that are generally considered minicomputers, even though the high end of the range tends to overlap with the low end of the mainframe range. It's a rather interesting point in the design space - they use an "interpreted" language that gets compiled into the real machine code as needed, so they've been able to go through many architectural changes over time. Why is the kernel mapped into every process's space? OS designers generally do this to make life easier and improve performance. This way, when the kernel needs to copy memory from user space into kernel space, it can do so using instructions that look like regular memory copy code. The alternative would be to have the kernel memory separate from user memory, and this would mean that all of the memory translations would have to be thrown away each time you cross the boundary. This would make every system call, interrupt, etc., a lot more expensive since the mappings would have to be rebuilt. What's a hardware stack? Is it just memory located on a hardware device? In some machines, there really is separate memory on the processor that's used for the stack, and the size of this stack is fixed. Most general-purpose machines allow the stack pointer to point anywhere in memory. Other machines (usually very simple processors) will often restrict the stack to a certain range of addresses. For example, if the stack pointer is only 8 bits, then the stack can only refer to 256 words (or maybe even bytes). This kind of arrangement can be thought of as a hardware stack, even though the memory is accessible as normal memory as well. It doesn't have anything to do with devices per se. Are function parameters pushed onto the kernel stack or the user stack? The stack that's used depends on what code is being executed. The user stack is used by the user program for function calls. Once the program executes a system call, the kernel is running and it uses the kernel stack for all function calls within the kernel. Once control returns to the user program, the user stack is being used again. Do academics really make no money on their ideas? Depends on how aggressive the academic is. If you have a good idea in grad school, it may be more desirable to graduate than to risk pursuing the idea and end up with no money and no PhD. Google is a successful counterexample. In other cases, it might be desirable to try to commercialize the idea in conjunction with your advisor - both Akamai and Inktomi started this way. There are probably lots of cases where people ended up with no PhD and a failed company, but it would be impolite to list them :-) Where does the word kernel come from? According to Merriam-Websters, Function: noun Etymology: Middle English, from Old English cyrnel, diminutive of corn Date: before 12th century 1 chiefly dialect : a fruit seed 2 : the inner softer part of a seed, fruit stone, or nut 3 : a whole seed of a cereal 4 : a central or essential part : GERM 5 : a subset of the elements of one set (as a group) that a function (as a homomorphism) maps onto an identity element of another set So, I'm guessing (4), but who knows - it might be from people relating OSs to corn. Speaking of which, anyone want to guess how kernel (with a usage pre-12th century) is a diminutive of corn (a new world food, so late 15th century)? What does "getting into the kernel" mean? Crossing the kernel/user boundary, via whichever mechanims triggers it. All of the mechanisms will generally be related to interrupts in some way. What is a real-time OS? These are operating systems that support activities (and programs) that need to run with certain time constraints. For example, the program may specify that it needs to run at least 50ms every second, or for 1ms every 10ms. These systems are generally used for controlling machines, equipment, etc., and are generally known as "hard" real-time, meaning that the deadlines absolutely can't be missed. Their counterpart, the "soft real-time" systems, are ones that give only probabilistic guarantees - for example, 99% of the time, they'll meet the deadlines. They can be used for things like entertainment. What kinds of protections do critical systems have to ensure that user programs don't crash the entire system (for example, and airplane autopilot)? Limit what can run on the system to only those applications designed for the system. If it's not an open system, then all of the applications can be carefully designed, examined, etc. Also, really critical systems tend to run in triplicate and check each other. As long as two systems agree on the result, the system is operational. Is the microkernel idea outdated (MacOS X runs on top of Mach)? There are probably still performance hits, and these might show up if you write OS-intensive programs that really stress the boundaries. However, that's usually not the kind of workload most people run on Macs, so it's probably a non-issue. What were the other benefit of capabilities (lots of bits)? Capabilities give you fine-grained access to data, and they're self-verifying. So, if two programs want to share capabilities, the system can allow them to do so, since the verification of integrity can be independent of what's holding it. Are virtual machines much slower than the underlying physical machines? What if we're using a virtual processor? If the physical machine has good support for virtualization (meaning that everything that should be privileged is really implemented as privileged), then the overhead may be quite small. You "pay twice" on some things, like the cost of system calls. Now, if the virtual machine is using a virtual processor that's different from the underlying physical processor, then all instructions, etc., have to be translated or interpreted. If the code is translated/compiled (either before use or "just in time"), the efficiency of the translation process determines how fast you run. What is the minimal hardware support for a VM, and how is this related to a Turing machine? Basically, if you can show that the machine is the equivalent of a Turing machine, then it can run any program that any other Turing machine can run, but it might be slow. So, what this means is that you don't need any hardware support for a virtual machine, as long as you're willing to tolerate the possibility that it might run really slowly. If you want speed, you're better off if the unprivileged use of privileged instructions really cause something useful, like a trap. Why doesn't information hiding hurt performance in layered systems? Even regular systems have to engage in some amount of information hiding, so even in monolithic systems, there's some amount of performance already lost to clean design. The additional function calls will still impact performance, but it'll be minor compared to the communication costs in microkernels. What kinds of problems could a supposed privileged instruction being implemented as non-privileged cause? Here's a particularly bad example - the instructions that set up the memory mappings are privileged. If they weren't, the user program could change its mappings to point to any locations in physical memory that it wanted. It could then wreak havoc on the kernel, other processes, etc. What's a stub? In the context of system calls, these were the bits of code generated to actually invoke the system call. Assume that all system calls are invoked via a single interrupt, which is generally the case on Unix. In order for the compiler to deal with this, there has to be some "knowledge" involved somewhere. Otherwise, the compiler would have to be told exactly what calls in the program are system calls, and would have to know the system call number for each one. Instead, what happens is that these "stubs" are usually in the header files or libraries somewhere. These then eventually call something named syscall(), __syscall(), or something similar, which is often a bit of assembly that does the final dispatch. This is how the compiler writers can stay sane. What is the hardware state of the machine? Also referred to as the "context", as in "context switch", this usally means all of the registers, processor status bits, and other pieces of information maintained only in the CPU itself. So, things like caches aren't usually stored, since these can be reconstructed on demand. Why did Multics fail? There were usually simpler ways of achieving the kinds of protection it provided, even if it wasn't as fine-grained or as flexible. So, a fast, inflexible system can often win over a slower, more elegant system if speed is an issue. What is a hypervisor? The term "supervisor" can refer to a standard operating system. So, there has to be a term for the layer of code that sits between the supervisor and the hardware. Since "hyper" is better than "super", this layer gets called the hypervisor. Where do I access the CS318 machines? Friend 010, using your OIT account name and password, if you sent me the information. I don't believe remote access is allowed on these machines. Is Win98 monolithic? With its DOS heritage, I believe it is monolithic. Windows NT started almost from scratch, with a Mach-inspired heritage, and that's why it started as a microkernel. What exactly is an interrupt - what triggers it, where does it go, what handles it, etc Assume you're a computer and need to know when a key is hit on the keyboard. You can periodically check for this event, and this process is known as "polling". However, if nobody is typing, then all of this time is being wasted when it could be used to do something useful. So, instead, assume that there was a wire running from the keyboard to the CPU, and the CPU was designed to stop what it was doing when there is a charge on this wire. This is basically what a hardware interrupt is. When the CPU gets an interrupt, it looks at a predefined location in memory to determine the location of the code that will handle the interrupt. This code is generally part of the OS, and the OS responsible for initializing these values. Can you define capabilities again? A capability is a "token" (or special value) that shows that whatever is holding it has permission to perform some action. In the case of the file system, if we had 128 bits for pointers, we could generate result values from fopen, etc., that would be nearly impossible to guess. Programs could then pass these between themselves to get access to files rather than having each program perform the fopen itself. Which instructions are sent to the VM versus the small kernel? Can you go back through the trap path that a virtual machine need to generate? More virtual machine confusion I'll take a stab at these tomorrow. Someone remind me if you don't see them soon.