Comparative Study of Syn Algo
Comparative Study of Syn Algo
distributed systems
A distributed system is a collection of independent In centralized algorithm, One process is elected as the
computers that appears to its users as a single coherent coordinator. Whenever a process wants to access a
system and sharing the common resources. Multiple shared resource, it sends a request message to the
processes do not simultaneously access a shared coordinator stating which resource it wants to access
resource so, requires the synchronization. We are and asking for permission. If no other process is
having the four synchronization algorithms in currently accessing that resource, the coordinator sends
distributed systems. back a reply granting permission with OK message.
When the reply arrives, the requesting process can go
This paper describes the pros & cons of each algorithm. ahead. At the same time another process asks for
In this we are comparing these four algorithms permission to access the resource. The coordinator
(Centralized, Decentralized, Distributed and Token knows that a different process is already at the
Ring algorithms) with appropriate comparative resource, so it cannot grant permission. The coordinator
measurements such as time complexity, delay, blocks the 2nd process which is waiting for a reply.
redundancy, scalability, failure rate &recovery. Based When process 1 is finished with the resource, it sends a
on this comparative study in future we are going to message to the coordinator releasing the resource, which
address the problems in the existing synchronization then replies to process2 with OK message.
algorithms.
In Centralized system having one coordinator is a poor
1. Introduction
approach. So, we are moving to Decentralized system.
In this the no of coordinators should be m>n/2.
Whenever a process wants to access the resource, it will
A distributed system is one in which components
simply need to get a majority vote from 111 > nl2
located at networked computers communicate and
coordinators. Unlike in the centralized scheme
coordinate their actions only by passing messages. The
discussed before, we assume that when a coordinator
sharing of resources is a main motivation for
does not give permission to access a resource (which it
constructing distributed systems [1].The concurrency
will do when it had granted permission to another
and collaboration occurs among multiple processes, so
process), it will tell the requester. This scheme
to prevent such concurrent accesses corrupt the
essentially makes the original centralized solution less
resources (or) inconsistent solutions are required to
vulnerable to failures of a single coordinator. The
grant mutual exclusive access by processes [2].Many
assumption is that when a coordinator crashes, it
distributed systems requires one process should act as
recovers quickly but will have forgotten any vote it gave
coordinator and the coordinator responsibilities are
before it crashed. Another way of viewing this is that a
managing the message passing and allocation of
coordinator resets itself at arbitrary moments. The risk
resources. This coordinator will be elected from all
that we are taking is that a reset will make the
other process in the group using various types of
coordinator forget that it had previously granted
algorithms such as Centralized, Decentralized,
permission to some process to access the resource. As a
Distributed and Token Ring algorithms. Next Section
consequence, it may incorrectly grant this permission
will discuss these algorithms in detail.
again to another process after its recovery.
�
Measurement
Time complexity
Centralized
O(n)
Decentralized
O(n)
Distributed
O(n)
Token Ring
O(n)
Delay in terms of Message
communication (n- 1) (nlm)- 1 2(n-l) n
Redundancy
NO YES NO NA
Scalability
lO<n< 100 1OO<n< 1000 1OOO<n< 10000 lO<n< 100
No of messages 2
n+2 3m(nlm-l) n +2n-2 n
The centralized algorithm requires only three messages Based on the limitations identifies in existing
to enter and leave a critical region: a request, a grant to synchronization algorithms a new algorithm need to be
enter, and a release to exit. The distributed algorithm developed and followed by experiments to demonstrate
requires n - 1 request messages, one to each of the other the proposed algorithm is efficient than the existing
processes, and an additional n - 1 grant messages, for a synchronization algorithm.
total of 2(n- 1). With the token ring algorithm, the
number is variable. If every process constantly wants to References
enter a critical region. Then each token pass will result
in one entry and exit, for an average of one message per 1)[Tanenbaum , 2006]Andre S. Tanenbaum , Maarten
critical region entered. At the other extreme, the token Van Steen, "Distributed systems principles and
may sometimes circulate for hours without anyone paradigms" 2nd edition Pearson, 2007.
being interested in it. In this case, the number of
messages per entry into a critical region is unbounded. 2)[George,2000]George Coulouris, Jean Dollimore,
Tim Kindberg,"Distributed systems concepts and
5. Proposed Synchronization Algorithm Design" 3rd edition Pearson, 2001.
Based on the comparison among the synchronization 3) M. Raynal, Algorithms for Mutual Exclusion.
algorithms shown in table l.l,every algorithm is Cambridge, MA: MIT Press, 1st ed., 1986.
lacking in certain comparative parameters. A new
synchronization algorithm is required to overcome 4) K. Raymond, "A distributed algorithm for multiple
these limitations. This new algorithm should poses the entries to a critical section,"
following characteristics: Information Processing Letters, vol. 30, pp. 189-193,
Feb. 1989.
Time complexity for all old 4 algorithms is O(n).This
proposed algorithm should get less than or equal to 5) Lodha, S. Kshemkalyani, A.
O(n). Synposys Inc., Mountain View, CA(2000) A fair
distributed mutual exclusion algorithm Parallel and in 4th WSEAS international conference on soft
Distributed Systems IEEE Transactions on june 2000 computing ,optimization. simulation and modeling
Volume: 11 Issue 6 On page(s): 537 - 549. ,April 21-23 ,2004,Florida,USA.