Question: Assume that five concurrent processes are used to evaluate the expression ((a+b)(c+d))/(le+f) (9+h)) by breaking it into seven tasks T1, T2, T3,...,Ty in the following
Assume that five concurrent processes are used to evaluate the expression ((a+b)(c+d))/(le+f) (9+h)) by breaking it into seven tasks T1, T2, T3,...,Ty in the following way: Process P1 evaluates T; : a+b and T, :e + f. Process P2 evaluates Tz:c+d and T4:9+h. Process P3 multiplies a + b by c+d (task Ts). Process Pa multiplies e + f by 9 + h (task To). Process Ps divides (a + b) (c + d) by (e+f) x (9 + h) (task T4). . a. (10 points) Write the pseudo-code of each process and use semaphores to enforce precedence of execution. Assume that processes have access to mutually accessible temporary variables like t, t2, ...for sharing the intermediate calculation results amongst each other. b. (5 points) Write all the possible permutations of tasks showing them in the increasing order of their completion times. C. (5 points) Draw the resource allocation graph of these five processes at the moment when only p and p2 are in "running" state and others are waiting for resources d. (5 points) Draw the wait for graph corresponding to the resource allocation graph drawn in the previous part. Prove that your implementation is deadlock.free
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
