Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-20-2005, 07:35 AM   #1
Registered: Sep 2004
Location: Fagaras, Romania
Distribution: Mandrake 10.0
Posts: 48

Rep: Reputation: 15
Need FIFO thread scheduling policy


I am posting on behalf of a friend (had a temporary problem with posting)!
Here is the post:

I've tried to write a C program to change the default thread scheduling policy from SCHED_OTHER to SCHED_FIFO. Though the program does not have any errors it doesn't seem to work. The threads execut in the same manner!
Can someoen help me with some advice or code sequence? Do I need a special real time linux kernel in order to do that?

I am using: RedHat 9.0 with the default kernel!
Here is the code that I am using at the moment:

pthread_t real;
pthread_attr_t realAttributes;
sched_param fifoLevel;
fifoLevel.sched_priority = (sched_get_priority_max(SCHED_FIFO) +
sched_get_priority_min(SCHED_FIFO)) / 2;


pthread_attr_setschedpolicy(&realAttributes, SCHED_FIFO);
pthread_attr_setschedparam(&realAttributes, &fifoLevel);
pthread_create(&real, &realAttributes, realmain, NULL);



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 03:30 PM
Samba System Policy, Default User Policy scooter549 Linux - General 2 02-24-2009 02:23 AM
Forum Policy - using [Solved] in thread titles Riddick LQ Suggestions & Feedback 6 10-01-2005 09:40 AM
scheduling thread gives error bndpatel Programming 1 06-24-2005 01:54 PM
snmptrapd FIFO eccsamba Linux - Networking 2 11-24-2004 08:52 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:17 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration