This repository contains a number of concurrency problems and its solutions using pthreads. The problems are organized in folders and the solutions are written in C.
Up until now, the techniques used in the solutions range from a simple mutex to conditionals and semaphores. Those problems are used in a discipline lectured in Universidade de Brasília.
In each problem, a more advanced topic is introduced, so expect on the table of the next section to see only the topic that was introduced, but it probably includes the older concepts as well.
Technique | Problem | Folder Name |
---|---|---|
Mutexes | Writers and Readers | 2 - Escritores e Leitores |
Priority Mutexes | Monkey Problem | 3 - Problema dos Macacos |
Condition Variables | Producers and Consumers | 4 - Problema dos Produtores e Consumidores |
Conditions Variables | The Canibals | 5 - Problemas dos Canibais |
Semaphores | Producers and Consumers | 6 - Problema dos Produtores e Consumidores |
Semaphores | The barber | 7 - Barbeiro Dorminhoco |
Semaphores | Dining Philosophers | 8 - Jantar dos Filósofos |
Semaphores | Pigeon Problem | 9 - Problema do Pombo Correio |
Condition Variables | Pigeon Problem | 10 - Problema do Pombo Correio |