News for hackers. Stuff that matters.
Re:Why choose async/await over threads? by Animats on Monday March 25, 2024 @01:48PM (#39819295)
> a cpu with N wip contexts

That's what "hyper-threading" is. There's enough duplicated hardware that beyond 2 hyper-threads, it seems to be more effective to add another CPU. If anybody ever built a 4-hyperthread CPU, it didn't become a major product.

It's been tried a few times in the past, back when CPUs were slow relative to memory. There was a National Semiconductor microprocessor where the state of the CPU was stored in main memory, and, by changing one register, control switched to another thread. Going way back, the CDC 6600, which was said to have 10 peripheral processors for I/O, really had only one, with ten copies of the state hardware.

Today, memory is more of a bottleneck that the CPU, so this is not a win.

Re:Why choose async/await over threads? by zozbot234 on Monday March 25, 2024 @02:34PM (#39819744)
The UltraSPARC T1 had 4-way SMT, and its successors bumped that to 8-way. Modern GPU compute is also highly based on hardware multi-threading as a way of compensating for memory latency, while also having wide execution units that can extract fine-grained parallelism within individual threads.
Re:Why choose async/await over threads? by nine_k on Monday March 25, 2024 @02:48PM (#39819927)
Also, IBM POWER have SMT at levels above 2; at least POWER 7 had 4-way SMT ("hyperthreading").
Re:Why choose async/await over threads? by Animats on Monday March 25, 2024 @06:55PM (#39822170)
Missed that. That's part of IBM mainframe technology, where you can have "logical partitions", a cluster on a chip, and assign various resources to each. IBM POWER10 apparently allows up to 8-way hyperthreading if configured that way.
Re:Why choose async/await over threads? by temporarely on Monday March 25, 2024 @01:56PM (#39819380)
Thanks, very informative.