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

 
week6.txt · Last modified: 2007/11/19 02:11 by bwittman
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki