[Openmcl-devel] Named Processes

Gary Byers gb at clozure.com
Tue Nov 19 18:32:04 UTC 2002



On Tue, 19 Nov 2002, Marco Antoniotti wrote:

>
> Hi
>
> I am trying to port some code from LW to OpenMCL.  I have to deal with
> processes.  Please bear with me, while I bug you with questions (after
> all there isn't much dos to rely on).
>
> It looks like the signature of MAKE-PROCESS is
>
>    MAKE-PROCESS function
>       &key
>       simple-p flavor stack-group
>       warm-boot-action quantum priority run-reasons arrest reasons stack
>       size vstack size tstack size background-p
>

MAKE-PROCESS's first (required) argument is "name" : a string used
to identify the process.

There are basically two ways to create a process:

a1) Call MAKE-PROCESS with a "name" argument (and ignore the other
keyword arguments for a moment).

a2) "Preset" the newly-created process (give it an initial function
and arguments) via the function PROCESS-PRESET.

a3) Enable the process by removing its "arrest reasons".

or

b) use PROCESS-RUN-FUNCTION, which basically does the above 3 things
in a single operation.

> Fisrt of all.  How do I use PROCESS-NAME on an object returned by a
> call to MAKE-PROCESS?
>

If P is a process, (PROCESS-NAME P) returns the name it was given
when it was created (by either MAKE-PROCESS or PROCESS-RUN-FUNCTION.)

> Secondly.  What is the meaning of all the keyword arguments?

Several of them are ignored (or so obscure that they might as well
be.)

:STACK-SIZE, :VSTACK-SIZE, and :TSTACK size can be used to specify
... the sizes of the stacks used by the resulting process.

:QUANTUM indicates the number of "ticks" (time units) that a process
is allowed to run without being preempted by the scheduler.

:PRIORITY is a small signed integer, with 0 being the default/normal
value.  The scheduler always chooses the highest priority active process
that's ready to run.

A process can have 0 or more "run reasons" and 0 or more "arrest reasons";
these are just arbitrary tokens (typically just keywords.)  A process
that has at least one "run reason" and no "arrest reasons" is active
(can be scheduled).

A process has a "whostate", which is just a string that's supposed to
tell interactive utilities something about what the process is doing.
(Responding to :PROC typed at listener prompt is about the closest
thing OpenMCL has to an "interactive utility.")

A process can (fairly efficiently) wait until some condition becomes
true by calling PROCESS-WAIT; an active process is ready to run when
it either has no current wait function or its wait function returns true.

Some of this is likely to change in the near future (as OpenMCL move
to "native threads".)

>
> Cheers
>
> --
> Marco Antoniotti ========================================================
> NYU Courant Bioinformatics Group        tel. +1 - 212 - 998 3488
> 715 Broadway 10th Floor                 fax  +1 - 212 - 995 4122
> New York, NY 10003, USA                 http://bioinformatics.cat.nyu.edu
>                     "Hello New York! We'll do what we can!"
>                            Bill Murray in `Ghostbusters'.
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel
>
>


_______________________________________________
Openmcl-devel mailing list
Openmcl-devel at clozure.com
http://clozure.com/cgi-bin/mailman/listinfo/openmcl-devel



More information about the Openmcl-devel mailing list