Saturday, February 6, 2021

Digest for comp.lang.c++@googlegroups.com - 8 updates in 2 topics

"Öö Tiib" <ootiib@hot.ee>: Feb 06 05:07AM -0800

On Friday, 5 February 2021 at 22:18:50 UTC+2, Chris M. Thomasson wrote:
> > them seems to recognize a lost cause when it is so clear to everyone else.
 
> Apparently he banned me. However, he did promise me around a year ago to
> have an iso. I am willing to install it on an older x86.
 
That CAlive most likely does not exist in any demonstrable form.
I am under impression that you know that.
There are lot of open source OS available so there are also no
practical need for CAlive.
I am under impression that you know that too.
IOW your asking for ISO of CAlive feels like doing
something that you know being fruitless and purposeless.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Feb 06 01:17PM -0800

On 2/6/2021 5:07 AM, Öö Tiib wrote:
> I am under impression that you know that too.
> IOW your asking for ISO of CAlive feels like doing
> something that you know being fruitless and purposeless.
 
Well, I hope its not 100% vaporware, or else what the heck has he been
working on? Damn.
"Öö Tiib" <ootiib@hot.ee>: Feb 06 05:39AM -0800

On Friday, 5 February 2021 at 22:10:13 UTC+2, Chris M. Thomasson wrote:
 
> To be quite honest, I still have never actually used weak pointers wrt
> shared_ptr in real code. Need to study up. They seem a bit odd to me, oh
> well.
 
It feels like having a pointer that we can check if it is dangling pointer
or not. That solves lot of issues ... about bit odd syntax I don't care as
human languages have always seemed way more odd to me.
Marcel Mueller <news.5.maazl@spamgourmet.org>: Feb 06 05:20PM +0100

Am 05.02.21 um 22:00 schrieb Chris M. Thomasson:
 
>     return;
> }
> _______________________________
 
People called this cooperative multi-tasking in the past. ;-)
 
 
Marcel
Marcel Mueller <news.5.maazl@spamgourmet.org>: Feb 06 05:31PM +0100

Am 05.02.21 um 23:33 schrieb Chris M. Thomasson:
> Basically, calling a blocking operation while holding a mutex is bad!
> Blocking while inside a RCU region is bad!
 
Indeed. But you have to go to very low level in modern OS to ensure that
a piece of code will never block. With a few exceptions only the kernel
can enforce this. At user level it is almost impossible to avoid
blocking completely. Preemptive multi tasking and page faults are the
most common reasons.
 
 
Marcel
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Feb 06 12:22PM -0800

On 2/6/2021 8:31 AM, Marcel Mueller wrote:
>> Blocking while inside a RCU region is bad!
 
> Indeed. But you have to go to very low level in modern OS to ensure that
> a piece of code will never block.
 
Then how do you use a mutex then? Think about it. Calling user code in a
mutex critical section that can block is very, very bad. It can actually
deadlock and prevent the program from running. It sounds like you are
saying that using a mutex is basically impossible in user code. That is
not true.
 
 
> can enforce this. At user level it is almost impossible to avoid
> blocking completely. Preemptive multi tasking and page faults are the
> most common reasons.
Well, you can block in a RCU region using my proxy collector. However,
the effect will be delayed collections. Its not going to deadlock
anything. So, if we just follow the same rules we have for a mutex, no
problem at all. :^)
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Feb 06 01:14PM -0800

On 2/6/2021 8:31 AM, Marcel Mueller wrote:
> can enforce this. At user level it is almost impossible to avoid
> blocking completely. Preemptive multi tasking and page faults are the
> most common reasons.
 
Fwiw, I am almost finished wrt showing a use case for my proxy gc. The
new thread will be called "The Poor Mans RCU...".
 
Basically, this one use case out of many will allow a lock-free list to
be mutated while readers are going full speed ahead wrt iterating the
whole list, while writers are pushing, popping, and deleting nodes.
 
It can be useful.
"Chris M. Thomasson" <chris.m.thomasson.1@gmail.com>: Feb 06 01:16PM -0800

On 2/6/2021 5:39 AM, Öö Tiib wrote:
 
> It feels like having a pointer that we can check if it is dangling pointer
> or not. That solves lot of issues ... about bit odd syntax I don't care as
> human languages have always seemed way more odd to me.
 
Yeah. I just do not understand how they work internally to shared_ptr.
Do weak_ptrs adjust the reference count at all? Please try to excuse my
ignorance here. ;^o
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page.
To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com.

No comments: