From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f849b,d275ffeffdf83655 X-Google-Attributes: gidf849b,public X-Google-Thread: 115aec,d275ffeffdf83655 X-Google-Attributes: gid115aec,public X-Google-Thread: 1108a1,d275ffeffdf83655 X-Google-Attributes: gid1108a1,public X-Google-Thread: 103376,d275ffeffdf83655 X-Google-Attributes: gid103376,public X-Google-Thread: 146b77,d275ffeffdf83655 X-Google-Attributes: gid146b77,public From: Marin David Condic Subject: Re: Ada vs C++ vs Java Date: 1999/01/18 Message-ID: <36A3793D.3D8F6689@pwfl.com>#1/1 X-Deja-AN: 434077137 Content-Transfer-Encoding: 7bit Sender: condicma@bogon.pwfl.com References: <369C1F31.AE5AF7EF@concentric.net> <369D1F2B.138D1FB8@pwfl.com> <369E4A41.8D7DDA14@west.raytheon.com> <369F87EE.88403F96@west.raytheon.com> Content-Type: text/plain; charset=us-ascii Organization: Pratt & Whitney Mime-Version: 1.0 Reply-To: diespammer@pwfl.com Newsgroups: comp.lang.ada,comp.vxworks,comp.realtime,comp.arch.embedded,comp.object Date: 1999-01-18T00:00:00+00:00 List-Id: Ken Keys wrote: > > Maybe I should give some background. I am pretty much an agnostic when > it comes to language issues. I had always thought of Ada as "Pascal with > an attitude" although Ada has a lot of nice features that were missing > from Pascal. As such, I never saw much use for the Rendezvous (which > isn't explained very well in most Ada texts). I figured that it was > something that was added to the language spec to satisfy some ivory > tower academic. A year or so ago a colleague enlightened me with some > examples of just what could be done with the Rendezvous. However when I > asked him if he had ever used any in his production code, the answer was > no. He used the underlying OS primitives just like everybody else. > Ahhhhhh. Now it all becomes clear to me! I thought your question had something to do with Ada rendesvous and efficiency. But your real interest is "Why have it as a language primitive when I can just call OS routines?" 1) There are at least some hard real time embedded systems for which there is no underlying operating system to call. You write your own "operating system". Ada was originally designed for programs that fall into this category - or rather, this was *one* of the categories whos requirements had to be met. Yes, when you are operating at this level, you can find lots of good uses for Ada's rendesvous mechanism. Your only issue is one of CPU time required to use the mechanisms. (And, as observed earlier, Ada95 has cured many of the speed & priority problems originally in Ada83, so there are fewer reasons to avoid them.) 2) Even for embedded or other applications where there *is* an underlying operating system, you cannot necessarily be sure of *which* operating system or what the precise calls are to get the same effects as those provided by the rendesvous. If you are comfortable with the application being short lived and only ever going to run on, say, Unix, then I guess it's a toss up as to using rendesvous or system calls. But in a large number of systems, you don't know how long the software has to last and you don't know that it won't have to be ported to some other environment. So its nice to have a well defined mechanism within the language for accomplishing the goals because doing so leads to portability, reusability and reliability. Its also advantageous in that the programmer need not learn some set of underlying OS primitives in order to accomplish multitasking & inter-task communication. Its all right there in the language, the ARM and the related textbooks. Maybe your experience is different. In my experience it has been easier to learn to use Ada's rendesvous mechanisms than it is to dig up the same information out of OS documentation. And in the embedded code arena in which I work, there is no OS, so I'm real glad that Ada provides a way to get there. MDC -- Marin David Condic Real Time & Embedded Systems, Propulsion Systems Analysis United Technologies, Pratt & Whitney, Large Military Engines M/S 731-95, P.O.B. 109600, West Palm Beach, FL, 33410-9600 Ph: 561.796.8997 Fx: 561.796.4669 ***To reply, remove "bogon" from the domain name.*** "Nobody shot me." -- Last words of Frank Gusenberg when asked by police who shot him fourteen times with a machine gun in the Saint Valentine's Day Massacre.