The Mailbox Problem
This paper proposes and solves a synchronization problem called the mailbox problem, motivated by a particular type of interaction between a processor and an external device or between two threads. In this problem, a postman delivers letters to the mailbox of a home owner and uses a flag to signal a non-empty mailbox. The owner must remove all letters delivered to the mailbox and should not walk to the mailbox if it is empty. The paper presents algorithms and an impossibility result for this problem.