User Tools

Site Tools


project:week05

Threads

Lecture 1

Problem: How can a problem be solved with more than one computer?

  • Parallelism in the form of threads
  • Scheduled onto processors by the JVM
  • Creating threads
  • Joining threads

Note: Threads may start in the second half of the previous week.

Examples

  • Simple thread creation
  • Thread states demonstration
  • Matrix multiply
    Demonstrates speed up extremely well.

Lecture 2

Problem: How do concurrently executing threads interact?

  • Scheduling
  • sleep and yield methods
  • Nondeterminism
  • Synchronization via polling

Examples

  • Thread drawing an animation
  • Two threads printing their names to the screen
    Demonstrates non-determinism and scheduling.
  • Logic Simulator with polling

Lab

project/week05.txt · Last modified: 2010/05/11 14:50 by jtk