Question: This question is from Operating System Q4 4.75 Find the number of unique threads created at statements (1), (2) and (3) each, as specified in
This question is from Operating System

Q4 4.75 Find the number of unique threads created at statements (1), (2) and (3) each, as specified in the code given below. Additionally in each case mention the process which is creating the thread. Justify your answer. int main() { int x; thread_create(...); // (1) x=fork(); thread_create(...); // (2) if (x==0) fork(); thread_create(...); // (3) return 0; State True or False: 2 a) The child process is known as a zombie process when its parent terminates before it. b) init() is the parent of those processes who do not have a parent. 6 Consider a printing resource having 5 non-shareable instances which may be required by many processes simultaneously. Synchronize the usage of this resource with the help of a semaphore S. a) What type of semaphore will be required for this purpose? b) How will the synchronization be achieved if six processes want to use this resource simultaneously? 6 Consider a system with 4 types of resources RI (2 units), R2 (2 units), R3 (2 units), R4 (2 units). A non-preemptive resource allocation policy is used. Three processes P1, P2, P3 request and hold the resources as follows: Process Requesting Holding P1 1 unit of R1 1 unit of R3, 1 unit of R4, 1 unit of R2 5/6 P2 1 unit of R2 1 Units of R1, 1 unit of R3 P3 1 unit of R3 1 unit of R1, 1 unit of R2, 1 unit of R4 Draw a resource allocation graph and identify the possibility of any deadlock in the system. Give reasons
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
