Simple, space-efficient, and fairness improved FCFS mutual exclusion algorithms

被引:10
作者
Aravind, Alex A. [1 ]
机构
[1] Univ No British Columbia, Dept Comp Sci, Prince George, BC V2L 5P2, Canada
基金
加拿大自然科学与工程研究理事会;
关键词
Mutual exclusion; Process/thread synchronization; Concurrent programming; Multicore processors; Nonatomic algorithms; FCFS fairness; Space optimal;
D O I
10.1016/j.jpdc.2013.03.009
中图分类号
TP301 [理论、方法];
学科分类号
081202 ;
摘要
Let n be the number of threads that can compete for a shared resource R. The mutual exclusion problem involves coordinating these n concurrent threads in accessing R in a mutually exclusive way. This paper addresses two basic questions related to the First-Come-First-Served (FCFS) mutual exclusion algorithms that use only read-write operations: one is regarding the lower bound on the shared space requirement and the other is about fairness. The current best FCFS algorithm using read-write operations requires 5n shared bits. Could the shared space requirement be further reduced? The existing FCFS mutual exclusion algorithms assure fairness only among the threads which cross the 'doorway' sequentially. In systems with multicore processors, which are becoming increasingly common nowadays, threads can progress truly in parallel. Therefore, it is quite likely that several threads can cross the doorway concurrently. In such systems, the threads which cross the doorway sequentially may constitute only a fraction of all competing threads. While this fraction of threads follow the FCFS order, the rest of the threads have to rely on a biased scheme which always favors threads with smaller identifiers. Is there a simpler way to remove this bias to assure global fairness? This paper answers the above two questions affirmatively by presenting simple FCFS mutual exclusion algorithms using only read-write operations the first one using 3n shared bits and the latter algorithms using 4n shared bits. The resulting algorithms are simple, space-efficient, and highly fair. (C) 2013 Elsevier Inc. All rights reserved.
引用
收藏
页码:1029 / 1038
页数:10
相关论文
共 23 条
[1]   Shared-memory mutual exclusion: major research trends since 1986 [J].
Anderson, JH ;
Kim, YJ ;
Herman, T .
DISTRIBUTED COMPUTING, 2003, 16 (2-3) :75-110
[2]   Yet Another Simple Solution for the Concurrent Programming Control Problem [J].
Aravind, Alex A. .
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, 2011, 22 (06) :1056-1063
[3]   Nonatomic dual bakery algorithm with bounded tokens [J].
Aravind, Alex A. ;
Hesselink, Wim H. .
ACTA INFORMATICA, 2011, 48 (02) :67-96
[4]   Highly-fair bakery algorithm using symmetric tokens [J].
Aravind, Alex A. .
INFORMATION PROCESSING LETTERS, 2010, 110 (23) :1055-1060
[5]  
Ben-Ari, 2006, PRINCIPLES CONCURREN
[6]   SOLUTION OF A PROBLEM IN CONCURRENT PROGRAMMING CONTROL [J].
DIJKSTRA, EW .
COMMUNICATIONS OF THE ACM, 1965, 8 (09) :569-&
[7]   ADDITIONAL COMMENTS ON A PROBLEM IN CONCURRENT PROGRAMMING CONTROL [J].
KNUTH, DE .
COMMUNICATIONS OF THE ACM, 1966, 9 (05) :321-&
[8]   A FAST MUTUAL EXCLUSION ALGORITHM [J].
LAMPORT, L .
ACM TRANSACTIONS ON COMPUTER SYSTEMS, 1987, 5 (01) :1-11
[9]   THE MUTUAL EXCLUSION PROBLEM .1. A THEORY OF INTERPROCESS COMMUNICATION [J].
LAMPORT, L .
JOURNAL OF THE ACM, 1986, 33 (02) :313-326
[10]   NEW SOLUTION OF DIJKSTRAS CONCURRENT PROGRAMMING PROBLEM [J].
LAMPORT, L .
COMMUNICATIONS OF THE ACM, 1974, 17 (08) :453-455