Question: Write pseudo code for each process and use semaphores to enforce precedence of execution. assume the processes have access to mutually accessible temporary variables like
Write pseudo code for each process and use semaphores to enforce precedence of execution. assume the processes have access to mutually accessible temporary variables like t1, t2, ... for sharing the intermediate calculation results amongst each other.
Assume that five concurrent processes are used to evaluate the expression
((a +b )x (c + d))/((e + f ) x (g + h )) by breaking it into seven tasks T1, T2.T3............ following way
Process P1 evaluates T1 a+b and T2 e + E
Process P2 evaluates T3 c+d and T4 g+h
Process P3 multiplies a + b by c + d (task T5).
Process Pu multiplies e + f by g+h (task T6).
Process Ps divides (a + b) x (c + d) by (e +f) x (g + h)
Step by Step Solution
3.46 Rating (143 Votes )
There are 3 Steps involved in it
Here is the pseudo code using semaphores to manage the execution precedence of the tasks Initialize ... View full answer
Get step-by-step solutions from verified subject matter experts
