[plug] Scheduling Problems

Brad Campbell brad at seme.com.au
Thu May 18 18:02:28 WST 2000


Leon Brooks wrote:
> 
> Brad Campbell wrote:
> > What appears to be happening is my task
> > is not being preempted on it's system call, thus the bottom half handler does not
> > run until my task gets preempted at the end of it's timeslice.
> 
> A little calculation and an exact timeslice value could be very helpful.
> 

OK..
Task slice is 10mSec exactly, measured with a software hack and a CRO.
My process runtime is 38uSec, measured by the same.
at Time=0 My task starts running, it queues 4 bytes in the serial buffer
and goes to sleep on a read() exactly 38uSec later.
At Time=2mSec, the Serial handler wakes up, recieves 2 bytes and schedules
it's bottom half.
8mSec later (Time now = 10msec) the bottom half runs, and wakes up my task
letting it know there is data available for it.

By making HZ=200, I can double it's speed.
By making HZ=300, I can triple it's speed.
After that, I'm pretty much wasting my time. But a triple in speed is worth
re-compiling the kernel for.

-- 
Brad....
"The ultimate result is that some innovations that would
truly benefit consumers never occur for the sole reason
that they do not conincide with Microsoft's self-interest"
- Judge Thomas Penfield Jackson
         /"\
         \ /     ASCII RIBBON CAMPAIGN
          X      AGAINST HTML MAIL
         / \



More information about the plug mailing list