Week 3 Flashcards
Process Context
The snapshotted state of a process, which includes its data, memory utilization, and execution progress. The process context must be saved when the OS wants to stop running a process, and it gets reloaded when the OS resumes running the process
Virtual Address
Mapped to physical addresses using a data structure called a “page table”. Creates a consistent format for the OS to manage the memory of all processes. Includes the heap, stack, code segment, data segment, and kernel space.
Disk
Magnetic or optical storage for data. Disk storage is slower than your main memory storage, but is cheaper and stores data even when the computer is turned off.
File Descriptors
used as handles to files by processes
STDIN
defaults to keyboard input
STDOUT
defaults to printing output on your monitor/terminal
Context Switch
the OS switches the process being executed. Context switches begin with a TRAP, which is a set of instructions that cause the computer to transition from user mode to kernel mode. Next, the OS saves the current process context in it’s PCB, loads in the context of the next process’s PCB, resumes this next process, and transitions back to the user mode. Context switching creates overhead
Multi-core
a system with multiple CPUs
Process state
running, blocking, or ready. Each state has its own process
queue in the OS
Running
instructions for this process are being executed by the CPU
Blocked
process is waiting on I/O access, user input, or some other condition that cannot be met immediately, but is required to continue executing
Ready
The process has all it needs to run and is waiting for CPU access
Preemption
when a process becomes ready, immediately give it an opportunity to run, regardless of any processes already running or processes ahead of it in the ready queue
OS Scheduler
Most OSes have a finite time-slice for which processes can run before they are switched out. Larger time slices reduce the overhead of context switching, however cause longer wait times for new processes that wish to run
Prioritization
A technique used in scheduling to ensure that urgent processes gain “fast passes” to the CPUs. Different priority processes may be placed in different priority queues. The priority level is an assigned number in a range of possible values that depends on the OS