1 DEFINITION MODULE Processes;
4 From: "Programming in Modula-2", 3rd, corrected edition, by N. Wirth
5 Version: $Id: Processes.def,v 1.4 1994/06/24 12:49:15 ceriel Exp $
8 As discussed in "Unfair Process Scheduling in Modula-2", by
9 D. Hemmendinger, SIGplan Notices Volume 23 nr 3, march 1988,
10 the scheduler in this module is unfair, in that in some circumstances
11 ready-to-run processes never get a turn.
16 PROCEDURE StartProcess(P: PROC; n: CARDINAL);
17 (* Start a concurrent process with program "P" and workspace of
21 PROCEDURE SEND(VAR s: SIGNAL);
22 (* One process waiting for "s" is resumed
25 PROCEDURE WAIT(VAR s: SIGNAL);
26 (* Wait for some other process to send "s"
29 PROCEDURE Awaited(s: SIGNAL): BOOLEAN;
30 (* Return TRUE if at least one process is waiting for sinal "s".
33 PROCEDURE Init(VAR s: SIGNAL);
34 (* Compulsory initialization