Subject: Assignment mp2 (This message is being sent to all CPSC 322 students) Turn in directories on jmw are now available In the version that you submit MAKE SURE that sylvester() and tweety() generate NO OUTPUT WHATEVER!!! Its fine to leave diagnostic code in as long as it is disabled by default using the conditional compilation mechanism. --------------- I HIGHLY discourage the use of pthread_cond_signal() because its semantics seem to vary depending upon whose man page you read: I quote from Suns: The pthread_cond_signal() call unblocks at least one of the threads that are blocked on the specified condition variable cond (if any threads are blocked on cond). The pthread_cond_broadcast() call unblocks all threads currently blocked on the specified condition variable cond. The Linux man page says it unblocks "one" but which one is not known. Using something that unblocks "at least one" maybe two, maybe all in some unknown order seems dangerous to me. ------------- For final checking I find generating output of the following form useful: (alloc1 means alloc before blocking alloc2 means alloc after wakeup) --- but, needless to say, DON"T turn in something that generates this by default!! Alloc1 tid 0 with 1 block1 tid 1 with 1 block1 tid 2 with 1 block1 tid 3 with 1 block1 tid 4 with 1 block1 tid 5 with 1 block1 tid 6 with 1 block1 tid 7 with 1 block1 tid 8 with 1 block1 tid 9 with 1 block1 tid 10 with 1 block1 tid 11 with 1 block1 tid 12 with 1 block1 tid 13 with 1 block1 tid 14 with 1 block1 tid 15 with 1 Releas tid 0 with 0 Alloc2 tid 1 with 1 block1 tid 0 with 1 Releas tid 1 with 0 Alloc2 tid 2 with 1 Alloc2 tid 3 with 2 Alloc2 tid 4 with 3 Alloc2 tid 5 with 4 Alloc2 tid 6 with 5 Alloc2 tid 7 with 6 Alloc2 tid 8 with 7 Alloc2 tid 9 with 8 Alloc2 tid 10 with 9 Alloc2 tid 11 with 10 Alloc2 tid 12 with 11 Alloc2 tid 13 with 12 Alloc2 tid 14 with 13 Alloc2 tid 15 with 14 block1 tid 1 with 14 Releas tid 2 with 13 Releas tid 4 with 12 Releas tid 3 with 11 Releas tid 7 with 10 Releas tid 6 with 9 Releas tid 5 with 8 Releas tid 10 with 7 Releas tid 9 with 6 Releas tid 8 with 5