| | |
Summary: A Cooperative Approach to TwoPhase Waiting
Andrea C. ArpaciDusseau
dusseau@cs.stanford.edu
Stanford University
David E. Culler
culler@cs.berkeley.edu
University of California, Berkeley
Abstract
Competitive analysis is traditionally used to bound the worstcase performance of twophase waiting,
a common algorithm in multiprocessor environments. Despite the popularity of competitive algorithms,
we observe that their assumptions are not valid in closed systems in which processes can influence their
future waiting times. By evaluating implicit coscheduling on timeshared, communicating processes in a
distributedsystem, we show that spintime should instead be calculated with cooperative methods. Rather
than reacting to a fixed stream of adversarial waiting times, our cooperative algorithm minimizes future
waiting times by keeping processes that belong to the same parallel job coordinated across machines.
Another common assumption in twophase waiting is that the penalty of blocking is a fixed amount,
equal to the cost of a contextswitch performed by the operating system scheduler. However, in implicit
coscheduling, the penalty of blocking is dynamic, related to the number of arriving messages. To handle
this complication, we leverage conditional twophase waiting, a generalization in which spintime may
be altered, depending upon events that occur while the process is waiting. Through simulations, we show
|