A row of parking spots: a car needs one spot, a truck needs two adjacent spots. Many threads park and leave at the same time — design it so no spot is ever double-booked.
A row of parking spots: a car needs one spot, a truck needs two adjacent spots. Many threads park and leave at the same time — design it so no spot is ever double-booked.
Opens with the full question.