From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: * X-Spam-Status: No, score=1.6 required=3.0 tests=BAYES_50,FROM_NO_USER autolearn=no autolearn_force=no version=3.4.5-pre1 Date: Wed, 23 Sep 92 09:19:11 CDT From: crispen <@ada3.ca.boeing.com:crispen@efftoo.boeing.com> Subject: Re: Using Global Variables Message-ID: <9209231419.AA02963@efftoo.boeing.com> List-Id: Larry Howard (lph@sei.cmu.edu) writes: >I'm happy to report that the bogeyman has not come and carted us off. These >applications have realized their engineering goals of modifiability and ease >of integration -- as well as efficiency. No one would doubt that it is possible to make a shared memory model meet the ilities with the possible exception of scaleability (I like to call it separability, but what do I know? ;-) It has been our experience, also in the flight simulator domain, that (say) moving the atmosphere functions from one CPU to another causes a real mess in re-coding, debugging subtle integration problems, etc. I am aware of the Air Vehicle Structural Model's Export Area (which no matter how many times I hear it explained I still can't differentiate from a named common), but I still have some suspicions about things like data synchronization, subtle order dependencies and so on. I will simply state that in my personal experience on three flight simulators in Ada, the code that used shared memory was invariably buggier and harder to integrate than code that used parameter passing. >I personally suggest being wary of anyone >wishing to raise the use of shared variables to the status of mortal sin. I would also be suspicious of anyone who offers shared memory as a means of salvation ;-). Let's compromise and call it a venial sin, shall we? Look, we can all code in Assembler in such a way as to capture all the ilities. But generally we don't. The only reason Ada has such nice things as data hiding and abstraction is to protect us from our own "sinful" natures. Finally, Larry, you know from my brief and amateurish paper I sent you (or think I sent you) what's wrong with shared memory. In fact, the Air Vehicle Structural Model (as I understand its current implementation) requires tight coupling between Subsystems and a period during each simulation frame for data synchronization, precisely to avoid those problems. To sum up, I think that saying "Shared memory is harmless" is disingenuous because (a) people tend to abuse it, and (b) special care must be taken with it to avoid race conditions and similar problems of data synchronization. +-------------------------------+--------------------------------------+ | Bob Crispen | The owls are not what they seem | | crispen@foxy.boeing.com +--------------------------------------+ | (205) 461-3296 |Opinions expressed here are mine alone| +-------------------------------+--------------------------------------+