.. _classic_problems: Classic Synchronization Problems ---------------------------------------------- Some synchronization problems, such as the :ref:`shared_buffer_prob` are fairly simple to solve using reliable synchronization facilities such as :ref:`semaphores`. Other problems that programmers must solve are more complex, in fact, some of them are just down right tricky to solve correctly such that there is never a problem with :ref:`ipc_starvation`, :ref:`deadlock` or :ref:`race_condition`. Fortunately, there are a lot of really smart people who have already tackled these problems and we have known solutions to them. These problems are ones that frequently arise, so we discuss them and their solutions in fairly generic terms and refer to them as the :ref:`classic_problems`. **One of the biggest challenges that the programmer must solve is to correctly identify their problem as an instance of one of the classic problems.** It may require thinking about the problem or framing it in a less than obvious way, so that a known solution may be used. The advantage to using a using known solution is assurance that it is correct. Some instances of :term:`deadlock`, can occur only in rare conditions and are difficult to detect. So for any programming task using synchronization, it is best to reference a known solution to one of the classic problems. **Contents:** .. toctree:: :maxdepth: 2 shared_buffer bounded_buffer readers_writers philosophers others