ProcessorScheduler.st
changeset 23284 06a743e0dfb4
parent 23282 bdabd1ea7979
child 23571 4aa9bc1a2076
equal deleted inserted replaced
23283:40916dbddcab 23284:06a743e0dfb4
   987     currentPriority := SchedulingPriority.
   987     currentPriority := SchedulingPriority.
   988     p := Process basicNew.
   988     p := Process basicNew.
   989     p
   989     p
   990         setId:0 state:#run;
   990         setId:0 state:#run;
   991         setPriority:currentPriority;
   991         setPriority:currentPriority;
   992         name:'Smalltalk: scheduler';
   992         name:'System: scheduler';
   993         beSystemProcess.
   993         beSystemProcess.
   994 
   994 
   995     scheduler := activeProcess := p.
   995     scheduler := activeProcess := p.
   996     activeProcessId := 0.
   996     activeProcessId := 0.
   997 
   997 
  1006         timerInterruptHandler:self;
  1006         timerInterruptHandler:self;
  1007         childSignalInterruptHandler:self.
  1007         childSignalInterruptHandler:self.
  1008 
  1008 
  1009     "Modified: / 07-01-1997 / 16:48:26 / stefan"
  1009     "Modified: / 07-01-1997 / 16:48:26 / stefan"
  1010     "Modified: / 04-02-1999 / 13:08:39 / cg"
  1010     "Modified: / 04-02-1999 / 13:08:39 / cg"
  1011     "Modified: / 15-08-2018 / 14:45:10 / Claus Gittinger"
  1011     "Modified: / 15-08-2018 / 15:03:50 / Claus Gittinger"
  1012 !
  1012 !
  1013 
  1013 
  1014 reinitialize
  1014 reinitialize
  1015     "all previous processes (except those marked as restartable) are made dead
  1015     "all previous processes (except those marked as restartable) are made dead
  1016      - each object should reinstall its process(s) upon restart;
  1016      - each object should reinstall its process(s) upon restart;
  2375             'Processor [info]: timeslicer finished' infoPrintCR.
  2375             'Processor [info]: timeslicer finished' infoPrintCR.
  2376         ]
  2376         ]
  2377     ] newProcess.
  2377     ] newProcess.
  2378     timeSliceProcess
  2378     timeSliceProcess
  2379         priority:HighestPriority;
  2379         priority:HighestPriority;
  2380         name:'Smalltalk: time slicer';
  2380         name:'System: time slicer';
  2381         restartable:true;
  2381         restartable:true;
  2382         beSystemProcess;
  2382         beSystemProcess;
  2383         resume.
  2383         resume.
  2384 
  2384 
  2385     "
  2385     "
  2387      Processor startTimeSlicing.
  2387      Processor startTimeSlicing.
  2388     "
  2388     "
  2389 
  2389 
  2390     "Created: / 17-01-1997 / 16:42:02 / cg"
  2390     "Created: / 17-01-1997 / 16:42:02 / cg"
  2391     "Modified: / 03-11-2011 / 21:21:10 / cg"
  2391     "Modified: / 03-11-2011 / 21:21:10 / cg"
  2392     "Modified: / 15-08-2018 / 14:46:05 / Claus Gittinger"
  2392     "Modified: / 15-08-2018 / 15:03:45 / Claus Gittinger"
  2393 !
  2393 !
  2394 
  2394 
  2395 stopTimeSlicing
  2395 stopTimeSlicing
  2396     "stop preemptive scheduling (timeSlicing)"
  2396     "stop preemptive scheduling (timeSlicing)"
  2397 
  2397 
  3439                     ].
  3439                     ].
  3440                 ] newProcess.
  3440                 ] newProcess.
  3441 
  3441 
  3442         timeoutHandlerProcess
  3442         timeoutHandlerProcess
  3443             priority:TimingPriority;
  3443             priority:TimingPriority;
  3444             name:'Smalltalk: timeout handler';
  3444             name:'System: timeout handler';
  3445             beSystemProcess;
  3445             beSystemProcess;
  3446             resume.
  3446             resume.
  3447     ].
  3447     ].
  3448     ^ timeoutHandlerProcess.
  3448     ^ timeoutHandlerProcess.
  3449 
  3449 
  3450     "Modified: / 20-07-2006 / 09:52:27 / cg"
  3450     "Modified: / 20-07-2006 / 09:52:27 / cg"
  3451     "Modified: / 15-08-2018 / 14:46:39 / Claus Gittinger"
  3451     "Modified: / 15-08-2018 / 15:03:40 / Claus Gittinger"
  3452 !
  3452 !
  3453 
  3453 
  3454 timeoutHandlerProcessLoop
  3454 timeoutHandlerProcessLoop
  3455     "The timeoutHandlerProcess does nothing but wait.
  3455     "The timeoutHandlerProcess does nothing but wait.
  3456      It exists only, so that timeout blocks may be executed in its context
  3456      It exists only, so that timeout blocks may be executed in its context