Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming.threads > #1026
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "aminer" <aminer@videotron.ca> |
| Newsgroups | comp.programming.threads, comp.programming |
| Subject | Re: Distributed Reader-Writer Mutex by Dmitry Vyukov |
| Date | Sat, 25 Aug 2012 19:23:11 -0500 |
| Organization | A noiseless patient Spider |
| Lines | 81 |
| Message-ID | <k1bmp5$fbb$1@dont-email.me> (permalink) |
| References | <k1bkhs$uk8$1@dont-email.me> <k1bmhr$e9n$1@dont-email.me> |
| Injection-Date | Sat, 25 Aug 2012 23:23:17 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="c43ca82f9e8d62a602307fe9d2e9b807"; logging-data="15723"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+6MBVUvQ8mEp+4KsV1mXdP" |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.00.2900.5512 |
| X-RFC2646 | Format=Flowed; Response |
| X-Newsreader | Microsoft Outlook Express 6.00.2900.5512 |
| Cancel-Lock | sha1:uCsWrslcgBb2uqbAfBaMS7xx7bk= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.programming.threads:1026 comp.programming:2106 |
Cross-posted to 2 groups.
Show key headers only | View raw
"aminer" <aminer@videotron.ca> wrote in message
news:k1bmhr$e9n$1@dont-email.me...
>
> I wrote:
>> So i think you have to use a critical section around the for loop to be
>> able to lock
>> all the rwlocks at the same time to avoid the deadlock problem..
>
>
> I mean you have to use a critical section around the for loop to be able
> to lock all the rwlocks atomicly to avoid the deadlock problem..
Sorry for my english: i mean atomically.
Thank you,
Amine Moulay Ramdne.
>
>
>
>
>
> Thank you,
> Amine Moulay Ramdane.
>
>
>
> "aminer" <aminer@videotron.ca> wrote in message
> news:k1bkhs$uk8$1@dont-email.me...
>>
>>
>> Hello all;
>>
>> I have loolked at the Distributed Reader-Writer Mutex by Dmitry Vyukov,
>> look at
>>
>> http://www.1024cores.net/home/lock-free-algorithms/reader-writer-problem/distributed-reader-writer-mutex
>>
>>
>> and i have looked at it and i think there is a problem with this method,
>> cause look
>> at the write lock function:
>>
>> int distr_rw_mutex_wrlock (distr_rw_mutex_t* mtx)
>> {
>> int i;
>> for (i = 0; i != mtx->proc_count; i += 1)
>> pthread_rwlock_wrlock(&mtx->cell[i].mtx);
>> return 0;
>> }
>>
>>
>> What is wrong with it ? suppose two or more writers wants to lock this
>> distributed rwlock
>> there is a possibility of a deadlock.
>>
>> So i think you have to use a critical section around the for loop to be
>> able to lock
>> all the rwlocks at the same time to avoid the deadlock problem..
>>
>>
>> Am i correct or not ?
>>
>>
>> Thank you,
>> Amine Moulay Ramdane.
>>
>>
>>
>>
>>
>
>
Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar
Distributed Reader-Writer Mutex by Dmitry Vyukov "aminer" <aminer@videotron.ca> - 2012-08-25 18:45 -0500
Re: Distributed Reader-Writer Mutex by Dmitry Vyukov "aminer" <aminer@videotron.ca> - 2012-08-25 19:19 -0500
Re: Distributed Reader-Writer Mutex by Dmitry Vyukov "aminer" <aminer@videotron.ca> - 2012-08-25 19:23 -0500
Re: Distributed Reader-Writer Mutex by Dmitry Vyukov Patricia Shanahan <pats@acm.org> - 2012-08-25 16:47 -0700
Re: Distributed Reader-Writer Mutex by Dmitry Vyukov "aminer" <aminer@videotron.ca> - 2012-08-25 19:56 -0500
csiph-web