01. An operating system is a program that acts as an [intermediary] between a user of a computer and the computer hardware.
02. The primary goal of an operating system is to make the computer system [convenient]
03. A secondary goal is to use the computer hardware in an [efficient] manner.
04. Early computers without an OS were called [bare machines].
05. The name "spool" is an acronym for [simultaneous peripheral operation on-line].
06. The four OS camps are: [MS, Unix/Linux, Mac, and Java].
07. Mach is a prime example of a [microkernel].
1. A computer system consists of a CPU and a number of device controllers that are connected through a [bus] that provides access to shared memory.
2. When a computer is powered by, the first program that is run is called a [bootstrap] program.
3. The bootstrap program must know how to load the [operating system] and to start executing it.
4. Name one type of event that may trigger an interrupt. [completion of I/O, division by zero, invalid memory access, request for OS service]
5. When an interrupt occurs, an [interrupt service routine] is provided that is responsible for dealing with the interrupt.
6. Typically, there is a table stored in low memory address that contains pointers to all the different ISR's. This table is known as the [interrupt vector].
7. A higher-priority interrupt will be taken even if a lower-priority interrupt is active, but interrupts at the same or lower levels are [masked], or selectively disabled.
8. To start an I/O operation, the CPU loads the appropriate registers within the [device controller].
9. Soon after the I/O is started, control is returned to the user program without waiting for the I/O to complete -- this is called [asynchronous] I/O.
10. The OS uses a [device-status table] to keep track of many I/O requests at the same time.
11. Each entry of the device-status table points to a [queue] of request for the particular device indexed by the entry.
12. [Direct memory access] is used for high-speed I/O devices for transferring to or from the memory, and only one interrupt is generated per block, rather than one interrupt per byte.
13. Most DMA controllers operate by [stealing] memory cycles from the CPU.
14. Main memory is the only large storage area that the processor can access directly; interaction is achieved through a sequence of [load or store] instructions.
15. In a typical instruction-execution cycle, an instruction is fetched and stored in the [instruction register].
16. Ideally, we would want user programs and data to reside in main memory permanently, but that is not possible because main memory is a [volatile] storage device.
17. Thus, most computer systems provide [secondary storage] as an extension of main memory.
18. To allow more convenient access to I/O devices, many computer architectures provide [memory-mapped] I/O.
19. If the CPU uses polling to watch a certain control bit in a device controller (constantly looping to see whether the device is ready), this method of operation is called [programmed] I/O.
20. Memory access may take many cycles to complete, in which case the processor normally needs to [stall].
21. The remedy is to add fast memory, called a [cache], between the CPU and main memory.
22. A disk drive is attached to a computer by a set of wires called an [I/O bus].
23. In a system with many caches, a variable may have multiple copies located in different caches, and thus the [cache coherency] problem may arise.
24. To ensure proper operation of a computer system, [protection] is needed for any shared resource.
25. The common approach is to provide hardware support to allow us to differentiate between two modes of operations: [user] mode and [privileged/supervisor/system/monitor] mode.
26. To protect the system from errant users, certain instructions that may cause harm are designated as [privileged instructions] which can only be run in monitor mode.
27. [MS-DOS] is one famous OS that does not provide dual-mode protection so that a user program can wipe out the entire OS.
28. To ensure correct operation, we must confine a user program to a subset of memory addresses, using two registers, called the [base] register and the [limit] register.
29. Any attempt by a program executing in user mode to access OS's memory or other users' memory would result in a [segmentation fault].
30. The base and limit registers can be loaded by only the [operating system], which uses a special privileged instruction.
31. We must prevent a user program from getting stuck in an infinite loop, and never return control to the operating system, by using a [timer].
32. A variable timer is generally implemented by a fixed-rate clock and a [counter].
33. A common use of a timer is to implement [timesharing] for fair usages of the CPU.
34. In the most straightforward case, the timer could be set to interrupt every N milliseconds; N is the [time slice] that each user is allowed to execute before the next user gets control of the CPU.
35. The switching from one program to another is called a [context switch].
36. So there is memory protection, and there is CPU protection; the third kind of protection is [I/O protection].
37. Since all I/O instructions are privileged, a user program must "ask" the OS to do I/O on the user program's behalf. Such a request is known as a [system call].
38. A system call usually takes the form of a [trap] (software interrupt) to a specific location in the interrupt vector.