Deutsch   English   Français   Italiano  
<vc3r7a$1eeqb$2@raubtier-asyl.eternal-september.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!news.mixmin.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!raubtier-asyl.eternal-september.org!.POSTED!not-for-mail
From: Bonita Montero <Bonita.Montero@gmail.com>
Newsgroups: comp.lang.c++
Subject: Re: counting_semaphore question
Date: Sat, 14 Sep 2024 13:15:01 +0200
Organization: A noiseless patient Spider
Lines: 24
Message-ID: <vc3r7a$1eeqb$2@raubtier-asyl.eternal-september.org>
References: <vbrqjj$3hvsd$1@dont-email.me>
 <vbs01c$3j5mc$1@raubtier-asyl.eternal-september.org>
 <vbs0tm$3jf62$1@dont-email.me>
 <vbs1al$3jgnp$1@raubtier-asyl.eternal-september.org>
 <vbsvsr$3pr1c$2@dont-email.me>
 <vbtj6c$1js1$2@raubtier-asyl.eternal-september.org>
 <vbvdib$c8gk$8@dont-email.me>
 <vc1b7l$s2bh$1@raubtier-asyl.eternal-september.org>
 <vc24no$10sij$5@dont-email.me>
 <vc2imj$13dck$2@raubtier-asyl.eternal-september.org>
 <vc3kdk$1d42p$1@dont-email.me>
 <vc3llr$1db7m$1@raubtier-asyl.eternal-september.org>
 <vc3q8h$1e9p8$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 14 Sep 2024 13:14:50 +0200 (CEST)
Injection-Info: raubtier-asyl.eternal-september.org; posting-host="125554fef6f0b980ab7e5d4b466ab342";
	logging-data="1522507"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18goe/96sPdRXJ74lsjDMhCGiy62COiopU="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:EuIOX1B3Yu4P41W7odUiQUXpgio=
In-Reply-To: <vc3q8h$1e9p8$1@dont-email.me>
Content-Language: de-DE
Bytes: 2504

Am 14.09.2024 um 12:58 schrieb Muttley@dastardlyhq.com:

>>> Everything has to be polled at some level except hardware interrupt 
>>> based
>>> code.

>> If the queue is empty CPU-time is usually handed voluntary to
>> another thread - not with a lock-free-queue.

> I think you missed the point - locks are just a kernel construct. Their 
> state still has to be polled by the kernel.

No, their state is maintained in userspace and the kernel is only there
for the slow path when there's contention.

> Unless the locking mechanism is implemented in hardware then software
> has to manage it whether in user  space or kernel space.

The fast-path is implemented in hardware through the support of atomics.

But that wasn't the point in the discussion because this doesn't relate
to lock free queue's drawback that there's no slow path and the queue
has to be polled.