Results 1 to 3 of 3
Hi All, I have a timer thread, and when it expires, it sets a flag. The only problem is, if any higher priority thread comes in between, then the timer ...
- 05-04-2011 #1Just Joined!
- Join Date
- Dec 2010
- Posts
- 34
[SOLVED] Which is the scheduling algorithm which will make my thread o
Hi All, I have a timer thread, and when it expires, it sets a flag. The only problem is, if any higher priority thread comes in between, then the timer is not expired in real time.
Thus i want to set a highest priority to my thread. Now, i know 2 algos, which can make my thread in real time are: SCHED_FIFO and SCHED_RR.
So, here are my queries: 1) Which scheduling algo is best suited for this purpose? 2) Is it guaranted to work in real time if i use that algo (you suggest in 1) and set the max_priority by getting the maximum settable priority for that particular algorithm using, int sched_get_priority_max(int policy);
Thanks in advance
- 05-05-2011 #2Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
See the man page for sched_setscheduler for information about this. It does a reasonable job of explaining the options you have.
Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 05-06-2011 #3Just Joined!
- Join Date
- Dec 2010
- Posts
- 34



