# Probabilistic bidding gives optimal distributed resource allocation

## Abstract

In this paper we consider a fundamental problem of *resource allocation* in a distributed network. Each user's demands for resources may change dynamically and the processors speeds can vary dynamically. Let v be the maximum number of users competing for a particular resource at any time instant. Let k be the maximum number of resources that a user is willing to get, at any time instant. This problem was previously formulated in [Lynch, 1980]. It has application (1) to two-phase locking in databases (2) to generalized dining philosophers, and (3) to the implementation of a novel extension of the CSP language, called Social-CSP and to many other applications to concurrent programming.

Informally we say that an algorithm for this problem is *real time* if its response time is upper bounded by a function which does not depend on any global measure of the system of processes and resources, except k and v. [Reif, Spirakis, 1982b] gave the first known real time algorithms to the problem, with (mean) response time of o(v^{k}). This response time may be too long, however, in applications where k has a large value.

In this paper we provide new algorithms whose response time is *polynomial* to v and k. Our most efficient new algorithm has expected response time o(vk). Moreover, our constant factors appear to be small enough for practical applications.

Unlike our previous probabilistic algorithms of [Reif, Spirakis, 1982b], we do not use random delays as means of avoiding process starvation and of achieving probabilistic fairness. Instead, our new algorithm utilizes a method of *probabilistic bidding*, to resolve contention of users for resources. This technique is essential in our achievement of polynomial response time.

We furthermore prove that our solution is *optimal* with respect to the average response to a user's request. In particular we provide matching *lower bounds* for any distributed algorithm for resource allocation, and these bounds are within a constant factor of the response time of our own algorithms.

We also provide a suboptimal algorithm which is useful for improving the throughput rate of resource allocation in systems where the majority of users is willing to get only a few resources. This suboptimal algorithm does use random waits combined with probabilistic bidding. These techniques employ limited parallelism within each process, together with the probabilistic bidding. (This limited parallelism is useful in achieving optimal response time, though we would still get polynomial response time without limited parallelism.)

## Keywords

Response Time Resource Allocation Problem User Process Current Round Interprocess Communication## Preview

Unable to display preview. Download preview PDF.

## References

- Andrews, G., "Synchronizing Resources,"
*ACM Trans. on Programming Languages and Systems*, 3(4), 405–430 (1981).Google Scholar - Angluin, D., "Local and Global Properties in Networks of Processors,"
*12th Annual Symp. on Theory of Computing*, Los Angeles, CA, 82–93 (April 1980).Google Scholar - Arjomandi, E., M. Fischer, and N. Lynch, "A Difference in Efficiency Between Synchronous and Asynchronous Systems,"
*13th Ann. Symp. on Theory of Computing*, (April 1981).Google Scholar - Bernstein, A.J., "Output Guards and Nondeterminism in Communicating Sequential Processes,"
*ACM Trans. on Programming Languages and Systems*, 2(2), 234–238 (1980).Google Scholar - Bernstein, P. and N. Goodman, "Fundamental Algorithms for Concurrency Control in Distributed Database Systems," CCA Tr. Contract No. F30603-79-0191, Cambridge, MA (1980).Google Scholar
- Dennis, J.B. and D.P. Misunas, "A Preliminary Architecture for a Basic Dataflow Processors,"
*Proc. 2nd Annual Symp. on Computer Architecture, ACM IEEE*, 126–132 (1974).Google Scholar - Fisher, M.J., N.A. Lynch, J.E. Burns, and A. Borodin, "Resource Allocation with Immunity to Limited Process Failure,"
*19th FOCS*, 234–254 (1979).Google Scholar - Francez, N., "Extended Naming Conventions for Communicating Processes,"
*9th ACM Symp. on Principles of Programming Languages*, Albuquerque, New Mexico, (Jan. 1982).Google Scholar - Francez, N. and J. Reif, "A Social CSP," to appear.Google Scholar
- Francez, N. and Rodeh, "A Distributed Data Type Implemented by a Probabilistic Communication Scheme,"
*21 Ann. Symp. on Foundations of Computer Science*, Syracuse, New York, 373–379 (Oct. 1980).Google Scholar - Hart, S. and M. Sharir, "Termination of Probabilistic Concurrent Programs,"
*9th Ann. SCM Symp. on Principles of Programming Languages*, Albuquerque, New Mexico, (Jan. 1982).Google Scholar - Hoare, C.A.R., "Communicating Sequential Processes,"
*Com. of ACM*, 21 (8), 666–677 (1978).Google Scholar - Itai, A. and M. Rodeh, "Symmetry Breaking in Distributive Networks,"
*22nd Annual Symp. on Foundations of Computer Science*, Nashville, Tennessee, Oct. 1981, 120–158.Google Scholar - Lehmann, D. and M. Rabin, "On the Advantages of Free Choice: A Symmetric and Fully Distributed Solution to the Dining Philosophers' Problem," to appear in
*8th ACM Symp. on Principles of Programming Languages*, (Jan. 1981).Google Scholar - Lipton, R. and F.G. Sayward, "Response Time of Parallel Programs," Research Report #108, Dept. of Comp. Science, Yale University, (June 1977).Google Scholar
- Lynch, M.A., "Fast Allocation of Nearby Resources in a Distributed System,"
*12th Ann. Symp. in Theory of Computing*, Los Angeles, CA, 70–81 (April 1980).Google Scholar - Rabin, M., "N-Process Synchronization by a 4 Log2M-Valued Shared Variable,"
*21st Ann. Symp. on Foundations of Comp. Science*, Syracuse, NY, 407–410 (Oct. 1980).Google Scholar - Rabin, N., "The Choice Coordination Problem," Mem. No. UCB/ERL MBO/38, Electric. Research Laboratory, University of California, Berkeley, (Aug. 1980).Google Scholar
- Reif, J.H. and P. Spirakis, "Distributed Algorithms for Synchronizing Interprocess Communication Within Real Time,"
*13th Ann. Sym. on Theory of Computation*, Wisconsin, 133–145 (1981); also as "Real-Time Synchronization of Interprocess Communications," to appear in*Transactions on Programming Languages*, 1984.Google Scholar - Reif, J.H. and P. Spirakis, "Unbounded Speed Variability in Distributed Communications Systems,"
*9th ACM Symp. on Principles of Programming Languages*, Albuquerque, New Mexico (1982a), also to appear in*SIAM Journal of Computing*, 1984.Google Scholar - Reif, J.H. and P. Spirakis, "Real Time Resource Allocation in Distributed Systems,"
*ACM SIGACT-SIGOPS Symp. on Principles of Distributed Computing*, ottawa, Canada, (Aug. 1982b).Google Scholar - Schwarz, J., "Distributed Synchronization of Communicating Sequential Processes," DAI Research Report No. 56, University of Edinburg, (1980).Google Scholar