Re: HELP HZ thread_policy_set
Re: HELP HZ thread_policy_set
- Subject: Re: HELP HZ thread_policy_set
- From: Terry Lambert <email@hidden>
- Date: Fri, 27 Jan 2006 18:38:35 -0800
Have you tried calling thread_policy_get() to get the old value,
modifying only the parts you care about (which presumably don't
include the HZ), and then calling thread_policy_set()?
Alternately:
Unsupported.exports:_hz
Alternately:
Look at the CoreAudio Examples "MillionMonkeys", or look up
MillionMonkeys on developer.apple.com.
-- Terry
On Jan 27, 2006, at 4:45 PM, Jon Adelman wrote:
Okay... I have been trying to use thread_policy_set but as per the
documentation says there is a global variable HZ
"The time values are in terms of Mach absolute time units. Since
these values differ according to the bus speed of your computer, you
should generally use numbers relative to HZ (a global variable
containing the current number of ticks per second). You can either
handle this conversion yourself by dividing this value by an
appropriate quantity or use the conversion routines described in
“Using Kernel Time Abstractions”.
Say your computer reports 133 million for the value of HZ. If you
pass the example values given as arguments to this function, your
thread tells the scheduler that it needs approximately 40,000 (HZ/
3300) out of the next 833,333 (HZ/160) bus cycles. The preemptible
value (1) indicates that those 40,000 bus cycles need not be
contiguous. However, the constraint value (HZ/2200) tells the
scheduler that there can be no more than 60,000 bus cycles between
the start of computation and the end of computation."
I can't seem to find this variable anywhere... Does it exist? and if
it doesn't what is the appropriate value to go here? I have searched
everywhere for this and although other people have said similar
comments there never seems to be an answer, :(
Any help would be greatly appreciated Thx,
Jon
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden