Threads and Concurrency

1/21/00


Click here to start


Table of Contents

Threads and Concurrency

A First Look at Some Key Concepts

Threads

Two Threads Sharing a CPU

A Peek Inside a Running Program

A Program With Two Threads

Thread Context Switch

Context Switches: Voluntary and Involuntary

A Nachos Thread

Why Threads Are Important

Concurrency

The Dark Side of Concurrency

Example: A Concurrent Color Stack

Interleaving the Color Stack #1

Interleaving the Color Stack #2

Interleaving the Color Stack #3

Interleaving the Color Stack #4

Race Conditions Defined

Threads and Data

Author: Jeff Chase

Home Page: http://www.cs.duke.edu/~chase/cps110