|
Send(message, pid)
|
pid(32-bit): pid of receiver process |
|
message(32-byte): flag + access right +
... + segment addr + segment length
|
flag: whether the segment is given
in this message or not |
|
access right: access right to the
segment |
|
segment: a part of address space
of sender which sender wants receiver to access |
|
|
sender blocks until reply message is
returned |
|
reply message overwrites the original
message area |
|
receiver may read from or write to the
segment given in the message: see MoveTo, MoveFrom, and
ReplyWithSegment |
|
|
pid = Receive(message)
|
blocks calling process until a message
is received |
|
pid = pid of sender |
|
|
(pid, nbytes) =
ReceiveWithSegment(msg,
buf, len)
|
same as Receive |
|
copy: buf[0 ~ len] <- msg's segment,
if a segment is in msg |
|
nbytes = actual number of bytes copied |
|
This primitive is
introduced to reduce the number of messages |
|
|
Reply(message, pid)
|
message: reply message |
|
non-blocking operation |
|
|
ReplyWithSegment(message, pid, destptr, segptr,
segsize)
|
send message to pid |
|
copy: destptr <- segptr[0 ~ segsize]
|
destptr: original sender's address
space |
|
|
|
MoveFrom(srcpid, dest, src, count)
|
copy: dest <- src[0 ~ count]
|
src: address space of srcpid |
|
dest: address space of calling
process |
|
srcpid must have given read access
for src to this process using 'Send' |
|
|
|
MoveTo(destpid, dest, src, count)
|
copy: dest <- src[0 ~ count]
|
src: address space of calling
process |
|
dest: address space of destpid |
|
destpid must have given write
access for dest to this process using 'Send' |
|
|
|
SetPid(logicalid, pid, scope)
|
associate pid with logicalid in the
scope |
|
logicalid: for example, 'fileserver', 'nameserver',
etc. |
|
scope: local, remote, or both |
|
|
pid = GetPid(logicalid, scope)
|
return pid which is associated with the
given logicalid in the scope |
|