Unformatted text preview: Copy data into receiver’s address space buﬀer ‘bar’
CMU 15-418, Spring 2014 As implemented on the prior slide, if our message passing
solver uses blocking send/recv it would deadlock!
How can we x it?
(while still using blocking send/recv) CMU 15-418, Spring 2014 Message passing solver Send and receive ghost rows Perform computation All threads send local mydiﬀ to thread 0 Thread 0 evaluates termination predicate
sends result back to all other threads Example from: Culler, Singh, and Gupta CMU 15-418, Spring 2014 Variants of send and receive messages
Send/Recv Synchronous Asynchronous Blocking async Non-blocking async ▪ Blocking async:
- SEND: call copies data from address space into system buﬀers, then returns
- Does not guarantee message has been received (or even sent) - RECV: call returns when data copied into address space, but no ack sent Sender: Receiver: Call SEND(foo)
Copy data from sender’s address space buﬀer ‘foo’ into network buﬀer
SEND(foo) returns, calling thread continues execution
Send message Call RECV(bar) RED TEXT = executes concurrently with application thread Receive message
Copy data into receiver’s address space buﬀer
CMU 15-418, Spring 2014 Variants of send and receive messages
Send/Recv Synchronous Asynchronous Blocking async Non-blocking async ▪ Non-blocking async: (“non-blocking”)
- SEND: call returns immediately. Buﬀer provided to SEND cann...
View Full Document
This document was uploaded on 03/19/2014 for the course CMP 15-418 at Carnegie Mellon.
- Spring '14