Sujet : Re: Serial, concurrent, parallel
De : '''newspam''' (at) *nospam* nonad.co.uk (Martin Brown)
Groupes : sci.electronics.designDate : 16. Jan 2025, 11:14:46
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vmam6l$3et7s$1@dont-email.me>
References : 1
User-Agent : Mozilla Thunderbird
On 14/01/2025 18:10, Don Y wrote:
I am surprised (disturbed?) at the problems people seem to have
sorting these things out in their thought processes. I don't
*believe* people think strictly "serially" but I am beginning to
question that belief as I witness smart/capable people stuck in
that mindset!
Most people do think in a very linear fashion so I'm not too surprised at your finding. Good realtime programmers are as rare as hen's teeth.
I've been finding problems with their implementations that
would not be present if they TRULY "thought in parallel". Things
that should be obvious seem to slip right past them. This came
to a head when I asked a colleague to explain multitasking:
"Well, FIRST, the processor does... and THEN..."
"Ah, 'THEN'! So, you are thinking about multitasking as the
SERIALIZATION of multiple tasks instead of the CONCURRENT
execution of them! So, when your code is run in true parallel
form (multiple cores, multiple processors), all of those hidden
assumptions that you've baked into your design fall apart because
they are no longer implicitly serialized!
There are major shrink wrap programs out there that have these bugs.
Excel 2007 as first released on a multi core machine and programmed via VBA the charting package would quite happily try to plot data points *before* the axis scales had been established. This did not end well and broke a lot of previously stable working commercial code.
It could be "solved" by the addition of suitable small delays here and there to prevent the race condition triggering. Heavy users went back to XL2003 which I recall was a particularly good vintage.
Can anyone suggest a simpler "real world" problem to promote these
"situations/scenarios"?
For things to get interesting you need at least 4 threads with some of them depending on synchronisation with the others. Building a house or putting up one of those insert tab A into slot B tents might do it.
A house without foundations will obviously fall down and putting the roof on before plastering and fitting out the interior is essential.
A variant of this cartoon might also get people's attention:
https://www.businessballs.com/amusement-stress-relief/tree-swing-cartoon-pictures-early-versions/-- Martin Brown
Date | Sujet | # | | Auteur |
14 Jan 25 | Serial, concurrent, parallel | 35 | | Don Y |
14 Jan 25 |  Re: Serial, concurrent, parallel | 9 | | Liz Tuddenham |
14 Jan 25 |   Re: Serial, concurrent, parallel | 8 | | Don Y |
14 Jan 25 |    Re: Serial, concurrent, parallel | 7 | | Liz Tuddenham |
15 Jan 25 |     Re: Serial, concurrent, parallel | 6 | | Don Y |
16 Jan 25 |      Re: Serial, concurrent, parallel | 5 | | Liz Tuddenham |
16 Jan 25 |       Re: Serial, concurrent, parallel | 4 | | Don Y |
16 Jan 25 |        Re: Serial, concurrent, parallel | 3 | | Liz Tuddenham |
16 Jan 25 |         Re: Serial, concurrent, parallel | 1 | | Don Y |
16 Jan 25 |         Re: Serial, concurrent, parallel | 1 | | ehsjr |
16 Jan 25 |  Re: Serial, concurrent, parallel | 20 | | Martin Brown |
16 Jan 25 |   Re: Serial, concurrent, parallel | 19 | | Don Y |
16 Jan 25 |    Re: Serial, concurrent, parallel | 16 | | Liz Tuddenham |
16 Jan 25 |     Re: Serial, concurrent, parallel | 13 | | Don Y |
16 Jan 25 |      Re: Serial, concurrent, parallel | 12 | | Liz Tuddenham |
16 Jan 25 |       Re: Serial, concurrent, parallel | 5 | | Don Y |
17 Jan 25 |        Re: Serial, concurrent, parallel | 4 | | Liz Tuddenham |
17 Jan 25 |         Re: Serial, concurrent, parallel | 3 | | Don Y |
17 Jan 25 |          Re: Serial, concurrent, parallel | 1 | | Don Y |
17 Jan 25 |          Re: Serial, concurrent, parallel | 1 | | Don Y |
16 Jan 25 |       Re: Serial, concurrent, parallel | 6 | | Edward Rawde |
17 Jan 25 |        Re: Serial, concurrent, parallel | 5 | | Don Y |
17 Jan 25 |         Re: Serial, concurrent, parallel | 4 | | Edward Rawde |
17 Jan 25 |          Re: Serial, concurrent, parallel | 3 | | Don Y |
17 Jan 25 |           Re: Serial, concurrent, parallel | 2 | | Edward Rawde |
17 Jan 25 |            Re: Serial, concurrent, parallel | 1 | | Don Y |
16 Jan 25 |     Re: Serial, concurrent, parallel | 2 | | Martin Brown |
16 Jan 25 |      Re: Serial, concurrent, parallel | 1 | | Don Y |
16 Jan 25 |    Re: Serial, concurrent, parallel | 2 | | Martin Brown |
16 Jan 25 |     Re: Serial, concurrent, parallel | 1 | | Don Y |
16 Jan 25 |  Re: Serial, concurrent, parallel | 5 | | brian |
16 Jan 25 |   Re: Serial, concurrent, parallel | 3 | | john larkin |
17 Jan 25 |    Re: Serial, concurrent, parallel | 2 | | brian |
17 Jan 25 |     Re: Serial, concurrent, parallel | 1 | | john larkin |
16 Jan 25 |   Re: Serial, concurrent, parallel | 1 | | Don Y |