Unix & pegging the CPU for idle Squeak, a question...

Greg A. Woods woods at weird.com
Thu May 24 20:04:49 UTC 2001


[ On Thursday, May 24, 2001 at 11:42:11 (-0700), John M McIntosh wrote: ]
> Subject: Unix & pegging the CPU for idle Squeak, a question...
>
> Now maybe we just accept somewhat poorer performance under Carbon to 
> avoid pegging the CPU and allow all those other Unix tasks to run. 
> But thoughts on this are welcome

Unix processes don't really have to play nice -- they're forced to do so
by the system scheduler.  Other processes will run and get their fair
share of CPU time.  On many systems something like squeak will be given
less CPU time if it has a high CPU-to-IO ratio and if there are other
processes which want more CPU and which have "better" CPU-to-IO ratios.

If the user really wans to play nice then there's always the nice(2) or
setpriority(2) [depending on your platform] system calls.  The only
problem being that some/most systems won't let you raise your priority
(or lower it in the case of the backwards setpriorty(2) API) again, so
adding a primitive to the VM to call whichever of these you have
available probably isn't generally useful.

I don't know yet if Squeak does all the right things w.r.t. X11 when its
window is iconized or otherwise totally obscured, but that's something
I'm hoping to look into soon, assuming I can find the time to learn
enough about Xlib programming to figure it out myself!  ;-)

Obviously an event-driven system like Squeak is always going to require
some CPU time just to tick along....

-- 
							Greg A. Woods

+1 416 218-0098      VE3TCP      <gwoods at acm.org>     <woods at robohack.ca>
Planix, Inc. <woods at planix.com>;   Secrets of the Weird <woods at weird.com>





More information about the Squeak-dev mailing list