Messages in this thread | | | Date | Tue, 18 Jul 2000 14:22:42 -0700 | From | George Anzinger <> | Subject | Re: Query on SCHED_RR. |
| |
> Venkata Rajesh Velamakanni wrote: > > Hello All, > > I have a query in setting thread priorities using SCHED_RR > and pthread_attr_setschedparam. Can any one please answer > my queries. > > I have created a thread (thread1)by setting SCHED_RR as scheduling > policy > and priority as 1. Then I created another thread (thread2) with the > same > scheduling policy but with higher priority. My thread2 never got > chance to > execute until my thread1 is exited.
I don't think this is what happened. What priority is the main at? I think it got locked out by your thread 1 and did not even create thread 2 until thread 1 exited. > > From this I understood that there are two bugs, which need to be > fixed. > Could you please clarify whether following are bugs or not. Or Am I > missing > something? > > 1. First one is with priority, though my second thread is of high > priority it > never got chance until my thread1 is exited. > 2. Second one is with scheduling policy, though I am using SCHED_RR, > my second thread did not get the time slice. > I am not sure what you want here, but SCHED_RR slices within a given priority level. A priority 5 thread will not be SCHED_RRed out in favor of a priority 4 thread _EVER_. See man pages on this.
Yes there are problem with the scheduler, but I don't think you have hit them, yet :)
George
ps, there is a real time scheduler with some sample programs at www.mvista.com
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |