Process switching steps

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Sep 18 7:13
Editor
Edited
Edited
2023 Oct 25 3:43
Refs
Refs
  1. mode(user) switching for each case - save process state only
  1. process switching - save context PCB(control block) → to appropriate queue
    1. Decide whether to do a context switch, and whether a context switch is permissible now.
    2. Save all of prev’s user-mode register values (EIP, ESP, …) on prev’s kernel stack.
    3. Find the best process to schedule for execution using the process scheduling algorithm.
    4. Switch from the address space of prev to the address space of next
        • Switching the Page Global Directory to install a new address space
        1. Switch from the kernel stack of prev to the kernel stack of next
        1. Switch from the hardware context of prev to the hardware context of next.
  1. update state of process → update mm structure
prev process 1 to next process 2 process switching
prev process 1 to next process 2 process switching
 
 
 
 
 
 
 
 

Recommendations