Posts

Showing posts from August, 2019

Context Switching in Operating System

Home

(PCB) or Task Control Block (TCB)

Home (PCB)   or   Task   Control   Block   (TCB) •   As   the   operating   system   supports   multi-programmin g ,   it   needs   to keep track of all the processes •   T he   process   control   block   (PCB)   is   used   to   track   the   proces s ’s execution status. •   Each   block   of   memory   contains   information   about   the   process   state,   program   counter,   stack   pointe r ,   status   of   opened   files, scheduling algorithms, etc. •   All   these   information   is   required   and   must   be   saved   when   the  process   is   switched   from one state to...

Process Table and Process Control Block

Home Context   Switching   in   Operating   System •   A   context   switch   is   the   mechanism   to   store   and   restore   the   state   or context   of   a   CPU   in   Process   Control   block   so   that   a   process execution can be resumed from the same point at a later time. Context   Switching   Trigger s : There are   three   major   triggers for context switching. Multitasking:   In   a   multitasking   environment,   a   process   is   switched out of the CPU so another process can be run. •   The   state   of   the   old   process   is   saved ...

Preemptive and Non-Preemptive

Home Preemptive   and   Non-Preemptive The   scheduling   which   takes   place   when   a   process   switches   from   running state   to   ready   state   or   from   waiting   state   to   ready   state   is   called  Preemptive   Scheduling or   Pre-Emption In   Nonpreemptive   Scheduling,   once   the   resources   (CPU)   is   allocated   to   a process, the process   holds   the   CPU   till   it   gets   terminated. Processor   Types •   I n   a   single-processor   system,   therefore,   only   one   program   can   be running at any one time. •   Processors   can   have   a   single   co...