Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.programming.threads > #4043

Re: Detecting mutexes owned by dead processes

From Kaz Kylheku <217-679-0842@kylheku.com>
Newsgroups comp.programming.threads
Subject Re: Detecting mutexes owned by dead processes
Date 2018-02-02 23:47 +0000
Organization Aioe.org NNTP Server
Message-ID <20180202152326.514@kylheku.com> (permalink)
References <57vcfv$s6v@stratus.skypoint.net> <8aa2d575-75b9-4bbd-aa75-4dc9605931d2@googlegroups.com>

Show all headers | View raw


On 2018-02-02, gee.akyol@gmail.com <gee.akyol@gmail.com> wrote:
>
> I have my own lock solution which solves this problem but with some extra
> work and ONLY for write locking.

I think even POSIX doesn't solve this problem for read-write locks;
the whole "EOWNERDEAD" error check is only specified for mutexes.

This is as good a reason to avoid read-write locks as any, and implement
some sort of process-distributed RCU-like mechanism instead
(in which any necessary locks are process-shared robust mutexes).

The problem then probably reduces to just detecting when there are
processes that died while in a RCU read-side critical section, which
seems simpler due to being batched inside the "synchronize_rcu"
operation rather than tied to a lock. You need just one global table of
processes that are in a read-side or something like that.

RCU means that you need data structures that can be traversed by readers
even while updated; not an easy retrofit for all read-write lock
situations.

Back to comp.programming.threads | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Detecting mutexes owned by dead processes gee.akyol@gmail.com - 2018-02-02 13:16 -0800
  Re: Detecting mutexes owned by dead processes Kaz Kylheku <217-679-0842@kylheku.com> - 2018-02-02 23:47 +0000
  Re: Detecting mutexes owned by dead processes Steve Watt <steve.removethis@Watt.COM> - 2018-02-06 00:23 +0000

csiph-web