User Tools

Site Tools


project:week06

Synchronization

Lecture 1

Problem: What happens if threads don't interact safely?

  • Race conditions

Problem: How can threads be made to interact safely?

  • Critical sections
  • synchronized keyword
  • wait and notify(All) methods

Examples

  • Incorrect threaded sum of shared variable
  • Logic Simulator with wait/notify
  • Producer/Consumer

Lecture 2

Problem: What happens if safety of thread interaction is not managed well?

  • Deadlock
  • Sequential execution
  • Starvation
  • Priority inversion

Examples

  • Contrived deadlock example
  • Dining Philosophers

Lab

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