Question

If a process exits and there are still threads of that process running, will they continue...

If a process exits and there are still threads of that process running, will they continue to run? If a process exits running and there are still child processes of that process running, will they continue to run? What is the difference between these two situation? (Please write a concise answer in no more than 100 words)

0 0
Add a comment Improve this question Transcribed image text
✔ Recommended Answer
Answer #1

A thread is just part of the process. I'll try to simulate this as the teeth of a comb. If the comb of pulled back from the hair, obviously all its teeth should be out. This is ofcourse a dumb analogy. A process may have multiple threads executed so that the process can be executed faster. But when the process itself exits, then obviously all its threads will exit.

A child process will be created by the parent process, and once created, the parent may wait for the child to return or it may continue on its own. Usually, the child will return to the parent after its completion but there is no rule that the parent will be available till that. And if the parent is exiting, there is a possibility for the child to continue. This can be simulated to the realtime father-child scenario. The expiry of a father, doesn't stop the progress of the child. So, the child process once created will continue to do its job in a shared rescources but it may create its own resources. And even if the parent exited, there is not guarantee that the child will terminate along.

Add a comment
Know the answer?
Add Answer to:
If a process exits and there are still threads of that process running, will they continue...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT