Squeak does not do pre-emptive multitasking.

Boris Gaertner Boris.Gaertner at gmx.net
Sun Jun 11 10:13:38 UTC 2006


"Michael van der Gulik" <squeakml at gulik.co.nz> wrote:
> I'm poking around the code now. I guess I'll have to go to the VM code 
> to work out the finer details. Observations so far:
> 
> - Process has a badly named instance variable - "myList".
For a process that is ready to become the active process, this
variable references a LinkedList. For a process that waits
on a Semaphore, this variable references the semaphore
(note that a Semaphore is a subclass of LinkedList, it
stores a counter of excess signals and a queue of weaiting
processes.) For a process that is neither ready to be continued
not waiting on a Seaphore, this variable is nil.

> - The "event tickler" process (EventSensor>>eventTickler) is probably a 
> good place for some process scheduling seeing that it runs periodically 
> (currently every 500ms, but that'd need to be 50ms for decent 
> scheduling). I'd probably start by adding a "timeRunning" variable to 
> Process which tallies milliseconds spent running and go from there for 
> fair scheduling.
> 
> - Shouldn't the event tickler be running at a higher priority than the 
> user interupt watcher?
> 
> - Processor -> quiescentProcessLists doesn't appear to be used in the 
> same way as the blue book describes. Infact, it appears to not be used 
> at all. Where are the process lists? Does the VM not let us see them?
quiescentProcessesList is an array of 80 LinkedLists - one for each
process priority. This array stores all processes that can be made
the active process. In ProcessorScheduler I find 7 methods that
use this variable.


Greetings,
Boris



More information about the Squeak-dev mailing list