Question: C programming questions : 1) Why do we not detach any of the enzyme threads? Would the program function if we detached the sleeper thread?
C programming questions :
1) Why do we not detach any of the enzyme threads? Would the program function if we detached the sleeper thread?
2) Threads are cancelled if the string contains a 'C' e.g. "Cherub". Why do we not include cancelled threads when adding up the total number of swaps?
4) What happens when a thread tries to join itself? (You may need to create a test program to try this) Does it deadlock? Or does it generate an error?
Thank you.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
