On Mon, May 1, 2017 at 4:42 AM, <[hidden email]> wrote: On 30/04/17 17:01, 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 (search for preemptionYields) 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? 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. 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. not something private to
Whoops. -------------------- Now a follow up question of my own, for [pharo-dev]. The Process comment says "When any one of several paths of control can be advanced, the single instance of ProcessorScheduler named Processor **determines** which one will actually be advanced partly using the value of priority." Did I misunderstand how this works? I thought determination of which process next ran occurred in the VM by StackInterpreter>>wakeHighestPriority and ProcessorScheduler seems more a place to just get values associated scheduling. cheers -ben |
Free forum by Nabble | Edit this page |