/* Note the following output follows the format of what is required. i realize that there are many ways to printout the info, but to make grading easier, i want you to follow the format as closely as you can. */ Barbarshop program as a producer/consumer using a circular buffer, semaphores and shared memory. Three arguments control the program: 1. How long in Seconds Consumer process should sleep before starting - default = 1 second. 2. Used to determine if Barber Shop contents are to be printed: default =0, not print. NOTE: Person in the chair with the lowest number is the Next Person of that category to have their hair cut. 3. How long Producer should sleep between each search of the wait area - default = 3. Lieutenant's Watch #X EntO WaitO CutO EntNC WaitNC CutNC 5 0 5 10 7 3 EntG WaitG CutG EmptyC OccupC BChair 25 11 7 6 14 NC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 O NC 7 6 5 4 3 2 1 G 1 4 2 3 7 9 5 6 8 10 11 /*SEE BELOW FOR WHAT THE FOLLOWING SHOULD HAVE ACTUALLY BEEN * IT WILL NOT CHANGE THIS TIME, BUT MAYBE IN LATER VERSIONS */ /*shows a grunt having been moved to the NC queue and the order * changed in the Grunt Queue. */ Lieutenant's Watch #X+N EntO WaitO CutO EntNC WaitNC CutNC 5 0 5 10 7 3 EntG WaitG CutG EmptyC OccupC BChair 25 11 7 6 14 NC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 O NC 7 G 6 5 4 3 2 1 G 3 1 2 6 8 4 5 7 9 10 /*shows a grunt having been moved to the NC queue and the order * * changed in the Grunt Queue. * * Also in the NC Queue, the grunt is labeled and his position * * noted.... * */ Lieutenant's Watch #X+N EntO WaitO CutO EntNC WaitNC CutNC 5 0 5 10 7 3 EntG WaitG CutG EmptyC OccupC BChair 25 11 7 6 14 NC 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 O NC 7 G8 6 5 4 3 2 1 G 3 1 2 6 8 4 5 7 9 10