39
A Distributed Group k-Exclusion Algorithm Using k-Write-Read Coteries Presented by Jehn-Ruey Jiang National Central University Taiwan, R. O. C.

A Distributed Group k -Exclusion Algorithm Using k -Write-Read Coteries

  • Upload
    brooks

  • View
    32

  • Download
    0

Embed Size (px)

DESCRIPTION

A Distributed Group k -Exclusion Algorithm Using k -Write-Read Coteries. Presented by Jehn-Ruey Jiang National Central University Taiwan, R. O. C. Outline. Introduction Related Work k -Write-Read Coteries The Proposed Algorithm Analysis Conclusion. Outline. Introduction - PowerPoint PPT Presentation

Citation preview

Page 1: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

A Distributed Group k-Exclusion Algorithm Using k-Write-Read Coteries

Presented by

Jehn-Ruey Jiang

National Central UniversityTaiwan, R. O. C.

Page 2: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmAnalysisConclusion

Page 3: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmAnalysisConclusion

Page 4: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Distributed Systems A distributed system consists of interconnected,

autonomous nodes which communicate with each other by passing messages.

Interconnected Networknode a

node b

node c

node d

node e

Page 5: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Mutual Exclusion

A node in the system may need to enter the critical section (CS) occasionally to access a shared resource, such as a shared file or a shared table, etc.

How to control the nodes so that the shared resource is accessed by at most one node at a time is called the mutual exclusion problem.

Page 6: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Mutual Exclusion Example

in CS

node a

node b

node c

node d

node e

Page 7: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Mutual Exclusion Example

in CSnode a

node b

node c

node d

node e

Page 8: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

k-Exclusion

If there are k, k1, identical copies of shared resources, such as a k-user software license, then there can be at most k nodes accessing the resources at a time.

This raises the k-exclusion problem.

Page 9: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

k-Exclusion Example

in CS

in CS

k=2

node a

node b

node c

node d

node e

Page 10: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

k-Exclusion Example

in CS

in CS

k=2

node a

node b

node c

node d

node e

Page 11: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Group Mutual Exclusion

A group of nodes requesting to access the same resource may do so concurrently. However, if two nodes request to access different resources, only one node can proceed.

Page 12: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Group Mutual Exclusion Example

in CS for resource

group a

group b

group c

group d

Page 13: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Group Mutual Exclusion Example

in CS for resource group a

group b

group c

group d

Page 14: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

E.G.: One Seminar Room for Many Groups

There is only one seminar room and there are several groups contending for the seminar room to each initiate a forum of some topic.

Only one forum can proceed at a time. You are welcome to join a forum if you are

interested in the topic of that forum.

Page 15: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Group k-Exclusion

It is an extension of both the k-exclusion problem and the group mutual exclusion problem.

It restricts that there are at most k different groups of nodes accessing k different resources concurrently

Page 16: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Group k-Exclusion Example

in CS for resource

in CS for resource

k=2

group a

group b

group c

group d

The group is dynamic. A node can join a gro

up at any time.

Page 17: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Group k-Exclusion Example

in CS for resource

in CS for resource

k=2

group a

group b

group c

group d

Page 18: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

E.G.: k Seminar Rooms for Many Groups

There are k seminar rooms and there are several groups contending for the seminar rooms to each initiate a forum of some topic.

k forums can proceed concurrently. You are welcome to join a forum at any time

if you are interested in the topic of that forum.

Page 19: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmAnalysisConclusion

Page 20: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Related Work

To the best of our knowledge, there exists no quorum-based group k-exclusion algorithm for distributed systems.

The existent group k-exclusion algorithms are designed for the shared memory model. (by Vidyasankar in 2002 and 2003)

Page 21: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Related Work

Four quorum-based group mutual exclusion algorithms: Three by Joung in 2001 using m-group quor

um system Drawback: limited number of shared resources

One by Toyomura et al. in 2003 using coterie Drawback: High context switch complexity

Page 22: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmCorrectnessAnalysisConclusion

Page 23: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

k-Write-Read Coteries A k-wr coterie is a pair (W, R), where W and

R are collections of sets (called quorums) satisfying:

1. Write k-Intersection Property2. Write Non-intersection Property3. Write-Read Intersection Property4. Write Quorum Minimality Property5. Read Quorum Minimality Property

By properties 1, 2 and 4, W is a k-coterie.

Page 24: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Example of k-Write-Read Coteries

W={{1, 2, 3}, {1, 2, 4}, {5, 6, 7}, {5, 6, 8}, {1, 7, 8}, {2, 7, 8}, {3, 4, 5}, {3, 4, 6} }

