[prev in list] [next in list] [prev in thread] [next in thread] 

List:       spread-users
Subject:    Re: [Spread-users] Is token hold?
From:       Jonathan Stanton <jonathan () cnds ! jhu ! edu>
Date:       2002-09-29 17:35:05
[Download RAW message or body]

On Tue, Sep 24, 2002 at 07:21:47AM +0900, gulekim@samsung.co.kr wrote:
> Hi, all.
> 
> I am using Spread in my project and,
> 
> to get higher performance, I am investigating Spread source.
> 
> Today I found 'Is token hold' function ... It decides token hold state 
> 
> when 
> 
> Memb_state()==OP || Memb_state()==GATHER && Memb_token_alive() && \
> Get_retrans(Last_token->type)<=1 && Aru == Highest_seq  
> && Token_counter > 100 ==> at this moment what do you mean by Token_counter?
> 
> Why should I have to check Token_counter status and what is the role of this \
> variable?

The Token_counter is a count of the number of times the token has cycled
around teh entire ring of daemons without doing any useful work (meaning
no daemon has sent new packets and all old packets were received by all
daemons). The check here stops the token from cycling continuously if no
useful work is being done. After 100 rotations liek that, the leader of
the ring stops the token and "holds" it until someone needs it again.
This avoids wasting network and CPU resources when Spread is not  busy.

Once a daemon has work to do teh token is restarted and will cycle until
the test in to_hold_token is true again.

Jonathan

-- 
-------------------------------------------------------
Jonathan R. Stanton         jonathan@cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    
-------------------------------------------------------

_______________________________________________
Spread-users mailing list
Spread-users@lists.spread.org
http://lists.spread.org/mailman/listinfo/spread-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic