World's most popular travel blog for travel bloggers.

[Solved]: Is an Event Counter essentially an integer version of Barrier?

, , No Comments
Problem Detail: 

Just like there exists binary and integer Semaphores, does the Event Counter play an integer version of a Barrier?

Event Counters are described in the paper

Reed, DP; Kanodia, RK: Synchronization with eventcounts and sequencers. Commun. ACM 22(2):115-123, 1979,

There is an online versions of the paper here.

Asked By : Iancovici

Answered By : Iancovici

An event counter can function like a barrier when a set of threads all use the same value to await. For example, 3 threads can perform an await operation on the Event-Counter EC, using the same value. Then await(EC, common_val), and then threads each will block until the EC is advanced to the common value to synchronize with one another.

However, Event Counter along with Sequencers can be used in many other ways as well, while barrier primitives have only this one type of behavior, used only to allow a set of threads to move through multiple steps. Event Counter along with a Sequencer can also make up a semaphore.

Best Answer from StackOverflow

Question Source :

3.2K people like this

 Download Related Notes/Documents


Post a Comment

Let us know your responses and feedback