This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: basic_string::release and thread safety: what about


On Tue, 6 Jul 99 16:51:52 PDT, you wrote:

>
>> This "atomic" operations should also guarantee cache consistency between all
>> the CPUs in the system, so if you ask me (am I humble or what? :-) I'd rather
>> go with the approach taken by the SGI folks - have things shared as little as
>> possible.
>
>The atomic operations in question (hardware test-and-set instructions and
>the like) have that property (cache consistency).  People need such
>primitives to build locks and critical regions.

The only problem is that all too often maintaining cache concistency is
way too expensive.

>I'm not willing to pay 10x or more speed penalties on uniprocessor,
>non-threaded code myself.

But of course. That's why on MT-capable systems run-time (NB!)
environment usually takes good care not to waste resources on
unnecessary things.


Dima


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]