Write in C a specialised monitor capable of acquiring and releasing a resource in a system with R resources and N processes, each having a unique priority number, following the rule that the lowest priority gets the resource. #define MAXRESOURCES R #define MAXPROCESSES N The code must be accompanied of a detailed description of how it works. You do not need a computer to write this code as it is a short algorithm.
1) I do not require a program written in C, all I require is a short algorithm. 2) DO NOT use code that is NOT legal in C
No platform it is a short algorithm