Arguments: process
This function returns the quantum for process. Each time this process runs, the scheduler (non :os-threads model) will or operating system (:os-threads model) should grant it at least this amount of time before preempting execution for another process. Currently defaults to 2, and may be set to any number greater than or equal to 0.1 and less than or equal to 20 with setf. The units are seconds.
In both process implementations, when a process starts running a timer
interrupt is sceduled to go off after the quantum (real-time)
expires. The process might block for some reason before the timer
interrupt comes in, and in that case the interrupt is canceled. There
are also reasons why the timer interrupt might be ignored for some
time after it comes in: fast code (that does not check for interrupts,
see generate-interrupt-checks-switch
), atomic
code (that explicitly ignores interrupts -- see without-interrupts, e.g.), and garbage
collection are three examples. But once the timer interrupt is
noticed, the process will quit running so other processes can get a
chance.
On :os-threads implementations, all other processes will get a chance to run. On non :os-threads implementations all processes with equal or higher priority get a chance to run.
In :os-threads implementations, a foreign call that releases the heap allows other processes to grab the heap. The process that made the call is still facing the interrupt-after-quantum, even though it may block on heap access when it returns from the foreign call.
If Lisp as a whole isn't getting many cycles, the cpu time corresponding to the real-time quantum may be pretty small, leading to virtual process thrashing.
Thus, there isn't too much we can say for sure about how much time the process will get to run before being preempted, except that for well behaved Lisp processes, it will normally be approximately equal to the process quantum.
See multiprocessing.htm for general information on multiprocessing in Allegro CL.
The documentation is described in introduction.htm and the index is in index.htm.
Copyright (c) 1998-2000, Franz Inc. Berkeley, CA., USA. All rights reserved.
Created 2000.10.5.