countingSemaphore and read/write lock

Q: Logically, reentrant read-write locks (available in java, boost,objectSpace …) can be achieved using counting semaphores — in theory. How about practically?
%%A: I feel you can implement it using condVar without countingSema.

Q2: I guess counting semaphore uses inter-thread signals. This is either the conditionVar OR the low-level signaling construct described in the post on [[mutex^condVar^countingSemaphore — big 3 synchronization devices]]

%%A2: I feel in some cases it could be the condVar. CountingSema are sometimes written by library-USERS, who must use library utilities.Those low-level signals by definition aren’t exposed to library-USERS.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s