Define an operating system.
A program that acts as an intermediary between a user of a computer and the computer hardware.
What are the three operating system goals?
Execute user programs and make solving user problems easier; make the computer system convenient to use; use the computer hardware in an efficient manner.
OS as a resource allocator vs OS as a control program.
Resource allocator: manages all resources and decides between conflicting requests for efficient and fair resource use. Control program: controls execution of programs to prevent errors and improper use of the computer.
What is the kernel?
"The one program running at all times on the computer." Everything else is either a system program (ships with the OS) or an application program.
Name the four components of a computer system.
Hardware, operating system, application programs, users.
What is the role of the operating system among the four components?
It controls and coordinates use of hardware among various applications and users.
Where is BIOS stored, and what is it generally known as?
In ROM or EPROM; it is generally known as firmware.
What does the bootstrap program in the boot sector do?
It is loaded in memory and starts the process of loading the operating system kernel and starts execution.
How does a device controller tell the CPU that it has finished its operation?
By causing an interrupt.
What does the interrupt vector contain?
The addresses of all the service routines.
What is a trap?
A software-generated interrupt caused either by an error or a user request.
Why are incoming interrupts disabled while another interrupt is being processed?
To prevent a lost interrupt.
Two ways the OS determines which type of interrupt has occurred.
Polling, or a vectored interrupt system.
Synchronous vs asynchronous I/O: when does control return to the user program?
Synchronous: only upon I/O completion. Asynchronous: without waiting for I/O completion.
What does each device-status table entry indicate?
The device's type, address, and state; if the device is busy, the type of request and other parameters are stored in its entry.
DMA: how many interrupts per transfer?
Only one interrupt is generated per block, rather than one interrupt per byte; the controller transfers blocks directly to main memory without CPU intervention.
Which is the only large storage media the CPU can access directly?
Main memory.
By what three properties is the storage hierarchy organized? What is at the top and bottom?
Speed, cost and volatility. Registers at the top; magnetic tapes at the bottom (slide 20).
What is caching?
Copying information into a faster storage system; information in use is copied from slower to faster storage temporarily, and the cache is checked first.
What is the cache-consistency concern in multitasking environments?
They must be careful to use the most recent value, no matter where it is in the storage hierarchy.
Three advantages of multiprocessor systems.
Increased throughput; economy of scale; increased reliability (graceful degradation or fault tolerance).
Multiprogramming vs timesharing.
Multiprogramming organizes jobs so the CPU always has one to execute (switching when a job waits). Timesharing is its logical extension: the CPU switches jobs so frequently that users can interact with each job while it is running.
In timesharing, what should the response time be?
Less than 1 second.
What is the mode bit, and who provides it?
A bit provided by hardware that distinguishes when the system is running user code or kernel code.
Where can privileged instructions be executed?
Only in kernel mode.
Why does the OS use a timer?
To prevent an infinite loop / a process hogging resources: the counter is decremented and an interrupt is generated at zero, so the OS regains control or terminates a program that exceeds its allotted time.