[haiku-development] Re: Interesting thread priority assignments in media kit

  • From: "David McPaul" <dlmcpaul@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 5 Aug 2008 09:27:26 +1000

2008/8/5 Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>:
> "Rene Gollent" <anevilyak@xxxxxxxxx> wrote:
>> I guess I was remembering wrong, the closest would be
>> B_URGENT_PRIORITY and that one is 110. B_REAL_TIME_PRIORITY is indeed
>> 120 which is the value I was seeing. Does BeOS use priorities that
>> high as well for the media threads? That seems dangerous since it
>> would pretty much cause the whole sys to grind to a halt if something
>> goes wrong in some media-related task.
>
> That's the basic idea behind realtime threads: they have to be designed
> in a way that nothing can go wrong :-)

We need to think very carefully about thread priorities.  Tasks that
use a lot of CPU should not normally be given a high priority.

High priority should be reserved for those tasks that do their work
very quickly and/or are interacting with hardware that has hard limits
on timing.

Decoding Video or Audio is not a high priority task.  If your CPU is
not up to the task of decoding at the rate required then raising the
priority is unlikely to help.

I like BeOS not just because it played media well, I liked it because
it let me still use the system while playing media or anything else
that I did.  I always felt that I could do something else OR at the
very least cancel the task I was doing not get locked out because
suddenly the mouse or GUI were felt to be too low a priority while
trying to squeeze out 1fps.

Cheers
David


-- 
Cheers
David

Other related posts: