A Design Pattern for State Machines and Concurrent Activities

State machines are used to design real-time software controlling anything from household devices to spacecraft. They are also a standard way of describing the life of an object in object-oriented analysis and design. This paper presents a pattern for the implementation of state machines and associated activities by means of tasks and protected objects. It is a refinement of earlier work on a state-machine pattern and part of a set of concurrent design patterns based on the entity-life modeling design philosophy.