There are several way to partition behavior in a concurrent application
Basic Definitions
Bound Resources
Resources of a fixed size or number used in a concurrent environment. (e.g. DB connections)
Mutual Exclusion
One one thread can access shared data or a shared resource at a time.
Starvation
One thread or group of threads is prohibited from proceeding for an excessively long time (or forever).
Deadlock
Two or more threads waiting for each other to finish. Each thread has a thread the other requires. Neither can finish.
Livelock
Threads in lockstep, each trying to do work but the other is in the way. Due to resonance, threads continue trying to make progress but are unable for an excessively long time - or forever.
Producer-Consumer Problem
One or more producer threads create some work and place it in a buffer or queue.
One (or more) consumer threads acquire that work from the queue and complete it.
The queue between them is a bound resource. Both wait to be notified when they can continue.
An illustration to demonstrate concurrent algorithm design and solutions:
Philosophers sitting at a circular dining table, each with a fork to their left. A bowl of spaghetti in the center of the table. They spend their time thinking unless they get hungry. They can only eat if they have two forks. Once a philosopher eats, he puts both forks down making them available to the philosophers on either the right or left.
Philosophers = Threads.
Forks = resources.
Unless carefully designed, systems that compete in this way can experience deadlock, livelock, throughput, and efficiency degradation.