David Schleef wrote:
> On Wed, Nov 04, 1998 at 01:22:22PM +0100, Oliver Schindler wrote:
> > > X. The default time slice in Linux is 200ms. If X uses its entire
> > > time slice, you're screwed.
> >
> > You're wrong here. The default timeslice is 20 ms, but X or an IDE- IRQ
> > can block the system up to 200-300 ms.
> >
>
> I get my info from /usr/src/linux/include/linux/sched.h:
>
> #define DEF_PRIORITY (20*HZ/100) /* 200 ms time slices */
But with HZ == 100 ( from <asm/param.h>) , DEF_PRIORITY is 20
Simply try this little Proggy:
/***************************************************************************/
#include <stdio.h>
#include <asm/io.h>
#define LPT 0x378
void main(void)
{
if (ioperm(LPT, 8 , 1) < 0) {
fprintf(stderr,"ioperm: error accessing to IO-ports. Root Privileges requ
exit(-1);
}
while(1) {
outb(0,LPT);
usleep(1); /* here we get scheduled away */
outb(1,LPT);
usleep(1);
}
}
/*******************************************************************/
When you hook an oszi to the Lpt.Port, you can see the 20 ms timeslices.
>
> In non-error situations, the maximum time taken by an IDE IRQ is
> the on-disk buffer size/transfer speed, which is on the order of
> 128 Kbytes/~10 megaytes per second, i.e., about 10 ms. This causes
> serial buffer overruns with fast serial ports, thus interrupts
> can be enabled during IDE transfers using hdparm -- problem
> solved, unless you have a broken chipset/drive combination.
> Keep in mind that timer interrupts (every 10 ms) seldom get missed.
>
That's true, if you want to write 128k to your disk, you will have no problems,
but if you want to 3.5 Meg per Second, you will have to deal with head seektimes,
busy timeouts, etc. , and then it is possible that Linux stays for about 100 up to
200 ms
in one IRQ. For RT-Linux there is no problem , but for a user space process it is.
>
> X is a user space process, thus cannot disable interrupts, and
> therefore cannot block the system.
>
True and false, when you look at the mouse irq's or at the time which is needed to
transfer
data to the grafic-adapter, x will block the system indirect. A while ago was a
dicussion
about _cli()'s in the X-Server, i'm not quite sure what the conclusion was but i
think there are some..
>
> >
> > POSSIX Realtime is not enough here, because it simply works on the scheduler.
> > But if
> > you get IRQ's (Harddisk, network, mouse ..) the scheduler haven't got the
> > slightest chance to schedule the process.
>
> The issue here is not about missed interrupts. It is about the process
> not being scheduled.
>
That's what i said.....
RT-Linux only make sure that you will get the data from the IO-Card into the
Computer in time.
And at this point 3.5 M are no problem over PCI. What you do with the data is not
the problem of the
RT-Linux.
All in all, the problem is the average datatransferrate. If it's too low, data is
lost . Point.
Greets
Oliver
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/