Monday, February 27, 2012

End of Synchronization

Finally finished my Operating Systems project on threads synchronization. Baboons are happily on the right sides. The  task was a "Baboons on two sides" problem with a FIFO order requirement. Used classic Readers/Writers solution for the baboons problem and conditions variables to ensure the FIFO order. After the assignment is done it seems so easy))))

By the way, if you are new to synchronization, then check Little Book of Semaphores. It is easy to read and has a lot of solutions to the classic synchronization problems. Although, it is not very high-technology. For example, it does not use conditional variables to guarantee the FIFO order. Instead, it uses tricky constructed queue, which is much harder.

Source code: https://docs.google.com/open?id=0B150EMF9ZCuUbVdtZUU2cW9TNnVQX1B4Yk9zbHRDUQ

No comments:

Post a Comment