Processes-Lec.6 Flashcards
Process definition SER
A program in execution, unit of scheduling, execution and resources.
Processes in memory TPSDH
Text Section(program code, instructions), Program Counter, Stack(temp. data such as function parameters, return addresses, local variables), Data Selection(global variables), Heap(dynamically allocated memory during process runtime)
Process States NRWRT
New- process is being created, Ready- process is waiting to be assigned a processor to run, Waiting- process is waiting for some event to occur, Running- Instructions are being executed, Terminated- process has finished execution
Process scheduling- involves managing process queues(JQ RQ DQ)
Job Queue- set of all processes in system, Ready Queue- set of all processes in main memory ready and waiting to execute, Device Queue- set of processes waiting for an I/O device.
Schedulers-Long term and short term
Long-term scheduler(job scheduler)- manages which processes enter the ready queue, short-term scheduler(CPU scheduler)- decides which process gets CPU time
context switches
When CPU switches between processes, it saves the old processes state and loads the new one