P2L1 Flashcards
Process is
instance of an executing program (aka job or task)
Process execution state stored in
program counter and stack
Temporary holding area for process data
registers
Application is
static entity. program on disk
Process is
an active entity. state of program when running
Stack is
LIFO queue. grows and shrinks
Heap
dynamically created during execution
Address space
“in memory” representation of a process
Page tables are
mapping of virtual to physical address space
Process Control Block
Process State Program Counter Registers Signal Mask Priority
Context Switch
Swapping between processes
Context switch direct costs
number of cycles for loading: 2 store instructions
Context switch indirect costs
Cold cache or cache misses
a new process is
admitted
process states
new ready running waiting terminated
process state verbs
admitted interrupt scheduler dispatch I/O / event completion I/O or event wait exit
fork
copies the parent PCB into new child PCB
child continues execution at instruction after fork
exec
replace child image
load new program and start from first instruction
CPU scheduler
determines which one of ready processes will be dispatched to CPU and for how long
OS Scheduler must
preempt, schedule, and dispatch
timeslice
time allocated to a process on the CPU
Useful CPU work formula
total processing time / total time
IPC mechanisms
transfer data/info between address spaces
maintain protection and isolation
provide flexibility and performance
Message-passing IPC
OS provides comm. channel, like shared buffer
processes write/read messages to/from channel
Shared-memory IPC
OS establishes a shared channel and maps it into each process address space
2 types of IPC
memory-passing and Shared-memory