Answer Posted / sasidhar
fork internally calls sys_fork() where sys_fork() calls do_fork().
sys_fork() do the following functions
-> calls do_fork()
-> return PID
do_fork() does the following functions
-> creates a new process
-> Assign a new PCB
-> copies PCB of parent to new PCB with little bit changes in context.
-> return
so if any process calls fork() two number of returns occur and after returning from do_fork() to sys_fork(). sys_fork decides what value to be returned to parent process and child process
Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers