Professional Documents
Culture Documents
3 3 Operation On Process
3 3 Operation On Process
Process Creation
A process is identified by a unique PID (Process Identifier) in the OS.
A process may create new processes.
P1
pid = 1
P2 P3 P4
Parent process pid = 8 pid = 58 pid = 63
P5 P6 P3
Child process pid = 51 pid = 38 pid = 55
fork(): create a new process, which becomes the child process of the caller
wait(): suspends execution of the current process until one of its children terminates.
wait()
Parent Parent
Process Process
fork()