Re: Soft real-time scheduling delays

Systemkennung Linux (linux@mailhost.uni-koblenz.de)
Wed, 18 Jun 1997 03:58:48 +0200 (MET DST)


> Greetings. I've been trying to make use of the Posix soft-real-time
> scheduling, and I've been having problems because it seems that
> sometimes a SCHED_FIFO process will not be immediately rescheduled when
> it becomes eligible to run, even if it is the only SCHED_FIFO process in
> the system.
>
> For example, the test program below, on my 2.0.27 kernel with rt-linux
> 0.5 patched in, and using libc 5.4.17 on an Intel Pentium 100 with
> PCI/IDE disk, shows an occasional rescheduling delay of up to 30ms.
> I run the program from an X-window xterm, an the delays start showing up
> if I either manipulate windows, or run an other program (like "ls -lR >
> temp") that causes a lot of disk activity.
>
> So, while I realize that this is why they call it _soft_ real-time, I'd
> like to ask the following:
>
> 1) Is this normal?
> 2) Is there something in the 1.2.x kernel that would improve things?
> 3) What actually is likely causing the delays?

There is always at least one other process with SCHED_FIFO priority,
kswapd. All the thing that you mentioned above to cause these delays
can tickle the mm subsystem and result in kswapd activity.

> 4) Is there anything I can do to minimize the delays?
>
> (Yes, I realize I'm not actually making use of rt-linux here, but I
> mentioned it in case it might be actually contributing to the problem)

You can only guarantee a response time by mlock(2)ing a process in core.

Ralf