The Story of a Child Process
Hi there ! I am a Child process born to a Parent process by create-process system call.We are referred by our P.Id(like your names).Like all process,I too needed certain resources like CPU time,I/O devices to be successful in my task.
Some Parents usually share all their resources to children,Some share only particular resources to their child and Some don’t share anything.Luckily,My parents shared all their resources to me.
In the World of Ours,Some parents work concurrently with their children and some work only after their child’s work has been done(Weird ! That’s the difference between your world and my world).
When we are successful in tasks,We return the data(the Gold of our World) to our parents and inform the almighty Operating System to delete us(thru Exit() system call).Our Resources are deallocated by OS(Don’t worry! these are just a part and parcel of life).
There may be some unlucky situations(just like the real life),We may be Abort()ed as a result of it.Some situations include
- If the child is too greedy,takes too much resources.
- Child is useless.
- If the OS does not allow a child to live if the parent dies.
This World of ours may be cruel but it is essential for the whole system to go on.
