Hi All,

I am currently studying semaphores out of a book about multithreading. And one of the questions out of the book has got me stumped. The problem is we have bears and pengiuns who likes to swim. Each bear is a thread as is each pengiun. Bears and pengiuns both would liek to go into the pool and swim, but they both can't be in the pool at the same time. Bears can swim with other bears, and pengiuns can swim with other pengiuns....