The main Python script has a different process ID, and the multiprocessing module spawns new processes with different process IDs as we create Process objects p1 and p2.
Each process runs independently and has its own memory space.
As soon as the execution of the target function is finished, the processes get terminated. In the above program, we used the is_alive method of the Process class to check if a process is still active or not.
Consider the diagram below to understand how new processes are different from the main Python script.
PID=28628
PID=29305 Target=Worker1
PID=29306 Target=Worker2