Function | Package: mp | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version

## process-allow-schedule

Arguments: &optional process

This function allows processes other than the running (and hence calling) process to run. All other processes of equal or higher priority to the calling process will have a chance to run before the calling process is next run. This function is useful when a process seems to be using all available resources. For use in an SMP Lisp, see the notes below.

Specifically, in a non-SMP lisp, process-allow-schedule makes the running process give up the rest of its scheduling quantum, immediately placing it in the ready-to-run queue behind all ready processes of equal or higher priority.

The optional process argument is ignored (in an earlier multiprocessing implementation, it specified the process to be run next). If you want a specific process to run next, you need to make sure it is the highest-priority process that is ready to run.

### process-allow-schedule and SMP

In an SMP Lisp on a machine with multiple cores, this function is less useful because multiple processes can run simultaneously. Even in an SMP lisp, there may be more Lisp processes than there are available cores. In this case process-allow-schedule calls the host OS's yield function, allowing OS to assign that core to another ready lisp thread.

Before SMP, process-allow-schedule worked on the theory that an application might have specific points in its processing cycle that were better suited to allowing another process to run than the random point selected by the quantum timeout. Points where there was a minimum of temporary data that would clog the next gc, for example, or points where a minimum number of locks were held.

In SMP, to have a successful multi-threaded app that actually uses multiple cores, these sorts of considerations need to be part of the application design. Calling process-allow-schedule in such a situation is probably benign, and may in rare cases be a help, but will not usually solve any serious problems.

See multiprocessing.htm for general information on multiprocessing in Allegro CL.

Copyright (c) 1998-2019, Franz Inc. Oakland, CA., USA. All rights reserved.
This page was not revised from the 8.2 page.
Created 2012.5.30.

|  | ToC | DocOverview | CGDoc | RelNotes | FAQ | Index | PermutedIndex
| Allegro CL version 9.0 Unrevised from 8.2 to 9.0. 8.2 version