| Deutsch English Français Italiano |
|
<bef78de0c7ac6e7150ed593f70e54221@www.novabbs.org> View for Bookmarking (what is this?) Look up another Usenet article |
Path: news.eternal-september.org!eternal-september.org!feeder3.eternal-september.org!i2pn.org!i2pn2.org!.POSTED!not-for-mail From: mitchalsup@aol.com (MitchAlsup1) Newsgroups: comp.arch Subject: Re: Is Parallel Programming Hard, And, If So, What Can You Do About =?UTF-8?B?SXQ/?= Date: Wed, 21 May 2025 14:08:37 +0000 Organization: Rocksolid Light Message-ID: <bef78de0c7ac6e7150ed593f70e54221@www.novabbs.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> <jwvtt5ew3wl.fsf-monnier+comp.arch@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: i2pn2.org; logging-data="1311614"; mail-complaints-to="usenet@i2pn2.org"; posting-account="o5SwNDfMfYu6Mv4wwLiW6e/jbA93UAdzFodw5PEa6eU"; User-Agent: Rocksolid Light X-Spam-Checker-Version: SpamAssassin 4.0.0 X-Rslight-Site: $2y$10$kTnEAe4e.4BSbSOaHBgAfu8.jEdlfJedOfUCLswHQ96pooftkBrIi X-Rslight-Posting-User: cb29269328a20fe5719ed6a1c397e21f651bda71 On Wed, 21 May 2025 12:23:49 +0000, Stefan Monnier wrote: >>>> 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. I think of it as Both--especially when affinity is not used and the processes contend for CPUs randomly. Then process[a] and process[b] are running simultaneously (different cores) they are parallel, when running back-to-back on the same core they are concurrent. > > Stefan