mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* 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 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
2004-07-14 20:56 Perez-Gonzalez, Inaky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®