Monday 12 March 2012

Critical Regions


  • High-level synchronization construct
  • A shared variable v of type T, is declared as:
  v: shared T
  • Variable v accessed only inside statement
  region v when B do S

where
B is a boolean expression.
  • While statement S is being executed, no other process can access variable v.
  • Regions referring to the same shared variable exclude each other in time.
  • When a process tries to execute the region statement, the Boolean expression B is evaluated.  If B is true, statement S is executed.  If it is false, the process is delayed until B becomes true and no other process is in the region associated with v.

No comments:

Post a Comment