Skip to content

Commit

Permalink
A bit more work.
Browse files Browse the repository at this point in the history
  • Loading branch information
athas committed Nov 17, 2024
1 parent fc62524 commit fb9af5e
Show file tree
Hide file tree
Showing 3 changed files with 57 additions and 9 deletions.
18 changes: 18 additions & 0 deletions bibliography.bib
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
@article{10.1145/321812.321815,
author = {Brent, Richard P.},
title = {The Parallel Evaluation of General Arithmetic Expressions},
year = {1974},
issue_date = {April 1974},
publisher = {Association for Computing Machinery},
address = {New York, NY, USA},
volume = {21},
number = {2},
issn = {0004-5411},
url = {https://doi.org/10.1145/321812.321815},
doi = {10.1145/321812.321815},
abstract = {It is shown that arithmetic expressions with n ≥ 1 variables and constants; operations of addition, multiplication, and division; and any depth of parenthesis nesting can be evaluated in time 4 log2n + 10(n - 1)/p using p ≥ 1 processors which can independently perform arithmetic operations in unit time. This bound is within a constant factor of the best possible. A sharper result is given for expressions without the division operation, and the question of numerical stability is discussed.},
journal = {J. ACM},
month = apr,
pages = {201–206},
numpages = {6}
}
40 changes: 37 additions & 3 deletions cost-models.tex
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,48 @@ \chapter{Cost Models}
\end{definition}

\begin{definition}[Work]
The total amount of steps in an execution.
A cost measure denoting the total amount of steps in an execution.
\end{definition}

\begin{definition}[Span/depth]
The length of the longest sequential dependency chain in an
execution.
A cost measure denoting the length of the longest sequential
dependency chain in an execution.
\end{definition}

On an infinitely parallel computer, the span of a program is the
number of sequential steps needed to execute the program. Since
infinitely parallel computers are somewhat unlikely, we must wonder
whether the span makes sense on our tragically finite computer. The
answer is \emph{yes}: we can simulate an infinitely parallel computer
on a finitely parallel computer with overhead proportional to the
amount of ``missing'' parallelism. The theoretical justification for
this is \emph{Brent's Theorem}~\cite{10.1145/321812.321815}.

\begin{theorem}[Brent's Theorem]
Writing $T_{i}$ for the time taken to execute a program on $i$
processors,
\[
\frac{T_{1}}{p} \leq T_{p} \leq T_{\infty} + \frac{T_{1}-T_{\infty}}{p}
\]
where $p$ is the number of available processors.

% \begin{proof}
% At level $j$ of the computation DAG there are $M_{j}$ independent
% operations, which can clearly be executed by $p$ processors in
% time
% \[
% \Bigl\lceil{\frac{M_{j}}{p}}\Bigr\rceil
% \]
% Now we have
% \begin{align*}
% \frac{T_{1}}{p} &= \frac{\sum _{j} {M_{j}}}{p} & \text{(By definition)} \\
% & \leq \sum _{j} \Bigl\lceil{\frac{M_{j}}{p}}\Bigr\rceil \\
% & \leq \sum _{j} \Bigl\lceil{M_{j}}\Bigr\rceil
% \end{align*}
% \end{proof}

\end{theorem}


%%% Local Variables:
%%% mode: LaTeX
Expand Down
8 changes: 2 additions & 6 deletions preample.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@

\usepackage[utf8]{inputenc}

\usepackage{ntheorem}
\usepackage{amsmath}[ntheorem]
\usepackage{mathtools}
\usepackage{amsfonts}
\usepackage{amsthm,amsmath,amssymb,amsfonts}
\usepackage{thmtools}

\input{notation.tex}

\usepackage[table]{xcolor}
Expand Down Expand Up @@ -54,5 +50,5 @@

%%% Local Variables:
%%% mode: latex
%%% TeX-master: "notes"
%%% TeX-master: "dpp-notes"
%%% End:

0 comments on commit fb9af5e

Please sign in to comment.