* Real-Time thread scheduling in linux??
@ 2004-07-14 12:31 Harish K Harshan
2004-07-14 13:34 ` Paul Davis
0 siblings, 1 reply; 3+ messages in thread
From: Harish K Harshan @ 2004-07-14 12:31 UTC (permalink / raw)
To: linux-kernel
Hello.
I would like to know if there is any way to give a thread real-time
priority under Linux, and also if it is possible using the pthread
library. How would the kernel handle such threads? And do we need to
implement locking systems, so that this thread does not block other
threads permanently? Please help me, because I am working on a data
acquisition application, and the acquisition thread needs almost
real-time priority, and loss of data is not affordable.
Thanks in advance,
Harish K Harshan.
***********************************************************************************************
Amrita Institutions, Amritapuri, Kerala, India -
Sent using Amrita Mail
Visit http://www.amrita.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Real-Time thread scheduling in linux??
2004-07-14 12:31 Real-Time thread scheduling in linux?? Harish K Harshan
@ 2004-07-14 13:34 ` Paul Davis
0 siblings, 0 replies; 3+ messages in thread
From: Paul Davis @ 2004-07-14 13:34 UTC (permalink / raw)
To: Harish K Harshan; +Cc: linux-kernel
> I would like to know if there is any way to give a thread real-time
>priority under Linux, and also if it is possible using the pthread
>library. How would the kernel handle such threads? And do we need to
>implement locking systems, so that this thread does not block other
>threads permanently? Please help me, because I am working on a data
>acquisition application, and the acquisition thread needs almost
>real-time priority, and loss of data is not affordable.
wrong mailing list, sort of.
use google to look up SCHED_FIFO, which will lead you into the
wonderful of soft-RT programming on POSIX operating systems.
lots of people (including me) do this sort of thing already. but be
warned: linux is not a hard-RT OS, and cannot become so. if you are
doing data acquisition for critical data or systems, you might want to
consider RT-Linux or RTAI or other hard-RT variants.
--p
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: Real-Time thread scheduling in linux??
@ 2004-07-14 20:56 Perez-Gonzalez, Inaky
0 siblings, 0 replies; 3+ messages in thread
From: Perez-Gonzalez, Inaky @ 2004-07-14 20:56 UTC (permalink / raw)
To: Harish K Harshan, linux-kernel
> From: Harish K Harshan
>
> I would like to know if there is any way to give a thread real-time
> priority under Linux, and also if it is possible using the pthread
> library. How would the kernel handle such threads? And do we need to
> implement locking systems, so that this thread does not block other
> threads permanently? Please help me, because I am working on a data
> acquisition application, and the acquisition thread needs almost
> real-time priority, and loss of data is not affordable.
This is a user space POSIX API issue. You need to use pthread_setscheduler(),
on a recent glibc. The kernel doesn't handle threads or processes
differently, so the whole process will not block if one of the
threads does.
[this is all assuming you are using a glibc with NPTL as threading
library, as most Linux distros should have now].
Iñaky Pérez-González -- Not speaking for Intel -- all opinions are my own (and my fault)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-07-14 20:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-14 12:31 Real-Time thread scheduling in linux?? Harish K Harshan
2004-07-14 13:34 ` Paul Davis
-- strict thread matches above, loose matches on Subject: below --
2004-07-14 20:56 Perez-Gonzalez, Inaky
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.