Newsgroups: comp.lang.smalltalk
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!oitnews.harvard.edu!purdue!news.bu.edu!bloom-beacon.mit.edu!news.mathworks.com!fu-berlin.de!golden-gate.owl.de!uni-paderborn.de!news.rwth-aachen.de!news.rhrz.uni-bonn.de!RRZ.Uni-Koeln.DE!news.gtn.com!osn.de!noris.net!blackbush.xlink.net!ins.net!heeg.de!hmm
From: hmm@heeg.de (Hans-Martin Mosner)
Subject: Re: Scheduling Smalltalk Processes
Message-ID: <Dwy6qA.CBH@heeg.de>
Sender: uucp@heeg.de
Organization: Georg Heeg Objektorientierte Systeme, Dortmund, FRG
X-Newsreader: TIN [version 1.2 PL2]
References: <32245A3E.4630@nortel.ca>
Date: Fri, 30 Aug 1996 11:03:45 GMT
Lines: 39

Kambiz Katani (katani@nortel.ca) wrote:
: Hello,
:  Does any body know what scheduling algorithm is used by VW Smalltalk
:  ProcessorScheduler? In the VisualWorks Object Reference it is mentioned
:  that a Smalltalk process is a "non-preemptive" light-weight process.
:  Does this mean that a high priority process can use the CPU for a long
:  period, therefore other processes can starve? Does this mean that there
:  is no time-slicing scheme used by the scheduler?

Yes. Yes. Although it is possible to add simple-minded time-slicing, there
probably are some situations where the non-preemptiveness is implicitly
requeired for things to work properly. I suppose it's getting better with
the newer developments in VisualWave and VW2.5.1.
Note that implementing high-quality fair process scheduling would be next
to impossible since the process model does not have any accounting information
which would be necessary for scheduling decisions (such as:
- did this process have a fair share of the time during the last 100 msecs?
- was this process I/O bound or CPU bound?
- Is it related to the user interface or to some background activity?

:  Another scenario: suppose we have two processes with the same priority.
:  One is running and the other is waiting in the queue. The one which is 
:  running halts due to an IO operation. Does the other process gets the
:  portion of CPU, and the running one goes back to the queue?

Yes.

I don't know where you could find a good description of the scheduling
process in VisualWorks, but I have found that with some general
knowledge about scheduling algorithms you can understand VisualWorks
scheduling by looking at the classes Process, ProcessorScheduler,
Semaphore, Signal & Exception.

Hans-Martin
--
+--- Hans-Martin Mosner -------- Senior Smalltalk Guru ---+
| These opinions are entirely ficticious.  Any similarity |
| to real opinions is purely coincidental and unintended. |
+--- <hmm@heeg.de> ------ URL:http://www.heeg.de/~hmm/ ---+
