[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: GH replacement proposal (includes a bit of Unicode)

From: Andreas Rottmann
Subject: Re: GH replacement proposal (includes a bit of Unicode)
Date: Tue, 18 May 2004 11:21:03 +0200
User-agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux)

Marius Vollmer <address@hidden> writes:

> Andreas Rottmann <address@hidden> writes:
>> Marius Vollmer <address@hidden> writes:
>>> Having a lock for every object would have a high overhead and give you
>>> very little in terms of performance, I guess.  Also, they would be
>>> tricky to use.
>> Why would the overhead be significantly larger than for one object?
>> Pika will have per-object locks, and I think the implementation chosen
>> has little overhead over global locking.
> Ahh, I don't know about that implementation.  How large is the
> overhead? (in bits/object, say.  URL perfectly OK.)
There is no overhead in bits/object. The locks are allocated
dynamically for each object when requested and released again

>>> When you need to lock two objects, there would be the danger of
>>> deadlocks, when other code needs to lock the exact same two objects,
>>> but does it in reverse order.
>> You could probably solve this by having an poeration that does an
>> "atomic" lock of serveral objects. Naive algorithm:
>> 1) lock all objects you can
>> 2) if that's all:
>>      fine
>>    else:
>>      release all objects locked previously, wait a bit and goto 1)
> Yes, but I would count this as 'significant overhead' ;-)
I assume the case 2) whould be hit seldomly...

Andreas Rottmann         | address@hidden      | address@hidden | address@hidden      | GnuPG Key:
Fingerprint              | DFB4 4EB4 78A4 5EEE 6219  F228 F92F CFC5 01FD 5B62

Any technology not indistinguishable from magic is insufficiently advanced.
   -- Terry Pratchett

reply via email to

[Prev in Thread] Current Thread [Next in Thread]