If you look at the math, you'll see that I took the overflow into account,
I even expected it. If you see this effect in my implementation, it would
be a bug.
You need more than two busy loops.
There's a reason I implemented a simple simulator first, so I could
actually study the scheduling behaviour of different load situations. That
doesn't protect from all surprises of course, but it gives me the
necessary confidence the scheduler will work reasonably even in weird
situations.
From these tests I already know that your approximations only work with
rather simple loads.
bye, Roman
-