📄 node42.html
字号:
<html><!DOCTYPE HTML PUBLIC "-//W3O//DTD W3 HTML 2.0//EN">
<!Converted with LaTeX2HTML 95.1 (Fri Jan 20 1995) by Nikos Drakos (nikos@cbl.leeds.ac.uk), CBLU, University of Leeds >
<HEAD>
<TITLE>4.3 Performance Analysis</TITLE>
</HEAD>
<BODY>
<meta name="description" value="4.3 Performance Analysis">
<meta name="keywords" value="book">
<meta name="resource-type" value="document">
<meta name="distribution" value="global">
<P>
<BR> <HR><a href="msgs0.htm#2" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#2"><img ALIGN=MIDDLE src="asm_color_tiny.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/asm_color_tiny.gif" alt="[DBPP]"></a> <A NAME=tex2html2362 HREF="node41.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node41.html"><IMG ALIGN=MIDDLE ALT="previous" SRC="previous_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/previous_motif.gif"></A> <A NAME=tex2html2370 HREF="node43.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node43.html"><IMG ALIGN=MIDDLE ALT="next" SRC="next_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/next_motif.gif"></A> <A NAME=tex2html2368 HREF="node39.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node39.html"><IMG ALIGN=MIDDLE ALT="up" SRC="up_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/up_motif.gif"></A> <A NAME=tex2html2372 HREF="node1.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node1.html"><IMG ALIGN=MIDDLE ALT="contents" SRC="contents_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/contents_motif.gif"></A> <A NAME=tex2html2373 HREF="node133.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node133.html"><IMG ALIGN=MIDDLE ALT="index" SRC="index_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/index_motif.gif"></A> <a href="msgs0.htm#3" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#3"><img ALIGN=MIDDLE src="search_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/search_motif.gif" alt="[Search]"></a> <BR>
<B> Next:</B> <A NAME=tex2html2371 HREF="node43.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node43.html">4.4 Case Study: Convolution</A>
<B>Up:</B> <A NAME=tex2html2369 HREF="node39.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node39.html">4 Putting Components Together</A>
<B> Previous:</B> <A NAME=tex2html2363 HREF="node41.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node41.html">4.2 Modularity and Parallel Computing</A>
<BR><HR><P>
<H1><A NAME=SECTION02530000000000000000>4.3 Performance Analysis</A></H1>
<P>
<A NAME=secmodperf> </A>
<P>
<A NAME=5637> </A>
When composing components to form programs, we also need to consider
<A NAME=5638> </A>
how to compose their performance models. For example, consider a
program that combines two components <em> a</em>
and <em> b</em>
with
performance models as follows:
<P>
<P><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img741.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img741.gif"><P>
<P>
In the case of a sequential composition of <em> a</em>
and <em> b</em>
that
does not require data redistribution, a performance model for the
resulting program may sometimes be obtained simply by summing the
components of <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img742.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img742.gif"> and <IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img743.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img743.gif">:
<P>
<P><IMG BORDER=0 ALIGN=BOTTOM ALT="" SRC="img744.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/img744.gif"><P>
<P>
In practice, the performance analysis of programs constructed from
multiple modules is often complicated by the following factors.
Fortunately, these complications can be accounted for by using the
modeling techniques of Chapter <A HREF="node26.html#chapperf" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node26.html#chapperf">3</A>.
<P>
<em> Increased computation.</em> Data transfer between modules can require
computation, thereby increasing total computation costs. Less
frequently, the merging of two modules will allow us to reduce
computation costs by eliminating operations that are common to both
components.
<P>
<em> Reduced idle time.</em> Recall that idle time represents time spent
doing no useful work, either because a processor has completed its
part of a computation early or because the processor is waiting for
<A NAME=5680> </A>
data. Idle time can be reduced in concurrent compositions if
computation or communication in one module can proceed when other
modules mapped to the same processors are idle.
<P>
<em> Increased communication.</em> Composition often introduces a need for
additional communication. In sequential composition, communication
may be required to redistribute data structures at component
boundaries. In parallel composition, communication is required to
move data between modules executing on different processors.
<P>
<A NAME=5684> </A>
<em> Increased granularity.</em> Parallel composition tends to increase
computation and communication granularity within composed components,
because each executes within a subset of available processors. This effect
can improve overall performance.
<P>
<em> Load imbalances.</em> Parallel composition can increase idle time
<A NAME=5688> </A>
if the computational resources allocated to different components do
not allow the components to execute at equal rates. In this
situation, one module will complete some phase of a computation before
another and must then remain idle until the other module provides the
data required to continue execution. This is a variant of the
load-balancing problem discussed in Chapter <A HREF="node14.html#chap2" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node14.html#chap2">2</A>.
<P>
<BR> <HR><a href="msgs0.htm#2" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#2"><img ALIGN=MIDDLE src="asm_color_tiny.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/asm_color_tiny.gif" alt="[DBPP]"></a> <A NAME=tex2html2362 HREF="node41.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node41.html"><IMG ALIGN=MIDDLE ALT="previous" SRC="previous_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/previous_motif.gif"></A> <A NAME=tex2html2370 HREF="node43.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node43.html"><IMG ALIGN=MIDDLE ALT="next" SRC="next_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/next_motif.gif"></A> <A NAME=tex2html2368 HREF="node39.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node39.html"><IMG ALIGN=MIDDLE ALT="up" SRC="up_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/up_motif.gif"></A> <A NAME=tex2html2372 HREF="node1.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node1.html"><IMG ALIGN=MIDDLE ALT="contents" SRC="contents_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/contents_motif.gif"></A> <A NAME=tex2html2373 HREF="node133.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node133.html"><IMG ALIGN=MIDDLE ALT="index" SRC="index_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/index_motif.gif"></A> <a href="msgs0.htm#3" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#3"><img ALIGN=MIDDLE src="search_motif.gif" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/search_motif.gif" alt="[Search]"></a> <BR>
<B> Next:</B> <A NAME=tex2html2371 HREF="node43.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node43.html">4.4 Case Study: Convolution</A>
<B>Up:</B> <A NAME=tex2html2369 HREF="node39.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node39.html">4 Putting Components Together</A>
<B> Previous:</B> <A NAME=tex2html2363 HREF="node41.html" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/node41.html">4.2 Modularity and Parallel Computing</A>
<BR><HR><P>
<P><ADDRESS>
<I>© Copyright 1995 by <A href="msgs0.htm#6" tppabs="http://www.dit.hcmut.edu.vn/books/system/par_anl/tppmsgs/msgs0.htm#6">Ian Foster</a></I>
</ADDRESS>
</BODY>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -