do_fork()

Creator
Creator
Seonglae ChoSeonglae Cho
Created
Created
2023 Sep 20 6:30
Editor
Edited
Edited
2023 Oct 24 14:23
Refs
Refs
  1. Allocate a new PID for the child
    1. Consults the pidmap_array bitmap
  1. Calls
    copy_process()
    to copy the process descriptor (
    task_struct
    )
  1. Inserts the child in one of the
    Run queue
    1. If CLONE_VFORK is specified, the parent is put in a wait queue.
  1. Terminates by returning the PID of the child
 
 

Scheduling

divide time quantum between child and parent for fairness
notion image
sets the time_slice field of both current (the parent) and p(the child) processes
 
 
 
 
 
 
 

Recommendations