Script started on Wed 08 Oct 2003 02:00:17 AM PDT

#########################################################################
# This script file demonstrates that mutual exclusion within the Signal # 
# and Exit Tennis monitor is preserved.                                 #
# Various threads that are in monitor procedures are forced to yield    #
# without giving up mutual exclusion over the monitor. this gives the   #
# other threads a chance to try and enter the monitor while mutual      #
# exclusion is held by some other thread.                               #
# From this script file, it can be observed that no threads can enter   #
# the monitor when another thread is holding the mutual exclusion (even #
# if the thread has forcibly yielded itself).                           #
# The primary objective here is to show that mutual exclusion is        # 
# preserved and it can be seen from the output that this objective is   #
# accomplished for the Signal and Exit monitor.                         #
#########################################################################

~/courses/cpsc321/grp_nachos/Nachos/threads >
~/courses/cpsc321/grp_nachos/Nachos/threads >
~/courses/cpsc321/grp_nachos/Nachos/threads >./nachos

Would you like to include debug statements to show
that mutual exclusion is preserved? 
1. yes
2. no
1

Please select the type of semantics you would like to test.
1. Signal and Exit.
2. Signal and Continue.
3. Signal and Wait.
1
 ### Signal and Exit monitor test ### 

Please select the order in which the players should arrive.
1. player1, player2, player3, player4.
2. player1, player2, player4, player3.
3. player3, player4, player1, player2.
4. player1, player4, player3, player2.
1
** Player 1 arrived.

@@@ Player thread A trying to get into monitor procedure InFirstTwo()@@@

@@@ Player thread A in monitor procedure InFirstTwo()@@@
@@@ Player thread A in monitor procedure InFirstTwo() yielding @@@
** Player 2 arrived.

@@@ Player thread B trying to get into monitor procedure InFirstTwo()@@@
** Player 3 arrived.

@@@ Player thread C trying to get into monitor procedure InFirstTwo()@@@
** Player 4 arrived.

@@@ Player thread D trying to get into monitor procedure InFirstTwo()@@@
@@@ Player thread A in monitor procedure InFirstTwo() comming back 
from yielding @@@

@@@ Player thread B in monitor procedure InFirstTwo()@@@
@@@ Player thread B in monitor procedure InFirstTwo() yielding @@@
@@@ Player thread B in monitor procedure InFirstTwo() comming back 
from yielding @@@
## Player 2 playing singles set. 

@@@ Player thread B trying to get into monitor procedure ReadyForDoubles()@@@
## Player 1 playing singles set. 

@@@ Player thread A trying to get into monitor procedure ReadyForDoubles()@@@

@@@ Player thread A in monitor procedure ReadyForDoubles()@@@
@@@ Player thread A in monitor procedure ReadyForDoubles() yielding @@@
@@@ Player thread A in monitor procedure ReadyForDoubles() comming back 
from yielding @@@

@@@ Player thread D in monitor procedure InFirstTwo()@@@
@@@ Player thread D in monitor procedure InFirstTwo() yielding @@@
@@@ Player thread D in monitor procedure InFirstTwo() comming back 
from yielding @@@

@@@ Player thread D trying to get into monitor procedure ReadyForDoubles()@@@

@@@ Player thread D in monitor procedure ReadyForDoubles()@@@
@@@ Player thread D in monitor procedure ReadyForDoubles() yielding @@@
@@@ Player thread D in monitor procedure ReadyForDoubles() comming back 
from yielding @@@

@@@ Player thread C in monitor procedure InFirstTwo()@@@
@@@ Player thread C in monitor procedure InFirstTwo() yielding @@@
@@@ Player thread C in monitor procedure InFirstTwo() comming back 
from yielding @@@

@@@ Player thread C trying to get into monitor procedure ReadyForDoubles()@@@

@@@ Player thread C in monitor procedure ReadyForDoubles()@@@
@@@ Player thread C in monitor procedure ReadyForDoubles() yielding @@@
@@@ Player thread C in monitor procedure ReadyForDoubles() comming back 
from yielding @@@

@@@ Player thread B in monitor procedure ReadyForDoubles()@@@
@@@ Player thread B in monitor procedure ReadyForDoubles() yielding @@@
@@@ Player thread B in monitor procedure ReadyForDoubles() comming back 
from yielding @@@
## Player 2 playing doubles match. 
## Player 1 playing doubles match. 
## Player 4 playing doubles match. 
## Player 3 playing doubles match. 
No threads ready or runnable, and no pending interrupts.
Assuming the program completed.
Machine halting!

Ticks: total 660, idle 0, system 660, user 0
Disk I/O: reads 0, writes 0
Console I/O: reads 0, writes 0
Paging: faults 0
Network I/O: packets received 0, sent 0

Cleaning up...
~/courses/cpsc321/grp_nachos/Nachos/threads >exit
exit

script done on Wed 08 Oct 2003 02:00:31 AM PDT
