Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Oct 2000 10:09:04 -0800
From:      Cedric Berger <cedric@wireless-networks.com>
To:        Robert Watson <rwatson@FreeBSD.org>
Cc:        freebsd-smp@FreeBSD.org
Subject:   Re: Reference count invariants in a fine-grained threaded environment
Message-ID:  <39FF0AC0.86A3A950@wireless-networks.com>
References:  <Pine.NEB.3.96L.1001031123647.58688x-100000@fledge.watson.org>

next in thread | previous in thread | raw e-mail | index | archive | help


Robert Watson wrote:
> 
[...]
> 
> Rules for interactions between mutexes and reference-counted kernel
> objects:
> 
> Assumptions:
> 
> - Objects with reference counts have a mutex that can protect their
>   reference count, and possibly other variables (or other instances).  For
>   example, struct cred might have a mutex per instance, but all struct
>   prison's might use the same mutex.
> 

Is there not a cheaper way to manage reference count then using mutexes?
I would guess that all architectures must have hardware support (i.e. special
assembly instruction) to atomically increment/decrement+read a 32-bit value
in a multiprocessor environment

Cedric


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-smp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?39FF0AC0.86A3A950>