[haiku-development] Re: Pthread priorities and sched.h

  • From: André Braga <meianoite@xxxxxxxxx>
  • To: "haiku-development@xxxxxxxxxxxxx" <haiku-development@xxxxxxxxxxxxx>
  • Date: Mon, 19 Oct 2009 09:29:56 -0200

Em 18/10/2009, às 22:33, Michael Franz <mvfranz@xxxxxxxxx> escreveu:
So you are saying that for FIFO the priorities should be 100 to 120 and the RR should be 1 to 99? I can make that change.

My understanding is that POSIX provides two subclasses inside the real- time class of priorities, one governed by round-robin and the other governed by FIFO; however, the current BeOS priority model doesn't provide for different scheduling policies or mechanisms depending on the level of priority other than switching to strict priority FIFO for real-time threads (those with numerical priorities over and including 100).

That's one of the things that the layered approach I'm using now for the scheduler could be made to address, and also an expansion upon the implicit scheduling classes I talked about on the old blog posts. The posix threading calls could make use of the new APIs that will have to be introduced to take advantage of the new features. Posix makes a great case for introducing such an API and have it being used by a decent number of applications while keeping full source- and binary compatibility. Hopefully judicious use of suggest_thread_priority would yield the same results for apps that don't have thread priorities hardcoded (which I *hope* is the majority, but what do I know).

Stay tuned.


Cheers,
A.

Other related posts: