Messages in this thread | | | Subject | RE: Real-Time thread scheduling in linux?? | Date | Wed, 14 Jul 2004 13:56:50 -0700 | From | "Perez-Gonzalez, Inaky" <> |
| |
> 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/
| |