Books & Videos

Table of Contents

  1. Chapter 1 Introduction

    1. Terminology: Parallelism and Concurrency

    2. Tools and Resources

    3. Sample Code

  2. Parallel Haskell

    1. Chapter 2 Basic Parallelism: The Eval Monad

      1. Lazy Evaluation and Weak Head Normal Form
      2. The Eval Monad, rpar, and rseq
      3. Example: Parallelizing a Sudoku Solver
      4. Deepseq
    2. Chapter 3 Evaluation Strategies

      1. Parameterized Strategies
      2. A Strategy for Evaluating a List in Parallel
      3. Example: The K-Means Problem
      4. GC’d Sparks and Speculative Parallelism
      5. Parallelizing Lazy Streams with parBuffer
      6. Chunking Strategies
      7. The Identity Property
    3. Chapter 4 Dataflow Parallelism: The Par Monad

      1. Example: Shortest Paths in a Graph
      2. Pipeline Parallelism
      3. Example: A Conference Timetable
      4. Example: A Parallel Type Inferencer
      5. Using Different Schedulers
      6. The Par Monad Compared to Strategies
    4. Chapter 5 Data Parallel Programming with Repa

      1. Arrays, Shapes, and Indices
      2. Operations on Arrays
      3. Example: Computing Shortest Paths
      4. Folding and Shape-Polymorphism
      5. Example: Image Rotation
      6. Summary
    5. Chapter 6 GPU Programming with Accelerate

      1. Overview
      2. Arrays and Indices
      3. Running a Simple Accelerate Computation
      4. Scalar Arrays
      5. Indexing Arrays
      6. Creating Arrays Inside Acc
      7. Zipping Two Arrays
      8. Constants
      9. Example: Shortest Paths
      10. Example: A Mandelbrot Set Generator
  3. Concurrent Haskell

    1. Chapter 7 Basic Concurrency: Threads and MVars

      1. A Simple Example: Reminders
      2. Communication: MVars
      3. MVar as a Simple Channel: A Logging Service
      4. MVar as a Container for Shared State
      5. MVar as a Building Block: Unbounded Channels
      6. Fairness
    2. Chapter 8 Overlapping Input/Output

      1. Exceptions in Haskell
      2. Error Handling with Async
      3. Merging
    3. Chapter 9 Cancellation and Timeouts

      1. Asynchronous Exceptions
      2. Masking Asynchronous Exceptions
      3. The bracket Operation
      4. Asynchronous Exception Safety for Channels
      5. Timeouts
      6. Catching Asynchronous Exceptions
      7. mask and forkIO
      8. Asynchronous Exceptions: Discussion
    4. Chapter 10 Software Transactional Memory

      1. Running Example: Managing Windows
      2. Blocking
      3. Blocking Until Something Changes
      4. Merging with STM
      5. Async Revisited
      6. Implementing Channels with STM
      7. An Alternative Channel Implementation
      8. Bounded Channels
      9. What Can We Not Do with STM?
      10. Performance
      11. Summary
    5. Chapter 11 Higher-Level Concurrency Abstractions

      1. Avoiding Thread Leakage
      2. Symmetric Concurrency Combinators
      3. Adding a Functor Instance
      4. Summary: The Async API
    6. Chapter 12 Concurrent Network Servers

      1. A Trivial Server
      2. Extending the Simple Server with State
      3. A Chat Server
    7. Chapter 13 Parallel Programming Using Threads

      1. How to Achieve Parallelism with Concurrency
      2. Example: Searching for Files
    8. Chapter 14 Distributed Programming

      1. The Distributed-Process Family of Packages
      2. Distributed Concurrency or Parallelism?
      3. A First Example: Pings
      4. Multi-Node Ping
      5. Typed Channels
      6. Handling Failure
      7. A Distributed Chat Server
      8. Exercise: A Distributed Key-Value Store
    9. Chapter 15 Debugging, Tuning, and Interfacing with Foreign Code

      1. Debugging Concurrent Programs
      2. Tuning Concurrent (and Parallel) Programs
      3. Concurrency and the Foreign Function Interface
  1. Colophon