[ENH] CPU time for Processes.

John M McIntosh johnmci at smalltalkconsulting.com
Fri Mar 9 23:11:00 UTC 2001


>In general, I think such a feature is very desirable. I see one 
>problem on systems where squeak runs on top of a preemptive 
>multitasking OS, though:
>If you have calculated (currentTime - startTime), how do you know 
>how much of that time was actually spent in Squeak and not in other 
>OS processes? You might get equal values, but in one case, the 
>squeak process was really running all the time, but in the other 
>case, squeak may have been preempted and actually only executed a 
>few bytecodes in the same time.
>It seems to me one might have to track the time squeak gets from the 
>host OS in between in-squak process switches, too, and factor that 
>in.
>OTOH, I think what we are most interested in are not the absolute 
>running times of squeak processes, but their running times in 
>relation to each other within squeak. In the long run, these effects 
>probably average themselves out.

The amount of CPU time given to Squeak isn't important right now. I 
mean it might be nice also to track I/O (what ever that means) by 
process (A much more complicated task btw). But you see some 
environments which come the from single threaded workstation history 
don't actually give you information from which to calculate CPU time. 
So what we live with is clock time. Now I could be waiting on I/O or 
waiting on the hosting O/S or getting only a small fraction of the 
CPU. But I'm really interested in which Smalltalk process is truly 
getting the time.


FYI on the mac the UI event task, and the idle task surrender control 
and take more time than pure CPU time, but it's a start.


>
>A useful addition to the scheme might be to not only provide support 
>for accumulated cpu time, but also for current load (comparing the 
>running times of each process for the last second or so).


This can be done by some UI application using the raw information.


PS I'm trusting some Linux or Windows VM builder is busy building a new VM eh?
-- 
--
===========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
===========================================================================





More information about the Squeak-dev mailing list