TY - JOUR

T1 - Two-process synchronization

AU - Abraham, Uri

AU - Amram, Gal

N1 - Publisher Copyright:
© 2016 Elsevier B.V.

PY - 2017/8/6

Y1 - 2017/8/6

N2 - Aguilera, Gafni and Lamport introduced and solved the mailbox problem in [3], which can be used to speed-up interactions between a processor and a device. They provide a mailbox algorithm with “flag registers” of size 14 and space complexity Θ(nlogn), and they conjecture that a solution with logarithmic space complexity exists. We prove this conjecture by presenting such a mailbox algorithm. We prove that the space complexity of our mailbox algorithm is optimal. The size of its flag registers is reduced to 4, which matches a lower bound established by Aguilera et al. In the same paper, Aguilera et al. also pointed out that the mailbox problem can be solved by means of a more general problem: the signaling problem. They presented a non-blocking solution to the signaling problem, and asked whether a wait-free solution exists. We solve this question with a bounded wait-free signaling algorithm, and we prove its correctness. A related problem is the N-buffer problem introduced by Lamport. Aguilera et al. employ their mailbox algorithm and provide a first solution to the N-buffer problem with flag registers of constant size. The drawback of their solution is its space complexity which is unbounded. We show how our signaling algorithm can be used to solve the N-buffer problem with constant-size flags and optimal space complexity.

AB - Aguilera, Gafni and Lamport introduced and solved the mailbox problem in [3], which can be used to speed-up interactions between a processor and a device. They provide a mailbox algorithm with “flag registers” of size 14 and space complexity Θ(nlogn), and they conjecture that a solution with logarithmic space complexity exists. We prove this conjecture by presenting such a mailbox algorithm. We prove that the space complexity of our mailbox algorithm is optimal. The size of its flag registers is reduced to 4, which matches a lower bound established by Aguilera et al. In the same paper, Aguilera et al. also pointed out that the mailbox problem can be solved by means of a more general problem: the signaling problem. They presented a non-blocking solution to the signaling problem, and asked whether a wait-free solution exists. We solve this question with a bounded wait-free signaling algorithm, and we prove its correctness. A related problem is the N-buffer problem introduced by Lamport. Aguilera et al. employ their mailbox algorithm and provide a first solution to the N-buffer problem with flag registers of constant size. The drawback of their solution is its space complexity which is unbounded. We show how our signaling algorithm can be used to solve the N-buffer problem with constant-size flags and optimal space complexity.

KW - Distributed algorithms

KW - Linearizability

KW - Shared memory

KW - Synchronization

UR - http://www.scopus.com/inward/record.url?scp=84979710965&partnerID=8YFLogxK

U2 - 10.1016/j.tcs.2016.04.011

DO - 10.1016/j.tcs.2016.04.011

M3 - Article

AN - SCOPUS:84979710965

VL - 688

SP - 2

EP - 23

JO - Theoretical Computer Science

JF - Theoretical Computer Science

SN - 0304-3975

ER -