Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

THREAD_TIME_CONSTRAINT_POLICY



Hello,

I'm calling thread_policy_set() with THREAD_TIME_CONSTRAINT_POLICY to improve the performance of a real-time thread. I notice that under OS X 10.2.8 for 1.8GHz G5, thread_policy_set returns a PARAM_ERROR (4) if I pass it tcPolicy.computation greater than about 1600000, corresponding to about 1.8 milliseconds. This limitation is independant of the value I pass in tcPolicy.period and tcPolicy.preemptible. I can't figure out why the scheduler would choke on my request for a larger chunk of CPU time. What's really odd is that thread_policy_set() returns KERN_SUCCESS even if I request tcPolicy.period/computation/constraint all set to 1600000, presumably smiling upon my request for 100% of the CPU time! Of course, the irritating part of all this is that no matter what I pass, my thread still gets thrown out for up to 10ms at a time, even if I'm the only app running, trueblue is shutdown, and the update task has been killed :(
Any pointers on improving real-time performance would be greatly appreciated.

-Peter
_______________________________________________
darwin-development mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-development
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.