[X-Unix] limit cpu usage

Ken Rossman rossman at columbia.edu
Thu Nov 25 20:22:13 PST 2004


I don't know what kinds of hooks exist in OSX, but in Solaris, this is 
just
what the various scheduler classes are for (more or less).  While you 
aren't
specifically strictly limiting CPU usage percentages by hard values, you
ARE assigning priority orders by assigning processes to different 
scheduler
queues with different runtime priorities.

So, in "unix" (at least Solaris unix) this IS philosophically possible 
to
do.  But again, I haven't looked closely enough in OSX to figure out 
whether
the same sorts of runtime queues exist (or will exist in the future).

Ken

On Nov 25, 2004, at 11:14 PM, Brian Medley wrote:
> On Wed, Nov 24, 2004 at 11:41:08PM -0500, William H. Magill wrote:
>> On 24 Nov, 2004, at 20:29, Brian Medley wrote:
>>> I've googled around, but haven't found an answer to this
>>> question.  I would like to limit the max % cpu a process can
>>> have.  Something similar to ulimit; however, ulimit only allows
>>> limiting the number of cpu seconds a job can run.
>>
>> This is not philosophically possible on a Unix system.
>>
> ...
>>
>> The reason is a long discussion of Operating System theory, but 
>> briefly
>> put, Unix simply does not have the "hooks" necessary to implement any
>> useful kind of Resource Control.
>
> Interesting, if you feel like writing more about the subject I'd
> like to know.



More information about the X-Unix mailing list