Re: [sv-bc] Opinions on semaphores and suspend operations

From: Steven Sharp <sharp@cadence.com>
Date: Mon Jul 19 2010 - 18:05:13 PDT

OK, I found the other discussion that I was remembering. There were a
couple of differences from what I remembered. One of them is that I did
not initiate it. I thought that I did, because I had run into the issue
before Jamie brought it up. The other is that it focused on whether a
get(1) could bypass a waiting get(2) when there was 1 key available,
and try_get() was only mentioned in passing. See

http://www.eda-stds.org/sv-ec/hm/2651.html

But most of the discussion seemed to be assuming that the single key was
not taken by the get(2), and was still available for the get(1). The
only question was whether the get(1) could bypass the queue and take it.
If the get(2) was considered to be holding the single key already, then
it would not be available. The issue of bypassing the queue would not
come up (unless you wanted to allow races where the get(1) could grab the
key only if a put happened at the same time as the get(1), and the get(1)
happened to execute before the process at the front of the queue grabbed
it).

Overall, the viewpoint seemed to be that the keys were not taken until
the entire request could be granted. That would eliminate option 1 in
the suspend situation, since no partial requests would be held.

Steven Sharp | Architect | Cadence

P: 508.459.1436 M: 774.535.4149 www.cadence.com

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
Received on Mon Jul 19 18:05:41 2010

This archive was generated by hypermail 2.1.8 : Mon Jul 19 2010 - 18:08:21 PDT