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

 
week5.txt · Last modified: 2008/04/17 13:08 by bwittman
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki