[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scheduler going backwards solution?



Lloyd Wood <[email protected]> writes:

> On 7 Sep 1999, Yuri Pryadkin wrote:
> 
> > Xin Wang <[email protected]> writes:
> > 
> > > There were a lot of discussions on "scheduler going backwards" problem
> > > in this list. I wonder what is the final solution?
> > 
> > I think I can summarize it as follows:
> > 
> > 1.  If you see this warning, the first thing you should do is to make
> >     sure you're using the latest version of scheduler.cc.  If necessary,
> >     get the latest version from 
> > 	http://www-mash.cs.berkeley.edu/cgi-bin/cvsweb/ns-2/scheduler.cc
> >     Don't forget to recompile.  If after that you still see this error
> >     message, please report this to the list.
> > 
> > 2.  If the previous didn't work for you, use Heap scheduler instead of
> >     default Calendar (see Simulator instproc use-scheduler command and
> >     nsdoc). Heap scheduler, although a little less effective than
> >     Calendar, doesn't have a numeric stability problem and should not
> >     give you this error.  Again, if it does, please report this to the
> >     list.
> [..]
> > There is only one central scheduler in ns which manages a single queue
> > of timed events.  It's Calendar by default, but you can switch to
> > using Heap or List.
> 
> Question: why isn't Heap the default? Faster than list, even more
> solid than Calendar. Calendar's added desk calendar wrapping feature
> doesn't strike me as that useful for 99.999% of ns use (ditto for
> List's preserving ordering of simultaneous events.)

What is "added desk calendar wrapping feature"?

Heap as well as Calendar had a problem with re-ordering of
simultaneous events, but that has been fixed.  Keeping the order the
same is useful for validations and lets different schedulers verify
each other.

Calendar is still the default because no one ventured to change it to
Heap.  There is a hope that recent fixes are enough to keep that
'backwards' error from reappearing.  In theory, Calendar's hold time
(1 enqueue + 1 dequeue) is O(1), which is better than Heap's O(lg(N)).
In practice, there may be not that much difference, though.

  -Yuri




> 
> L.
> 
> <[email protected]>PGP<http://www.ee.surrey.ac.uk/Personal/L.Wood/>