Q: You are required to code two processes; the first shall simulate the first process and other
Question:
Q: You are required to code two processes; the first shall simulate the first process and other the arrival of second process. These processes can come at any time, in any order. The first process shall call a procedure called FirstHere on the arrival of first process. Similarly, the second process shall call a procedure called SecondHere on the arrival of second process. The two processes will simulate the arrival of processes at random intervals and should run for a while to show around 10 queues leaving with different safe combinations. Before terminating you must clean up the semaphores and shared memory segments from the system. You must output the progress of the processes.
Use semaphores to implement the solution.
Note: Code in C++ and it must not be copied from somewhere else or else I'll downvote your answer.
Financial Accounting The Impact on Decision Makers
ISBN: 978-1285182964
9th edition
Authors: Gary A. Porter, Curtis L. Norton