lkml.org 
[lkml]   [2004]   [Jul]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRE: Real-Time thread scheduling in linux??
Date
From
> 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)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:04    [W:0.104 / U:0.032 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site