Am Donnerstag, 03.04.03 um 11:39 Uhr schrieb Srinidhi Rao: I am working on a project which needs 100% CPU time when it is running. With some luck, you can get 99.5 % of the CPU. For lengthy computations, there is no need to hog the CPU since you get all available computing time anyway. For realtime needs, search for realtime threads, often used in audio/video applications; e.g. the CoreAudio mailing list archives. Also, what is the timeslice allocated to a process in normal condition? It's one of the first messages you see when booting in verbose mode (hold down Cmd-V at startup). On all versions of OS X I've seen it so far, the quantum is 10 ms. One way I could think is to have a Real time thread in my application. But will this assure me continuous CPU time? No. Or better: just for a few seconds. Even realtime threads are kicked if they hog the CPU for more than some seconds. Note that hogging the CPU renders a computer completely unresponsive exept for a force-reboot. (Source: discussions on CoreAudio) Still can't imagine which type of application whould need _all_ CPU. What are you doing if you run on a slightly slower system? If you want to control a robot, I'd write a kernel extension doing the I/O with some emergency stop functionality. For feeding the kext I'd use a realtime thread inside a normal userland application. (guessing based on your signature). HTH, Markus - - - - - - - - - - - - - - - - - - - Dipl. Ing. Markus Hitter http://www.jump-ing.de/ _______________________________________________ darwin-kernel mailing list | darwin-kernel@lists.apple.com Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/darwin-kernel Do not post admin requests to the list. They will be ignored.
participants (1)
-
Markus Hitter