MAXPROCESSES to define this value

Instead of using two threads (for Process A, and B), make the program work with n threads. Use the symbolic constant value: MAXPROCESSES to define this value. You must use arrays to keep track of the

Instead of using two threads (for Process A, and B), make the program work with n threads. Use the symbolic constant value: MAXPROCESSES to define this value. You must use arrays to keep track of the different threads.

b. The Scheduler class routines getMemory and returnMemory may be executed by multiple threads at the same time. Change the code to ensure that all shared variables in these routines are updated in a mutually exclusive manner.

c. The program does not take into account how much memory there actually is, nor does it take into account the maximum number of process that can be running at one time. These limits are given by TOTALMEM and MAXDEGREEMP, respectively. Change the program such that if either one of these limits would be exceeded, that then the process thread will wait until these conditions no longer exist. Display a message that identifies which thread is waiting.

"Is this question part of your assignment? We can help"

ORDER NOW