Concurrent programming and deadlocks
The first video introduces the concept of semaphore. We'll point out the difference between binary (aka mutex) and counting semaphores; we'll also see what is the different between a standard (implementing a "busy wait") and a complex (or "blocking") semaphore.
Prof. Sorgente proposes another video (the next in her internal order) with a detailed example of semaphore's use: you may consider to watch it to making sure that you completely understood the content of the previous video.
This video introduces the concept of deadlock. Prof. Sorgente makes reference in this video to the "dining philosophers" problem, that we will see in more details in one of the videos above. After the introduction to deadlocks, this video explores some basic ideas to detect the situations where a deadlock can take place in the context of multi-threading programming.
The main topic of the next video is Banker's algorithm, that is presented with a very detailed example, and which represents a powerful tool for deadlock avoidance.
This last video focuses on the dining philosophers problem. The concepts introduced in the previous videos appear again for the solution of this classical problem in concurrent programming. This video is part of the Gary Explains channel on YouTube.
In order to make some more practice with semaphores (and deadlocks), please answer to the questions contained in this document: Semaphores.pdf.
We also have two Java assignments related in general to concurrent programming, and to semaphores.