
102
CHAPTER
2
Parallel
Programs
Table 2.2 Key Shared Address Space Primitives
Name Syntax
Function
CREATE
CREATE
(p, proc, args) Create p processes that start execut-
ing at procedure proc with
argu-
ments args
Allocate shared data of size bytes
Acquire mutually exclusive access
Release mutually exclusive access
Global synchronization among
number processes: none gets past
BARRIER
until number have arrived
Wait for number processes to
terminate
Wait for flag to be set (spin or
block); used for point-to-point event
synchronization
Set
flag;
wakes up process that is
spinning or blocked on
flag,
if any
G_MALL0C
LOCK
UNLOCK
BARRIER
WAIT_FOR_END ...