Back: ProcessEnvironment-dictionary testing Up: Base classes Forward: ProcessorScheduler class-instance creation   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document

1.132 ProcessorScheduler

Defined in namespace Smalltalk
Superclass: Object
Category: Language-Processes
I provide methods that control the execution of processes.

1.132.1 ProcessorScheduler class: instance creation  (class)
1.132.2 ProcessorScheduler: basic  (instance)
1.132.3 ProcessorScheduler: built ins  (instance)
1.132.4 ProcessorScheduler: idle tasks  (instance)
1.132.5 ProcessorScheduler: printing  (instance)
1.132.6 ProcessorScheduler: priorities  (instance)
1.132.7 ProcessorScheduler: still unclassified  (instance)
1.132.8 ProcessorScheduler: storing  (instance)
1.132.9 ProcessorScheduler: timed invocation  (instance)


1.132.1 ProcessorScheduler class: instance creation

new
Error--new instances of ProcessorScheduler should not be created.


1.132.2 ProcessorScheduler: basic

activeDebugger
Answer the active process' debugger

activePriority
Answer the active process' priority

activeProcess
Answer the active process

processEnvironment
Answer another singleton object hosting thread-local variables for the Smalltalk processes. This acts like a normal Dictionary with a couple of differences: a) using #associationAt: will return special associations that retrieve a thread-local value; b) requesting missing keys will return nil, and removing them will be a nop.

processesAt: aPriority
Answer a linked list of processes at the given priority

terminateActive
Terminate the active process

timeSlice
Answer the timeslice that is assigned to each Process before it is automatically preempted by the system (in milliseconds). An answer of zero means that preemptive multitasking is disabled. Note that the system by default is compiled without preemptive multitasking, and that even if it is enabled it will work only under BSD derivatives (or, in general, systems that support ITIMER_VIRTUAL).

timeSlice: milliSeconds
Set the timeslice that is assigned to each Process before it is automatically preempted by the system. Setting this to zero disables preemptive multitasking. Note that the system by default is compiled with preemptive multitasking disabled, and that even if it is enabled it will surely work only under BSD derivatives (or, in general, systems that support ITIMER_VIRTUAL).

yield
Let the active process yield control to other processes


1.132.3 ProcessorScheduler: built ins

disableInterrupts
Disable interrupts caused by external events while the current process is executing. Note that interrupts are disabled on a per-process basis, and that calling #disableInterrupts twice requires calling #enableInterrupts twice as well to re-enable interrupts.

enableInterrupts
Re-enable interrupts caused by external events while the current process is executing. By default, interrupts are enabled.


1.132.4 ProcessorScheduler: idle tasks

dispatchEvents
Private - Main body of the event loop.

idle
Private - Call the next idle task. Return whether GNU Smalltalk should pause until the next OS signal.

idleAdd: aBlock
Register aBlock to be executed when things are idle

initialize
Private - Start the finalization process.

pause: aBoolean
Private - Pause for some time if aBoolean is false, or until a signal if it is true.

startFinalizers
Private - Fire a low-priority process to finalize the objects

update: aSymbol
If we left some work behind when the image was saved, do it now.


1.132.5 ProcessorScheduler: printing

printOn: aStream
Store onto aStream a printed representation of the receiver


1.132.6 ProcessorScheduler: priorities

highIOPriority
Answer the priority for system high-priority I/O processes, such as a process handling input from a network.

highestPriority
Answer the highest valid priority

idlePriority
Answer the priority of idle processes.

lowIOPriority
Answer the priority for system low-priority I/O processes. Examples are the process handling input from the user (keyboard, pointing device, etc.) and the process distributing input from a network.

lowestPriority
Answer the lowest valid priority

priorityName: priority
Private - Answer a name for the given process priority

systemBackgroundPriority
Answer the priority for system background-priority processes. An incremental garbage collector could run at this level but now it runs at idlePriority instead.

timingPriority
Answer the priority for system real-time processes.

unpreemptedPriority
Answer the highest priority avilable in the system; never create a process with this priority, instead use BlockClosure>>#valueWithoutPreemption.

userBackgroundPriority
Answer the priority for user background-priority processes

userInterruptPriority
Answer the priority for user interrupt-priority processes. Processes run at this level will preempt the window scheduler and should, therefore, not consume the processor forever.

userSchedulingPriority
Answer the priority for user standard-priority processes


1.132.7 ProcessorScheduler: still unclassified

forkEventLoop
Not commented.


1.132.8 ProcessorScheduler: storing

storeOn: aStream
Store onto aStream a Smalltalk expression which evaluates to the receiver


1.132.9 ProcessorScheduler: timed invocation

isTimeoutProgrammed
Private - Answer whether there is a pending call to #signal:atMilliseconds:

signal: aSemaphore atMilliseconds: millis
Private - signal 'aSemaphore' after 'millis' milliseconds have elapsed

signal: aSemaphore onInterrupt: anIntegerSignalNumber
Signal 'aSemaphore' when the given C signal occurs.



Back: ProcessorScheduler-storing Up: ProcessorScheduler Forward: ProcessVariable   Top: GNU Smalltalk Library Reference Contents: Table of Contents Index: Class index About: About this document


This document was generated on February, 22 2012 using texi2html