3)OPERATION PROCESS

a)Process Creation


-Parent process create children processes, which, in turn create other processes, forming a tree of processes.




  • Resource sharing


  1. Parent and children share all resources.


  2. Children share subset of parent’s resources.


  3. Parent and child share no resources.




  • Execution


  1. Parent and children execute concurrently.


  2. Parent waits until children terminate.




  • Address space


  1. Child duplicate of parent.


  2. Child has a program loaded into it.



  • UNIX examples


  1. fork system call creates new process


  2. exec system call used after a fork to replace the process’ memory space with a new program.


b)Process Termination





  • Process executes last statement and asks the operating system to decide it (exit).




  1. Output data from child to parent (via wait).


  2. Process resources are deallocated by operating system.




  • Parent may terminate execution of children processes (abort).


  1. Child has exceeded allocated resources.


  2. Task assigned to child is no longer required.


-Parent is exiting.



  1. Operating system does not allow child to continue if its parent terminates.


  2. Cascading termination.

0 comments: