0% found this document useful (0 votes)
48 views1 page

1) Spawned Process Is Destroyed When Parent Is Destroyed. Advantage

Download as doc, pdf, or txt
Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1/ 1

1)Spawned process is destroyed when parent is destroyed . Advantage: There can be two possibilities in term of address space.

The child process has same program and data as parent means it is duplicate of the parent or the child process has new program loaded in it. Also lets consider both process parent and child are executed concurrently. Now lets take an example in which an new process is created using Fork() system call with above mentioned parameter. Since both parent and child has same data and program that means they are two different level process belonging to same program. When the execution of iven program is completed, it is beneficial to delete it for the memory management. In this case parent process invoke an exit() system calls to OS and terminate the process. Disadvantage: In case when a different program is loaded in the child process as compared to parent, then deletion of parent node can be fatal to child node. This is because lets consider that parent has finished its processing and no longer beneficial to keep it loaded in main memory and it is terminated to delete it. While a different processing is still going on child node. Deletion of parent node in this case would not be good. 2)Child process proceed independently and parent process destroyed Advantage: Basically in this case child node start considering the second process to parent process as their new parent process and collect their status and execution statistics. Process running in child if they have diffenret data than parent will not get affected if parent process is deleted. Disadvantage: In some system parent process is not deleted and wait for the child process to finish its execution. In that case, parent process is occupying valuable main memory space which can be used by other processes. So, sometimes it is beneficial to delete the parent processes.

You might also like