Reputation: 25
I am learning by myself introduction of OS, I have the following two questions:
(1) Since Fork()
system call is used to duplicate the current process for the sake of multitasking, I'd like to see a example that shows without forking, we will not have such multitasking? In other word, I would like to see an example (or an external link) that shows how important Fork() is.
(2) DoesZombie
process exist because of the child's process crash?
Thank you very much
Upvotes: 1
Views: 82
Reputation: 36441
There is no need for fork
, fork
is just the Unix way of creating process. Older and different systems used something different as spawn
(Vax/VMS) for example.
Zombies are just traces of died processes, this is useful for parents to be aware of died children after having been busy. Remember that in Unix, a process that terminates let its parents be aware of the cause of its termination. So there is a need to let died process store that information somewhere, Unix way is to maintain a process entry named zombie as that process is reduced to this small entry and no other resources are linked to.
Upvotes: 1