problem in assigning real time scheduling to pthread in linux
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
problem in assigning real time scheduling to pthread in linux
Hi,
I am using RH9-2.4.21 , NPTL version 0.29
I am trying to assign realtime scheduling to the pthreads but facing a strange problem.
I am unable to assign the scheduling policy and priority to a thread while creating it.
after the creation i am able to change its policy and priority (using pthread_setschedparam).
I am working as root .
I even tried with PTHREAD_EXPLICIT_SCHED ,( although this is the default behaviour), but of no use
OUTPUT which i got on running this code :
# :thread_routine running at OTHER/0
here i am just trying to assign scheduling policy as RR and priority 50 and creating a pthread.
Inside the thread function i am printing the sched Policy and priority.
Ideally it should print policy = RR and priority = 50 ; but instead its printing
policy = OTHER and priority = 0
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.