Termination Detection Flashcards

1
Q

What is the DGF algorithm and how does it work?

A

DGF is a token based algorithm in which tokens are sent clockwise around a ring of processes. Work can be sent among nay processes in the ring. The token can be be black or white and each process changes between being black or white.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

In DGF what colour does a process become when sending a message?

A

Black

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

In DGF what colour does a process become when sending a token?

A

White

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In DGF what conditions must be met in order to know it is safe to terminate?

A

Process 0 must be white and receive a white token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In DGF, what occurs if either process 0 is black or the token is black when the token reaches process 0?

A

If the process is black then wait until idle, if the token is black then don’t wait, then start termination detection again

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What happens if a process > 0 receives the token?

A

Adds it’s message count to the token
If it’s own colour is black, it changes its colour to white and changes the token to black.
If it’s own colour is white it leaves the token colour unchanged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Describe the weight throwing termination detection algorithm

A
  • process 0 is the controlling process and gets the original job and has starting weighting w_0 = C
  • all other processes have a starting weight of w_i = 0
  • every message includes a weight w_j
  • the sum of all weights (w_i and w_j) is always = C
  • when a process sends work message j it sends some of its own weight
  • when a process receives work and weight, it adds the received work to its own weight
  • when any process (not 0) becomes idle, it send its weight to process 0
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

In the weight throwing algorithm what happens when process 0 becomes idle?

A

If w_0 = C it concludes termination detection
If w_0 < C it waits for more messages

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a difference with tokens between DGF and spanning tree?

A

DGF has one token which is white and is initially given to process 0 which is then sent in a logical ring to each process whereas in spanning tree it is arranged in a tree and every leaf node gets a white token initially.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Describe what happens if a process terminates in spanning tree algorithm

A

If it is a leaf process: it sends a black token if it is black, otherwise it sends a white token
If it is a non-leaf process and has received a token from all children: if it is black or has received a black token from one of its children -> send black token, else if it is white AND did not receive a black token from anyone of its children -> send white token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What happens when the root process receives a token from all its children in the spanning tree algorithm?

A

If one of the tokens is black: restart termination
If it’s is idle, white and all tokens are white: conclude termination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly