How to solve the Santa Claus problem

Mordechai Ben‐Ari · Concurrency Practice and Experience · 1998

John Trono (1994) published a new exercise in concurrent programming – the Santa Claus problem – and provided a solution based on semaphores. His solution is incorrect because it assumes that a process released from waiting on a semaphore will necessarily be scheduled for execution. We give a simple solution in Ada 95 using higher-order synchronization primitives: protected objects and rendezvous. We then give a solution in Java, although this solution is not as elegant as the Ada 95 solution because the Java synchronization primitives are rather limited. The problem demonstrates that semaphores, designed for low-level mutual exclusion, are not appropriate for solving difficult concurrent programming problems. © 1998 John Wiley & Sons, Ltd.

Read the paper · More papers on PaperTik