Carnegie Mellon Parralel Computing Notes on Lecture 6

Senders address space buer foo into network buer

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Copy data into receiver’s address space buffer ‘bar’ Send ack RECV() returns CMU 15-418, Spring 2014 As implemented on the prior slide, if our message passing solver uses blocking send/recv it would deadlock! Why? 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 mydiff 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 buffers, 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 buffer ‘foo’ into network buffer 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 buffer RECV(bar) returns 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. Buffer provided to SEND cann...
View Full Document

Ask a homework question - tutors are online