Niels Hald Pedersen wrote:

> X, and 2) at rare, but regular intervals (file flushing daemon or
> something). In this case my process gets waken up at 100 Hz, or HZ,
> rather than 1024 Hz. I assume what happens is, that everytime the
> scheduler preemts, my process gets scheduled once, does its things,
> yields and will not get schedule before next preemption, because other
> processes scheduled after my process yields, does not yield. So the
> question after a long story is: Does anybody know of a nice way,
> _without_kernel_hacking_ to get a pending high (realtime) priority 

Hmm... correct me if I'm wrong, but I think the problem is not with
prioritys and premption, but with the little asm statement 'cli'.  X is
setuid root and manipulates directly your videocard hardware, in
certain, critical parts of the X servers' code, interuppts are disabled
(includeing your rtc cloc interrupt).  Same way with doing file
flushing...  when you computer is manipulateing the hard disk, there may
be, (i haven't looked personally), some code blocks that are protected
by cli(), and sti().  I imagine you would get this same behavior when
doing anything network intensive, as there are many spots in the kernel
TCP/IP code that are protected with cli() and sti().  

You may want to look at the rt Linux (real-time linux) project, I
understand they have made some modifications to the kernel to be better
at doing real-time type things.

~Jesse Off
http://isufug.ee.iastate.edu/~joff

Reply via email to