[OT] Re: Number of processor cores confusion
Volker Wysk
post at volker-wysk.de
Tue Nov 10 16:18:29 UTC 2020
Am Dienstag, den 10.11.2020, 15:58 +0100 schrieb Liam Proven:
> When PCs got multiple CPUs, the programmers went through trying to
> divide up the tasks in the kernel so that some bits could run
> side-by-side, marking the dangerous bits that must not with
> mutual-exclusion signals -- MUTEXes. Originally there was one big one
> that locked the whole kernel; this was removed in Linux 2.2 if I
> remember correctly.
>
> Similarly, Firefox painfully was broken into 2 then 4 communicating
> processes. Google took the brute-force approach with Chrome: each tab
> is a process, communicating with a front-end that draws the window
> frame. Faster but this approach eats RAM and will use all your CPU
> cores if it can.
>
> But yes, you're absolutely right, most user programs don't, at all.
> It's too hard for too little gain. Languages like C and to a slightly
> lesser extent C++ are very bad at this, and in *nix, _everything_ is
> implemented in C or C++.
As an aside: In Mercury, all that is needed is to replace the conjunction
(",") operator with the parallel conjunction operator ("&"), at the right
places. It isn't suitable for beginners, but it's well worth learning. :-)
(Mercury is an advanced logic-functional language.)
Goodbye,
Volker
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20201110/56c0d650/attachment.sig>
More information about the ubuntu-users
mailing list