The Problem Statement
When multiple clients, processes, or threads compete for a limited number of resources simultaneously, causing degraded turnaround time and performance, the system enters a state called contention. This is the most common problem in systems that handle high traffic volumes. Without graceful dealing, contention leads to race conditions and an inconsistent state.
Example Scenario
Consider buying flight tickets online. There is only one seat available on the flight. Alice and Bob both want this seat and click “Book Now” at exactly the same time.