Re: More thread scheduling observations
Re: More thread scheduling observations
- Subject: Re: More thread scheduling observations
- From: Ian Ollmann <email@hidden>
- Date: Sun, 5 May 2002 11:27:15 -0700
On Sun, 5 May 2002, Kurt Revis wrote:
>
On Sunday, May 5, 2002, at 09:39 AM, Ian Ollmann wrote:
>
Anyway, as you suggested, I tried turning down the importance, and
>
things still work fine. Importance=4 seems to be my lower bound; any
>
lower than that and window-dragging causes dropouts.
Great!
>
Is the value of 'importance' in the structure for
>
THREAD_PRECEDENCE_POLICY the number you are talking about when you say
>
"PRI=64"?
Yes.
>
Or is the importance added to the task's base priority to get
>
the real priority? The fact that I can go so low with the importance
>
seems to indicate the latter.
It's been a few months since I looked at this. Pthreads do it one way and
mach threads did it the other way, which is why I probably cant remember
which one does it which way! I *think* the mach API's do absolute
priorities, whereas pthreads are relative to some process priority level,
but it wouldn't surprise me that I have it completely backwards. Some
quick experiments would tell you. Just use the pthread API to set a
thread's priority and then check it with the mach API. You cant go over
the window server priority with either, so that is your frame of
reference.
PThreads are implemented on top of mach threads and Carbon MP threads on
top of that, so as difficult as it all sounds, they do share a common
heritage, which should help simplify things somewhat.
http://developer.apple.com/technotes/tn/tn2028.html
>
> More privileges come with greater reponsibility.
>
>
Oh, I completely understand and agree with that, after freezing my
>
machine a few too many times when playing with time-constraint threads!
>
I have no desire at all to go back to the Bad Old Mac days when any old
>
program would randomly hose everything...
:-)
Ian
---------------------------------------------------
Ian Ollmann, Ph.D. email@hidden
---------------------------------------------------
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.