Question: Answer this question by writing an algorithm using C-like pseudocode in the space provided. A developer is writing an algorithm that will be run on
Answer this question by writing an algorithm using C-like pseudocode in the space provided. A developer is writing an algorithm that will be run on a robot with limited memory but a fast CPU. Three processes (P1, P2, P3) will call the developer's function (FN) to gain access to a shared resource (void setResource(char)). Only one process can use the resource at any time. Your algorithm needs to be fair to all the processes. Your algorithm needs to consider the robot's limitations. Write an algorithm that receives a character from a process for output to a shared resource.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