R={{1, 3, 5, 7}, {1, 3, 5, 8}, {1, 3, 6, 7}, {1, 3, 6, 8}, {1, 4, 5, 7}, {1, 4, 5, 8}, {1, 4, 6, 7}, {1, 4, 6, 8}, {2, 3, 5, 7}, {2, 3, 5, 8}, {2, 3, 6, 7}, {2, 3, 6, 8}, {2, 4, 5, 7}, {2, 4, 5, 8}, {2, 4, 6, 7}, {2, 4, 6, 8}}.

We can check that (W, R) is a 2-wr coterie because every quorum is minimal, W is a 2‑coterie, and any quorum Q in W intersects any quorum P in R.

Page 25: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Torus Structure An array of nodes of r rows and c columns. The rows are arranged in a wraparound manner; i.e.,

a row i is followed by row i+1 for 1i<r and row r is followed by row 1.

r rows

1 2

3 4

5 6

7 8

c columns

Page 26: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Construct k-wr coteries by torus structures

1 2

3 4

5 6

7 8 1 2

3 4

5 6

7 8

1 2

3 4

5 6

7 8

All nodes of some row j

Plus one node from each of the floor(r / (k + 1)) rows following row j

One node for every row

The write quorum and the read quorum intersects in node 4

a write quorum

a read quorum

Page 27: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmAnalysisConclusion

Page 28: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

The Cycle of a Node

loop forever NCS (non-critical section) ES (entry section) WS (wait section) CS (critical section) XS (exit section)endloop

Page 29: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Basic Idea

A node should send request messages to collect enough grants from members of a write quorum to enter CS for accessing a shared resource.

To increase the concurrency, a node is allowed to enter CS immediately if a reference node in CS grants it to do so.

Page 30: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Reference node v.s. Follower

A node is said to be a reference node if it has got grants from all members of some write quorum.

A node is a follower if it enters CS with a grant from a reference node.Once a node becomes a follower, it sends release me

ssage to all the nodes that it has sent request messages.

Page 31: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Reference node Registration

A reference node r registers its ID for every node of a read quorum so that other nodes of the same group can check r’s existence when collecting grants from members of a write quorum.This mechanism works because a read quoru

m intersects any write quorum.

Page 32: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Leader There may be several reference nodes for some type of r

esource; one of the reference nodes is chosen as the leader.

After obtaining grants from all members of a write quorum Q, a node u selects an arbitrary read quorum P and sends COMPETE(t, u, x, QP) message to nodes in QP to compete as the leader of the group of nodes requesting resource x.

The sending of COMPETE message is with the small-ID to large-ID order. It is also the registration procedure for a reference node.

Page 33: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Leaving CS

The leader is responsible of initiating and closing the entry of CS for a group of nodes.

To close the entry of CS, the leader should clear its registration of being the leader.

And after all followers have left CS, the leader should send release messages to all the nodes that it has sent request messages to leave CS; every other node just sends a release message to its reference node to leave CS.

Page 34: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Properties

k-Exclusion: At most k groups of nodes are allowed to enter CS concurrently.

k-Progressing: If there are less than k groups of nodes in CS at a time, then one more group of nodes are allowed to enter CS concurrently.

Concurrent Entering: Nodes of a group are allowed to enter CS concurrently if at lease one node of the group is in CS.

Bounded Delay: If a node enters ES (entry section), then it eventually enter CS.

Page 35: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmAnalysisConclusion

Page 36: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Analysis

The proposed algorithm has message complexity of 2Q+4 to 6n+2QP+1

The proposed algorithm has synchronization delay of 3 to QP+3, where Q is a write quorum, and P, a read quorum of a k-write-read coterie.

The synchronization delay is the delay from the time a node starts requesting to enter CS to the time the node enters CS. It is usually measured by the number of message transmission time.

Page 37: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Outline

IntroductionRelated Workk-Write-Read CoteriesThe Proposed AlgorithmAnalysisConclusion

Page 38: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Conclusion We have proposed a novel quorum system, k-write-read c

oterie, to solve the group k-exclusion problem for distributed systems.

We have also shown how to construct k-write-read coteries with the help of torus structures and have proposed a distributed group k-exclusion algorithm using k-write-read coteries.

The proposed algorithm utilizes the concept of reference node to reduce the context switch complexity.

The proposed algorithm has the merits of unbounded degree of concurrency and unlimited number of types of resources.

Page 39: A Distributed Group  k -Exclusion Algorithm Using  k -Write-Read Coteries

Thanks!!