Deutsch   English   Français   Italiano  
<jwvtt5ew3wl.fsf-monnier+comp.arch@gnu.org>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Stefan Monnier <monnier@iro.umontreal.ca>
Newsgroups: comp.arch
Subject: Re: Is Parallel Programming Hard, And, If So, What Can You Do About It?
Date: Wed, 21 May 2025 08:23:49 -0400
Organization: A noiseless patient Spider
Lines: 18
Message-ID: <jwvtt5ew3wl.fsf-monnier+comp.arch@gnu.org>
References: <vvnds6$3gism$1@dont-email.me>
	<27492f8028a0d40eff5071e85214fc36@www.novabbs.com>
	<100gj7t$1sbnn$11@dont-email.me> <QP%WP.57065$RXsc.38723@fx36.iad>
	<100iher$2b7vi$2@dont-email.me>
	<jwvcyc3xd2v.fsf-monnier+comp.arch@gnu.org>
	<fcb1f88f53b1a99fae7dc50eaba94f54@www.novabbs.org>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Date: Wed, 21 May 2025 14:23:51 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="51c20fc22ec2b76e7568eaa11540eace";
	logging-data="2984352"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18E1QtXJEDUK/cThkPa3iKljs3WnnUHF7U="
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:WmFHmnNzJG5u2vqiR//cafq3ehI=
	sha1:7zpVdJMrzq7SL0uJmANlcslp5Hc=
Bytes: 1946

>>> Personally, I rarely use multi-threading, and when I do, it is usually
>>> in
>>> the form of using mutex locks over shared buffers.
>>> You lock the mutex if needed to copy data from one thread to another; or
>>> when doing a task that depends on the data being consistent.
>>
>> FWIW, I think these kinds of things usually fall in the scope of
>> concurrency rather than parallelism.
>
> When I run 20-copies of a FEM CFD application, each uni-process::
> am I running concurrently ?? or in parallel ?? or both ??

Both: AFAIK the choice of how to divide&spread the data and the work is
in the parallelism camp, while the choice of how to synchronize them is
in the concurrency camp.


        Stefan