Beruflich Dokumente
Kultur Dokumente
§ Communication primitives
• send(destination-process, message)
• receive(source-process, message)
§ blocking vs. non-blocking primitives
§ message passing model • a message is copied at least three times:
• communication primitives sender (user buffer -1-> kernel buffer) -2->
o blocking vs. non-blocking receiver(kernel buffer -3-> user buffer)
o synchronous vs. asynchronous • non-blocking - faster, harder to code, riskier, requires additional
o direct vs. indirect OS support
§ remote procedure calls o send - return as soon as message copied to kernel buffer
send blocks until receive executes on • Link is associated with exactly two processes
receiving computer - safer, easier, less
o Between any two processes, there exists at most one link
concurrent
o The link may be unidirectional, but is usually bidirectional
• asynchronous -multiple sends can be
executed before receives (messages
buffered) - more dangerous (what to do with § Indirect communication — communicate using mailboxes (ports)
messages to crashed receiver?), complex, (usually) owned by receiver
concurrent o send(mailbox, message)
o receive(mailbox, message)
9. Local kernel passes message(s) to client stub • Use a binding server (binder)
o Servers register / deregister their services with the binding
10. Client stub unpacks result(s) and returns them to client app.
server
o When a client calls a remote procedure for the first time, it
queries the binding server for a registered server to call