[Tinyos-host-mote-wg] [Tinyos-2.0wg] Resource Interface
Kevin Klues
klues at tkn.tu-berlin.de
Tue May 31 02:40:59 PDT 2005
I have a question about the requested() event in the Resource interface....
Should this event be signalled when calls to immediateRequest() are made
as well, or only when calls to request() are made?
The question is really whether the requested() event actually signals
that someone has requested the resource or if it notifies the current
Resource owner that requests are waiting in the queue. If it is the
former, then the answer is yes... signal the event. If the latter, then
the answer is no... don't signal the event.
Either way I see a problem though.
Imagine two users of a resource. The first uses the request() command
and always try to hold on to the resource, unless someone else requests
it. the second uses the immediateRequest() command and does not
perform its function if this call fails.
The requested() event is not signalled:
-- The first user will have exclusive access to the Resource
-- The second user will never get a chance to use the resource.
The requested() event is signalled:
-- The first user will release the resource
-- The second user will not immediately request the Resource again
because he has no way of knowing it was released and his request is not
stored on the Resource queue
-- the first user reaquires the resource and ends up having exclusive
access again.
I'm not saying this is a really realistic scenario for the use of the
Resource interface, but I thought it would be something to think about.
Kevin
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
More information about the Tinyos-host-mote-wg
mailing list