At the shell prompt, typing:
Semtest1 begins p3 created Produced 0 Consumed 0 Produced 1 Consumed 1 Produced 2 Consumed 2 Produced 3 Consumed 3 Produced 4 Consumed 4 p3 executedCorrect implementation of semaphores is worth 30 points.
semtest2.cwill check handling of invalid arguments to semaphore operations. At the prompt typing:
/c/semtest2.exeshould output (actual value returned by Init_Semaphore not important).
+ Identified unauthorized call + Identified invalid SID Create_Semaphore() called Create_Semaphore() returned 0 P() called P() returned 0 V() called V() returned 0 Destroy_Semaphore() called Destroy_Semaphore() returned 0 + Removed authority after finishCorrect output gets you 10 points
$ /c/ping.exe & $ /c/pong.exeshould output
Pong Ping Pong Ping Pong Ping Pong Ping Pong Ping Process Pong is done at time: YY Process Ping is done at time: XXNote that the last three lines might come out in a different order but that's OK, the important part is the Pong/Ping alternance. Correct output gets you 25 points.
/c/schedtest.ex [rr|mys]should output a string consisting of many 1s and 2s and a single 3. 3 should never appear as the first character. A sample session is
%/c/schedtest.ex rr 111111222222111111222222311111122222212 %/c/schedtest.ex mys 111112222221111113222222111111222222112A few trials runs will usually (but not certainly) show the 3 appearing earlier when running MYS then when running RR In case of doubt, code will be checked. Correct implementation of scheduling carries 30 points.