Alternative Thread Schedulers

tim Rowledge tim at rowledge.org
Tue May 29 20:48:07 UTC 2007


On 29-May-07, at 11:28 AM, J J wrote:

>
> The question I had was, in the example it says the high priority  
> process can use Delay's to sleep while other processes are running,  
> but what happens when a process does IO?  Doesn't that cause the  
> process to yield?
Not as such, no. *IF* you implement the io in such a way that it can  
be non-blocking (see the somewhat mouldy AsynchFile class for an  
example) then you would indeed make the relevant thread/Process yield  
by way of waiting on a semaphore.
>
> What I am thinking is, if I were to make a scheduler process that  
> manages all running processes

I think you'll find that ProcessScheduler already does this.

> , how can he find out every situation where a process yields in  
> some way?  It would be ideal if there was a Delay  
> millisecondsOrUntilInterupt: type message.
Look in the MessageName browser for messages contaiing 'wait'.  
There's a gazillion.

tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
Strange OpCodes: CPM: Change Programmer's Mind





More information about the Squeak-dev mailing list