From: Randolph Chung <randolph@tausq.org>
To: Carlos O'Donell <carlos@systemhalted.org>
Cc: parisc-linux@lists.parisc-linux.org
Subject: Re: [parisc-linux] [RFC] Alternative implementation of glibc spinlocks
Date: Mon, 04 Jul 2005 09:59:14 +0800 [thread overview]
Message-ID: <42C897F2.80307@tausq.org> (raw)
In-Reply-To: <20050704010044.GA5269@systemhalted.org>
> a) Lock serializing (essentially lock copying)
I still think "lock copying" is a fundamentally flawed idea, but I think
we can actually support this in a sneaky way.
All you need to serialize is the state of the lock, either it's locked
or not.
We could design the cookie to store this information in the least
significant bit. When somebody tries to access a cookie that doesn't
correspond to an existant lock, we can materialize the lock at that point.
A bigger problem as we discussed on IRC is how to handle locks in shared
memory.
I suppose we could use an extension of the above trick. If a lock is
initialized shared (by setting pshared=true in pthread_spin_init), the
cookie will have a bit to indicate this, and the lock memory is
initialized in a shared memory segment with a well known name. If
another process comes along and gets ahold of such a lock, it would then
attach to the shared memory segment and then get access to the same lock
object in memory.
“Any software problem can be solved by adding another layer of
indirection” -SMB
:-)
randolph
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next prev parent reply other threads:[~2005-07-04 1:59 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-02 13:59 [parisc-linux] [RFC] Alternative implementation of glibc spinlocks Randolph Chung
[not found] ` <200507020935.42389.mszick@morethan.org>
2005-07-02 15:23 ` Randolph Chung
2005-07-04 1:00 ` Carlos O'Donell
2005-07-04 1:59 ` Randolph Chung [this message]
2005-07-04 4:14 ` Carlos O'Donell
2005-07-04 5:49 ` Randolph Chung
2005-07-04 14:54 ` Carlos O'Donell
2005-07-04 15:35 ` John David Anglin
2005-07-05 1:39 ` Randolph Chung
2005-07-05 5:14 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=42C897F2.80307@tausq.org \
--to=randolph@tausq.org \
--cc=carlos@systemhalted.org \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.