[Openmcl-devel] native threads

Shannon Spires svs at bearlanding.com
Fri Jan 5 11:21:31 PST 2024


David-

See the documentation for #'initialize-multiprocessing in LW. Normally 
it's always running in the LW IDE, but when you create a command-line 
version of LW you have to turn it on explicitly after the image starts. 
Also, as the documentation states "You cannot save a LispWorks image 
with multiprocessing running" (which I find kind of annoying given that 
CCL has no such restriction).

So it's not so much a function you're likely to use in an application as 
a control you'd use when creating an image or when starting up an image 
(again, outside of the IDE, where multiprocessing is always running).

I probably should have been more precise and talked about "single 
threads vs. multiple threads" rather than SMP per se because Lispworks 
always uses SMP when it's using multiple threads (in versions after 
5.1). My point was that it's difficult to configure CCL to use only a 
single thread. It can be done but it's not part of a user-level API the 
way it is in Lispworks, and in Lispworks you have to turn it off in 
order to save an image. (More precisely still, in order to save an image 
you have to run the command-line version of Lispworks with a special 
build script; it can't be done from within the IDE.)

-SS



On 1/5/24 11:54 AM, David McClain wrote:
> Hi Shannon,
>
>> Threads in CCL since version 0.14 (which was a long time ago) are native and thus preemptively scheduled by the operating system. Unlike in Allegro CL and Lispworks, SMP cannot easily be turned off in CCL: It's always on. And there is no "CCL scheduler”.
> I’d like to better understand your statement about “turning off SMP”. I didn’t think that was up to an application program, but was “wired” into the system by the underlying OS. I’m unaware of how to turn off SMP from within Lispworks.
>
> Can you elucidate?
>
>
>
>
>



More information about the Openmcl-devel mailing list