On 30/04/17 17:01, Ben Coman wrote:
> 
> 
> On Sun, Apr 30, 2017 at 10:11 PM, <raffaello.giulie...@lifeware.ch
> <mailto:raffaello.giulie...@lifeware.ch>> wrote:
> 
>     Hi,
> 
>     I can't find a description on how ProcessorScheduler in Pharo (i.e.,
>     Cog) is supposed to do context switches in absence of other
>     synchronization points.
> 
>     Is it following the BlueBook spec? Just to recall that model, the VM,
>     when about to execute the current bytecode instruction of the current
>     Process, checks whether a strictly higher priority Process is ready to
>     run and if so, switches to (one of) the highest priority among them.
> 
>     Thanks in advance for clarifications.
> 
> 
> This topic is probably a bit advanced pharo-users list.
> You'll likely get better answers in vm-dev list of pharo-dev list.
> Can you post any follow ups there?
> 
> ProcessScheduler doesn't have much to do with context switching,
> except providing the #yield primitive for a user to invoke manually.
> As you noted, the actual context switching happens in the VM.  
> 
> The charts here [1] might be useful to get an overview of the execution
> loop.
> Keep in mind though Its a very rough view of a novice exploring the Cog
> execution engine
> and may not be entirely accurate.  But it will give you a starting point.
>   
> For another example, look at
> CoInterpreterPrimitives>>primitiveEnterCriticalSection
> in VMMaker (http://source.squeak.org/VMMaker).  
> 
> cheers -ben

Hi Ben,

of course, I can post the question on the pharo-dev mailing list and
certainly will if nobody on this one can answer my question.

However, Process is a Pharo user level class, not something private to
the implementation of the vm. Any programmer should know what to expect
and what to not expect when different Processes are started, and how
they behave and interact. It's part of the general knowledge of the
Smalltalk programming model, on par with Object, Class and Behavior.

So, before I switch to the pharo-dev list, let's wait and see...

BTW, it seems that reference [1], containing the charts you mention,
could not find its way in your reply. Can you please make it available?

Greetings
Raffaelo

Reply via email to