The kernel assigns a unique process identifier to child process. This PID is different from the parent's PID and is used to identify the process within the system. It is done by the function get_next_pid().
get_next_pid() allocates a unique PID for the new process. This function maintains a counter or a more complex allocation scheme to ensure that each process gets a unique identifier. It is defined as:-