Re: Yielding the processor in a kext?
site_archiver@lists.apple.com Delivered-To: darwin-kernel@lists.apple.com User-agent: Icedove 1.5.0.9 (X11/20061220) Folks, Michael Smith wrote:
It's not your business to make scheduling decisions; don't even try.
That is just not true. In the example I gave in my previous email, I show that sometimes, the application knows better than the OS how things must be scheduled. It does not matter how much progress all my threads make compared to the rest of the system, but it does matter how much progress they make relative to each other. In other words, I'm trying to write my own little scheduler (just for all the threads within my task), on top (not instead of) the xnu system-wide scheduler. I'm the only one who can do that because xnu obviously doesn't know the specifics of my application. Terry Lambert wrote:
You block on the mutex held by the other thread
Well that does not work in my case either: as I explained, I don't want to stop the thread that is too far ahead in the computation. I just want to slow it down. So blocking is not an option. I want to hint the scheduler that "hey, you made me run, but at the app level I know that it is better if I do nothing at this moment, so I would like to voluntarily relinquish my time slice." Thanks, -- hpreg _______________________________________________ Do not post admin requests to the list. They will be ignored. Darwin-kernel mailing list (Darwin-kernel@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/darwin-kernel/site_archiver%40lists.a... This email sent to site_archiver@lists.apple.com
participants (1)
-
Régis Duchesne