home *** CD-ROM | disk | FTP | other *** search
- Path: fc.hp.com!news
- From: koren@hpsrk.fc.hp.com (Steve Koren)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Exec Semaphores
- Date: 11 Jan 1996 07:48:11 -0700
- Organization: HP Fort Collins Site
- Sender: koren@hpsrk.fc.hp.com
- Message-ID: <oj6rax6iy8k.fsf@hpsrk.fc.hp.com>
- References: <390.6583T950T852@wonder.ca>
- NNTP-Posting-Host: hpsrk.fc.hp.com
- In-reply-to: paulf@wonder.ca's message of 10 Jan 1996 20:53:52 GMT
- X-Newsreader: Gnus v5.0.9
-
-
- paulf@wonder.ca (paulf) wrote:
-
- > Does anyone know how the OS semaphores handle the following
- > situation:
- >
- > Lock Shared from Task 1.
- > Lock Exclusive From Task 2.
- > Lock Shared from Task 3.
- > Unlock from Task 1.
-
- > Will the OS let Task 3 into it's critical section straight away, or
- > will it stop it from entering until the exclusive lock from Task 2 is
- > serviced? The autodocs don't mention what would happen
-
- If T1 holds a shared lock when T2 requests an exclusive one, T2 will
- block until no one holds the lock. In this case, that will be after
- both T1 and T3 release the lock. (Because T1's lock does not block T3).
-
- (Well, I think so. I've never tried exactly that, but it makes sense).
-
- - steve
-