upc code for bakery algorithm
three mechnisms to contrl the underlying memory consistency model