Hi Ben,


On 01/05/17 15:23, Ben Coman wrote:
> 
> 
> I was responding to your literal question about ProcessScheduler and
> what part of the system does the context switching.
> Now I'm guessing your interest is more about user-level
> multi-threaded behaviour of Processes,
> so I hunted down some discussions you may find  be interesting
> 
> * http://forum.world.st/The-Trunk-Kernel-mt-1009-mcz-td4887889.html
>     (search for preemptionYields)
>    
> * http://forum.world.st/threading-in-Pharo-td4750534.html
> 
> * http://forum.world.st/threading-in-Pharo-td4750534.html
> 
> * http://forum.world.st/VM-Maker-VMMaker-oscog-eem-942-mcz-td4790993.html
> 
> 

Quite interesting, indeed, and very detailed.



> However I didn't quite follow where you said...  "in absence of
> other synchronization points."
> Do you mean without suspend/resuming Processes or waiting/signalling
> Semaphore
> and something else?  
> 

Yes, I mean this.



> I'm not sure if this is what your looking for, but in summary...
> Processes at the same priority are scheduled cooperatively. they must
> deliberately yield or sleep to be put at the back of their priority's
> run-queue.before another process of same priority can run.

Right, this is the part explicitly controlled by the programmer and
which is synchronous from the Process' own perspective.



Higher
> priority processes pre-empt lower priority processes only when they are
> woken (i.e. signalled or resumed). The pre-empted process stays at the
> front of its priority's run-queue so that the higher-priority-preemption
> is transparent to the same-priority-cooperative scheduling.  
>  

This is the most synthetic explanation I've seen so far! Clear and concise.


Thanks and greetings
Raffaello


Reply via email to