In a nutshell
Three textbook stories capture the everyday hazards of programs sharing things. Five philosophers reaching for shared forks can all freeze at once (deadlock). A producer filling a fixed shelf and a consumer emptying it must never overflow it or take from it empty. Many people can read a document together, but a writer needs it alone. Each is fixed by the right coordinating signals plus one rule that rules out the bad timing.