Mid-term 1 Flashcards
Bootstrap
Loads operating system kernel and stored in ROM. Initializes all aspects of system
Caching
Copying information into faster storage system; main memory can be viewed as a cache for secondary storage
Advantages of multiprocessors
- Increased throughput
- Economy of scale
- Increased reliability
Dual-mode
User mode, Kernel mode - allows OS to protect itself. Allows ability to distinguish between kernel code and user code. Some instructions are ‘privelaged’: only run in kernel mode.
API
Application Programming Interface - provides interface for application programmers.
- Program portability (same code runs on any machine with same API)
- Less detailed, more abstracted
System Call
Provides an interface to the services made available my an operating system
Types of system calls
- Process control
- File manipulation
- Device manipulation
- Info maintenance
- Communications
- Protection
Command Interpreters
CLI’s (Command Line Interface). Systems with multiple interpreters call them shells. Main function is to get and execute the next user-specified command
OS Structures - Simple
Only one or two levels of code - provides most functionality in least space, but is vulnerable
OS Structures - Layered
Lower levels independent of upper levels - More secure, but more overhead since layers can only communicate with one directly below it
OS Structures - Microkernels
OS built from many user processes - moves as many processes as possible to the ‘user’ space, small kernel. More reliable and secure, suffers performance overhead from user to kernel
OS Structures - Modules
Core kernel with dynamically loadable modules - Uses OO approach. Similar to layers, but more flexible
Virtual Machine
Software implementation of a computer that executes programs like a physical machine. System Machines exist independently on hardware, Process Machines run as an app inside an OS
Process Parts
- Program Code
- Program Counter
- Stack
- Data Section
- Heap
Process States

PCB
Info associated with each process.
State, counter, CPU registers, scheduling, memory info, accounting info, I/O status
Process Scheduling
Scheduler selects among available processes for next execution on CPU.
Long-term - selects processes to be brought into ready queue. Short-term - Selects which program to execute next on CPU
Scheduling Queues
- Job Queue - Set of all processes on system
- Ready Queue - set of all processes residing in main memory, ready and waiting to execute
- Device Queues - set of processes waiting for an I/O device
Context Switch
When CPU switches to another process, the system must save the state of the old process and load the saved state for the new process
Process Creation
Parent process create children processes, which, in turn create other processes, forming a tree of processes. Managed via process id (pid)
Process Termination
Process executes last statement and asks the operating system to delete it (exit).
Interprocess Communication (IPC)
- Independent process cannot affect or be affected by the execution of another process
- Cooperating process can affect or be affected by the execution of another process
Two types of IPC
- Shared Memory - Less overhead
- Message Passing - Safer
Buffering (Producer-Consumer problem)
- Zero capacity – 0 messages (no buffering) Sender must wait for receiver (rendezvous)
- Bounded capacity – finite length of n messages. Sender must wait if link full
- Unbounded capacity – infinite length. Sender never waits