8 - Tokenloss and traversal Flashcards
What is the purpose of tokens (in a ring topo)?
It is used in termination detection.
In what kind of DA network structure do we expect to use tokens?
unidirectional ring topologies
How many tokens are required to detect tokenlosses?
at least two.
Explain the main idea of token loss detection.
- when token t0 passes through some node P for the second time in a row
- while in the meantime t1 has not passed through P
- and in the meantime t0 and t1 have not met in another node
- then t1 has been los
What value(s) need to be tracked by each node in order to detect missing tokens?
- The counter value of the last token that has passed through the node
- Which tokens are currently present in the node.
What is the psudo code for receiving a token in a ring.
upon receipt of (token;j,c) do token_present[j]= 1 m[j] = c if ( (token_present[1-j]) or (l=c) ) then m[j] = c + sign(c) m[1-j] = -m[j] token_present[1-j] = 1 endif enddo
What is the psudo code for sending a token in a ring.
when (token_present[j] and C(i,j)) do token_present[j]= 0 send(token;j,m[j]) l = m[j]
Explain why tokens are only noticed by one node to be ‘missing’, and not by all nodes.
That node will regenerate new counter value for both tokens, meaning that the counter comparison in the other nodes will not ‘fail’ again.
What is the goal of a traversal algorithm?
To construct a subnetwork of a network that contains all nodes and is a spanning tree.
In traversal algorithms, what is set U ?
It is a set of a node’s links on which it has not yet sent the token. Set U also excludes any parent links (/nodes).
Explain the rules of Tarry’s algorithm.
Upon node receival:
1. if U is not empty, it sends the token on any link in U
2. if U is empty, it sends the token to its parent
How many times is a token send in the graph using Tarry’s algorithm? explain
2 |E|
Each node will receive a token over a link at least once, and therefor also has to send a token over each node once. Hence each link is used twice.
What is the time complexity of Tarrys algorithm?
2 |E|
In Traversal algorithms, how does a node decide its parent?
It decides that from whoever it receives a token first, becomes that node’s parent
What is the biggest drawback for tarry’s algorithm?
Number of messages send is very large, which makes it innefficient and time consuming.