Hi Everyone, I'm trying to get a better grip on process scheduling in Pharo but don't understand the behaviour I'm seeing. My understanding is that the VM (which does the real work of scheduling the processes) is a pre-emptive co-operative model, meaning: - Higher priority processes are always scheduled ahead of lower priority processes. - Processes at the same priority get the CPU until something is done to explicitly stop processing, e.g.: -- terminate the process, wait on semaphore (I/O, timer, mutex, etc.), #yield the processor But given the following: | p x a index | p := 35. a := Array new: 20. index := 1. [ 1 to: 10 do: [ :i | [ a at: index put: i. index := index + 1. x := 0. 300000000 timesRepeat: [ x := x + 1 ]. a at: index put: i. index := index + 1. ] forkAt: p named: 'Proc', i asString ]. ] forkAt: p+1. a. The code above was written to be as simple as possible (it isn't going to be creating streams, have semaphores etc. called somewhere deep within). The 300000000 number was manually determined as something that will run for a few seconds on my laptop. Since the forking process is higher priority than the 10 worker processes, I expect that all 10 processes will be created before the first gets any CPU, and they will then be executed in order (since there is nothing obvious to cause a context switch), and the results to be: #(1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 10) But it appears that each process gets some time as soon as it is forked despite being a lower priority than the forking process, and then the order becomes non-deterministic: #(1 2 3 4 5 6 7 8 9 10 7 10 9 1 2 3 4 5 6 8) #(1 2 3 4 5 6 7 8 9 10 5 9 2 10 4 7 1 6 3 8) #(1 2 3 4 5 6 7 8 9 10 6 1 8 9 3 4 7 10 5 2) Changing p := 45 (so it is higher priority than the morphic UI process) doesn't have any effect. Can someone explain what I'm missing in my understanding? Thanks! Alistair