Basic HTML version of Foils prepared May 19 99

Foil 18 Safety

From Elements of Concurrent Programming in Java Tango Group Internal Technology Seminars -- Spring 99. by Lukasz Beca


Nothing bad ever happens
Causes of safety problems
  • read/write conflicts: access by clients to illegal transient state values
  • write/write conflicts: inconsistent assignment to variables by concurrently executing update methods
Safe objects
  • Immutable objects - avoid state changes (example: String class)
  • Fully synchronized objects - dynamically ensure exclusive access
  • Contained objects - structurally ensure exclusive access, only one thread at a time can access an object



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed May 19 1999