diff --git a/bibliography.bib b/bibliography.bib index e69de29..d9315c7 100644 --- a/bibliography.bib +++ b/bibliography.bib @@ -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} +} diff --git a/cost-models.tex b/cost-models.tex index f3e8a77..f2a7679 100644 --- a/cost-models.tex +++ b/cost-models.tex @@ -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 diff --git a/preample.tex b/preample.tex index b6113f4..356fafb 100644 --- a/preample.tex +++ b/preample.tex @@ -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} @@ -54,5 +50,5 @@ %%% Local Variables: %%% mode: latex -%%% TeX-master: "notes" +%%% TeX-master: "dpp-notes" %%% End: