Skip to lesson

Railway ticket booking with many counters

Tatkal booking is the classic race: many counters try to sell the same few seats at the same moment. A lock makes "is this seat free? then book it" one step, a CountDownLatch opens booking for every counter at once, and a Semaphore limits how many counters talk to the booking server together.

Sign in to continue this lesson

Create an account to read every lesson, practise with the exercises and keep track of your progress.