Re: [Gems-users] A question on event scheduling


Date: Tue, 28 Aug 2007 19:14:31 -0500
From: "Niket Agarwal (niketa@xxxxxxxxxxxxx)" <niketa@xxxxxxxxxxxxx>
Subject: Re: [Gems-users] A question on event scheduling
 You are right. I missed that.

Thanks,
Niket


> Even if the consumer is woken up, all the logic that actually removes a message from a MessageBuffer should be inside a check of MessageBuffer::isReady(). Take a look at this function...if I recall, there should be a check to ensure that the head message (determine by earliest arrival time) is equal to the current time.
> --Mike
>
> Niket Agarwal (niketa@xxxxxxxxxxxxx) wrote:
>   
> >From what I understand, the EventQueue in Gems does not enforce any ordering of Consumers scheduled to wakeup at a particular time. Now suppose, I enqueue a message in a buffer which is otherwise free, at cycle 'x' and schedule the wakeup of its consumer the next cycle 'x+1'. But, the consumer is woken up by some other event during this cycle 'x' and checks this message buffer also and picks up the message during cycle 'x'. Since when a consumer wakes up, it does not know who has woken it up, this situation can certainly occur. Note that this is something that was supposed to be done in cycle 'x+1'.
>
>   
> This can happen for example in PerfectSwitch. Am I missing a trick here ? How does ruby avoid such a scenario ? Thanks, Niket _______________________________________________
> Gems-users mailing list
> Gems-users@xxxxxxxxxxx
> https://lists.cs.wisc.edu/mailman/listinfo/gems-users
> Use Google to search the GEMS Users mailing list by adding "site:https://lists.cs.wisc.edu/archive/gems-users/";; to your search.
>   

[← Prev in Thread] Current Thread [Next in Thread→]