Ch 3 Flashcards
Process Block
Text section: code
Data: global variables
Heap: dynamically allocated variables
Stack: temporary data (function parameters, return addresses, local variables)
Process States
New. The process is being created.
Running. Instructions are being executed.
Waiting. The process is waiting for some event to occur (such as an I/O completion or reception of a signal).
Ready. The process is waiting to be assigned to a processor.
Terminated. The process has finished execution.
PCB
contains information associated with each process: process state, PC, CPU registers, scheduling information, accounting information, I/O status information
Thread
A thread allows a process to perform one task
job queue
All processes in the system
ready queue
process in main memory ready and waiting for execution
device queue
processes waiting for a particular I/O device
long term vs short term job scheduler
long term scheduler chooses jobs and allocates them into main memrory
short temr scheduler chooses processes ready to execute and allocates them to a CPU (chooses teh degree of multi programing)
medium term scheduling
swapps process form memory and stores into disk to reduce degree of multiprogramming
it saves the state int PCB
Context Switch
context represented in the PCB to restore the state of the process when loaded back into memory after swapping
has time overhead since the CPU does no useful work while switching
Time of a context switch is dependent on hardware
pid
process identifier assigned by either a parent process or the Operating System
cascading termination
A phenomenon where the children are also terminated when the parent is terminated (actually when the child is terminated before the parent)
zombie
A process that has terminated, but whose parent has not yet called wait()
Once the parent calls wait(), the process identifier of the zombie process and its entry in the process table are released.
orphan
when the process’ parent does not call wait and is instead terminated.
IPC
interprocess communication allows for a cooperative process to exchange information
Either message-passing or memory-sharing