Subject: RE: [jade-develop] behaviour scheduling granularity
From: Caire Giovanni (Giovanni.Caire@TILAB.COM)
Date: Fri Sep 27 2002 - 11:57:27 MET DST
Hi John,
I agree with you that nested behaviours are not extremely efficient.
We are currently starting a benchmarking activity about behaviours and I'll keep you informed.
As for giving a behaviour the ability to tell its root which behaviour to schedule next I don't think this should be the default scheduling mechanism. In fact a nested behaviour does not know the complete behaviour structure it is inserted in. Let's consider this example:
Behaviour A includes Behaviour B (ParallelBehaviour) that includes behaviour C (SequentialBehaviour) and D. C is a SequentialBehaviour that includes E and F. When C runs and shedules E for the first time it cannot tell A (the root) to schedule E from now on. In fact the next behaviour to shedule is D.
On the other hand I would suggest to create another CompositeBehaviour that works the way you say.
Hope this helps,
Giovanni
-----Original Message-----
From: John J. Mikucki [mailto:jjm7570@cs.rit.edu]
Sent: mercoledì 25 settembre 2002 21.29
To: jade-develop
Subject: [jade-develop] behaviour scheduling granularity
Hello again--
I have a few custom behaviours which manipulate some custom data
structures of mine. So, for example, I have a (subclass of) FSMB which
does the following 'transaction':
1. run "Get structure" FSM
2. run "Lock structure" FSM
3. run user-supplied behaviour
4. run "Unlock structure" FSM
now, when I pull the commands in the lock, user, and unlock behaviours
into their own little class (for testing) I can process tens of
'transactions' per second. However, when using the FSMB to run first
the get FSM, then the Lock FSM, etc I see at most one transaction every
second or two!
Because the "lock" and "unlock" behaviours are very quick to run, I
believe that the remaining overhead could be due to the JADE behaviour
hierarchy (which is, at that point, between 5 and 10 levels deep) and
the overhead associated with scheduling behaviours.
Two questions:
First: Have any experiments been done re: the granularity of the JADE
scheduling mechanism or the max number of behaviour-transitions per second?
Second: Is there any way I can accelerate the scheduling of
deeply-nested behaviours?
I would like to think that this could be accomplished by giving each
'nested' behaviour the ability to tell its root behaviour the next
behaviour to schedule, and simply setting that 'next' behaviour to be
its parent upon termination. Thus:
Consider behaviours A, B, C, and D. A contains B which contains
(sequentially) C and D. A is contained in no other behaviour. When A
schedules B, B looks at C, decides to schedule it, and notifies A that
from now on C is to be scheduled next.
Then, let C run to completion. Upon completion, C tells its root (A)
that B (its parent) is to be scheduled next. On the next cycle, A runs
B, which schedules D, etc.
This would prevent deeply-nested behaviours from requiring multiple
'cycle's to actually start the next piece of productive work.
John
_______________________________________________
jade-develop mailing list
jade-develop@sharon.cselt.it
http://sharon.cselt.it/mailman/listinfo/jade-develop
UNSUBSCRIBE INSTRUCTIONS AT http://jade.cselt.it/mailing.htm#unsubscribe
This archive was generated by hypermail 2a22 : Fri Sep 27 2002 - 11:57:42 MET DST