updated hw.tex for hw6
git-svn-id: svn://anubis/gvsu@231 45c1a28c-8058-47b2-ae61-ca45b979098e
This commit is contained in:
parent
850c1d5008
commit
fb79f823d0
@ -21,10 +21,45 @@
|
||||
\noindent
|
||||
\begin{enumerate}
|
||||
\item[1.]{
|
||||
The obvious benefit of using non-blocking communication is that
|
||||
the calling process does not block while the communication is taking
|
||||
place.
|
||||
This leaves the process free to do further computation or work on
|
||||
something else.
|
||||
Another benefit of non-blocking communication is that certain types
|
||||
of deadlocks can be avoided by not having the Send function block
|
||||
until the message is received (for example, when two machines are
|
||||
both doing a send operation followed by a receive operation).
|
||||
|
||||
One challenge to using non-blocking communication is that it is
|
||||
harder to program safely.
|
||||
The programmer must take more care to ensure that data being used
|
||||
in non-blocking communication is not modified while it is being used.
|
||||
A second challenge with using non-blocking communication is that if
|
||||
synchronization is necessary (i.e. the sender wants to know when
|
||||
the message was received), then they must manually poll to obtain
|
||||
this information.
|
||||
}
|
||||
|
||||
\vskip 1em
|
||||
\item[2.]{
|
||||
Assume the mesh size is $n \times n$.
|
||||
Further assume that the node doing the scatter is located in the
|
||||
top left corner of the mesh.
|
||||
First, the total data is divided $n$ ways.
|
||||
1 of these sections are sent to the node doing the scattering,
|
||||
and $n-1$ of these are sent to the next node down.
|
||||
The nodes along the left continue sending data sections down, each
|
||||
taking one section for itself.
|
||||
Then, all of the left edges break each of these $n$ sections into
|
||||
$n$ parts, and repeat the previous process to distribute these
|
||||
$n$ subparts to the nodes to their right.
|
||||
|
||||
This method will take $2n$ steps to complete.
|
||||
The message transfer size is not fixed.
|
||||
The messages at the beginning (closer to the scattering node)
|
||||
are larger and subsequent messages get smaller and smaller as
|
||||
they get further from the scattering node.
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user