Deutsch English Français Italiano |
<v16667$1ctj7$2@dont-email.me> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!3.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Chris M. Thomasson" <chris.m.thomasson.1@gmail.com> Newsgroups: comp.lang.c++,comp.lang.c Subject: Re: Threads across programming languages Date: Sat, 4 May 2024 13:35:19 -0700 Organization: A noiseless patient Spider Lines: 106 Message-ID: <v16667$1ctj7$2@dont-email.me> References: <GIL-20240429161553@ram.dialup.fu-berlin.de> <RPidnQT6TOLEU7L7nZ2dnZfqnPWdnZ2d@giganews.com> <v14dke$1196p$3@dont-email.me> <v14dtd$1195j$2@dont-email.me> <0bicnUThyuTQwav7nZ2dnZfqn_WdnZ2d@giganews.com> <k3udnc_gOKwT8qv7nZ2dnZfqnPudnZ2d@giganews.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Sat, 04 May 2024 22:35:19 +0200 (CEST) Injection-Info: dont-email.me; posting-host="00566bb81b0a3452542610785f934900"; logging-data="1472103"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+816iGCMmF1Dpym5YQuneYJXBXJWZiJIU=" User-Agent: Mozilla Thunderbird Cancel-Lock: sha1:T7BxZo9cHN3VrSIZ9p4xJq5DNCM= Content-Language: en-US In-Reply-To: <k3udnc_gOKwT8qv7nZ2dnZfqnPudnZ2d@giganews.com> Bytes: 5118 On 5/4/2024 10:25 AM, Ross Finlayson wrote: > On 05/04/2024 09:03 AM, Ross Finlayson wrote: >> On 05/03/2024 09:34 PM, Chris M. Thomasson wrote: >>> On 5/3/2024 9:30 PM, Chris M. Thomasson wrote: >>>> On 4/29/2024 9:44 AM, Ross Finlayson wrote: >>>> [...] >>>> >>>> Have you ever read the following paper? Pretty nice! >>>> >>>> https://www.microsoft.com/en-us/research/wp-content/uploads/2016/02/tr-2001-39.pdf >>>> >>>> >>>> >>>> If not, read all... >>> >>> There is a way to do a little sort, gain a cohort and execute it. For >>> instance all reads, writes, connections, accepts are all organized in a >>> cohort. >>> >>> Instead of processing a read, write, read, read, write. Say: >>> >>> read, read, read, write, write >>> >>> To get better locality. I remember some functions on winnt. AcceptEx, >>> ConnectEx, TransmitFile, TransmitPackets, ect... ;^) >>> >>> The main thing to use to wait on io completions: >>> >>> https://learn.microsoft.com/en-us/windows/win32/fileio/getqueuedcompletionstatusex-func >>> >>> >>> >>> https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex >>> >>> >>> >>> https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_connectex >>> >>> >>> >>> https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-transmitfile >>> >>> >>> >>> https://learn.microsoft.com/en-us/windows/win32/api/mswsock/nc-mswsock-lpfn_transmitpackets >>> >>> >>> >>> I used to use them all the time back in the day. >> >> How about Hillis' "Connection Machine" and xectors. >> >> "Affinity" is the most usual sort of notion of >> locality and reference and that things that are >> local are simpler to address and keep coherent, >> having smaller address offsets. >> >> SIMD or single-instruction-multiple-data and >> "clubbing cohorts" of routines that have a >> common program counter in their next instruction, >> seems a pretty simple idea, what with what enables >> this is usually "content associative memory", >> that routes things into buckets rather naturally. >> >> (In silico.) >> >> It's like "we'll just use content-associative-memory >> and get a huge speed-up" and it's like "oh, what >> if it's otherwise occupied". It's like "oh we'll >> just add burst-buffers everywhere between units of >> the traces on our dies to modulate rate control" >> and it's like "there's no room on the layout". >> >> Then it's like "the chips made this and we wrote >> a scheduler and now it's according to us" and >> it's like "yeah, in a sense, it's system programming". >> >> >> Which of course is quite "old hat" and all has "prior art". >> >> > > > It reminds me of this time about fifteen years ago, > I was at my desk and the phone rang. I answered > the phone to "This is monitoring. Are you running > a script?" And I say "Yeah, I'm running a script on > monitoring." And they say "It's degrading prod." > I say "Do you want me to stop it?" And they say "Yes." > So, I hit Ctrl-C in that terminal as I'd designed my script > to populate all the monitors and alerts and alarms for > all the metrics of all the APIs and granular to the client > and with rollups and suppressions to distinguish outages > from use-cases, across all services across all regions, > to not much care. Then I added a brief pause between > calls and re-launched it. > > Sometimes using all the resources isn't very fair. > > Think of a client that would try to make the server use all of its resources and actually get into a major danger zone, even flag a malloc returning zero. Then there is non-paged memory to consider. On windows, each in flight OVERLAPPED operation uses non-paged memory... If that goes down, well, its not good at all... ;^o