Multithreaded Algorithms




CS255

Chris Pollett

Feb 11, 2019

Outline

Introduction

Going from Serial Algorithm to Parallel Algorithm

Method of Generating Functions

Dynamic Multithreaded Fibonacci

Quiz

Which of the following statements is true?

  1. Assuming people are equally like to be born any day of the year, if there were more than 50 people in a room, there would be more than a 50% chance two shared a birthday.
  2. In `n` fair coin tosses you would expect to see streaks of length `Omega((log n)^2)`.
  3. Our analysis of the online hiring problem relied heavily on facts about the geometric distribution.

Model of Multithreaded Execution

A multithreaded DAG representing the computation of P-Fib(n)

More on Multithreaded Execution

The image of the last slide shows the computation of P-Fib(4).

Performance Measures

Runtime of a Multithreaded Computation

Parallelism

Scheduling