• More of my philosophy about my lock-free inventions and about tail late

    From World-News2100@21:1/5 to All on Thu Feb 17 18:21:55 2022
    Hello,



    More of my philosophy about my lock-free inventions and about tail
    latency and more..

    I am a white arab and i think i am smart since i have also invented many scalable algorithms..


    I have just posted about some of my new inventions, so read about them carefully here:

    https://groups.google.com/g/alt.culture.morocco/c/YLnuhRSGuY8


    And Bonita Montero has just answered me the following:

    Lock-free queues totally suck since they have to
    be polled. The only lock-free structure that is
    useful is a lock-free stack for pooing objects and
    handling back items to a thread like with modern
    memory-allocators.


    And i have just answered her the following:

    Typically, polling a lock-free queue works best when
    the queue nearly always has entries, a blocking queue
    works best when the queue is nearly always empty.
    A downside of blocking queues is latency, typically of
    the order of 2-20 uS, due to kernel signaling. This can
    be mitigated by designing the system so that the work done
    by the consumer threads on each queued item takes much
    longer than this interval.The downside of non-blocking queues
    is the waste of CPU and memory bandwidth while polling an
    empty queue. This can be mitigated by designing the system
    so that the queue is rarely empty.


    So Bonita Montero has just answered me the following:

    Forget it - no one wants to poll a queue. Having limited
    polling with spinning for a while is the best of both sides.

    And i have just answered her the following:

    You have to understand that lockfree has advantages
    and disadvantages, so since lock-free queue works best
    when the queue nearly always has entries, so it is used best
    on those kind of situations, and for you wanting to have
    limited polling with spinning for a while.., i think you
    have to understand that lockfree comes with a number of
    advantages like it is not prone to deadlock and it is
    Pre-emption tolerant (so it is good at convoy-avoidance) etc.
    so you have to take into account those factors too so that to
    make a good choice depending > on the situation or the context.


    Also i have to talk more about tail latency, so first i have to define
    more what is Tail latency, and here it is:

    Tail latency, also known as high-percentile latency, refers to high
    latencies that clients see fairly infrequently. ... There are many
    causes of tail latency in the world, including contention, garbage
    collection, packet loss, host failure, and weird stuff operating
    systems do in the background.

    So i think that wait-free queues are better than lock-free queues
    in Tail latency, and you can read the following article so that to
    notice it:

    Throughput vs Latency and Lock-Free vs Wait-Free

    http://concurrencyfreaks.blogspot.com/2016/08/throughput-vs-latency-and-lock-free-vs.html

    But i can finally say that lock-free queues are still useful.



    Thank you,
    Amine Moulay Ramdane.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)