At 10:36 AM 2/14/2002 -0500, sanjay mavinkurve wrote:
can someone who's done with whalemating please
send me their output so i
know what correct output looks like? please let me know if you did sasha's
option 1 or option 2 (see below). thank you.
This might not be useful because it is possible to have more than one
correct output. For example, some implementations may allow whales to mate
as soon as they start while others might allow it only after all threads
have started. Also, there is some randomness associated with thread
scheduling. In any case you should be able to verify the correctness of
your implementation just by looking at the output.
-Georgi
sanjay
Dave:
There are two ways to solve this problem:
1) To allow only one matchmaker to be active at a time.
This means that only one couple can mate at once. In this case, you should
not get output as below, because make 6 would not be able to start mating
until male #8, the female with whom it's mating, and the matchmaker who is
helping them are all finished.
2) To allow more than one couple to mate in parallel. (This does not mean
group sex, but rather that two different mating acts are happening at the
same time).
This solution is much harder to get right than the first one, so you might
be better off sticking with the first version. If you decide to implement
version #2, you should make sure that we understand from your output who
is mating with who, which matchmaker is responsible for which couple, and
when they all exit.
Sasha
_______________________________________________
cs161-list mailing list
cs161-list(a)fas.harvard.edu
http://www.fas.harvard.edu/mailman/listinfo/cs161-list