Optimistic Active Messages (OAM [76]) attempt to remove one major restriction imposed by Active Messages [74] on message handlers: The message handlers have to run to completion quickly. That is, if they block, it would result in a deadlock. If the message handlers execute for a long time, it would result in network congestion. Traditional RPC systems take care of this by executing each handler in a separate thread. This introduces a lot of overhead because of the context-switching time, as well as contention for access to resources by different threads. OAM takes an approach to bridge the two approaches: Every handler is expected to finish fast without blocking, and therefore executed in the scheduler's context (similar to active messages). However, when the handler asks to block, or runs for a long time, it generates a continuation and returns control to the scheduler.
Converse scheduler is re-entrant, therefore Converse can support blocking message handlers by starting another scheduler thread and by yielding to that thread if the handler wishes to block. OAM approach is to have a single scheduler thread and depend on the compiler to undo changes done to the state by message handler to re-schedule it at a later time. If one does not have compiler support, then message handlers have to be careful about changing the global state only after all the locks have been acquired. Converse threads (including the newly started scheduler thread) are non-preemptive, thus locking is often unnecessary if message handlers ensure that the global state is consistent when they block and yield to another scheduler thread.