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=-1.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,20fe5a249f5f6562 X-Google-Attributes: gid103376,public X-Google-Thread: ffc1e,9425605c29366d79 X-Google-Attributes: gidffc1e,public From: "Vladimir Olensky" Subject: Re: multi reads, single write Date: 1999/12/15 Message-ID: #1/1 X-Deja-AN: 560708862 References: <3847B024.EC4FD04F@essex.ac.uk> Organization: Posted via Supernews, http://www.supernews.com X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Newsgroups: comp.programming.threads,comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 1999-12-15T00:00:00+00:00 List-Id: Kaz Kylheku wrote in message ... >On Tue, 14 Dec 1999 01:28:12 +0300, Vladimir Olensky > wrote: >>With second one the answer is that Ada95 was designed for >>embedded and real-time systems and protected types were >>introduced into Ada 95 to provide most efficient implementation >>of "multi-read single write" operation. Any Ada implementation >>that support Real-Time Annex (e.g. GNAT) does that in a most >>efficient way possible for a given platform. > >What about implementations that don't support the Real-Time annex? I do not know such ones. At least these annexes are supported by the implementations that I've seen so far: Annex A - Predefined Library Environment Annex B - Interfaces to Languages Annex C - Systems Programming Annex D - Real-Time Systems Language Defined Attributes (Annex J) Language Defined Pragmas (Annex K) GNAT implements all special needs annexes: Systems Programming (Annex C) Real-Time Systems (Annex D) Distributed Systems (Annex E) Stub generation is fully implemented, but no PCS is provided yet, so distributed systems cannot yet be constructed with this version of GNAT. Information Systems (Annex F) Numerics (Annex G) Safety and Security (Annex H) Obsolescent Features (Annex I) Language Defined Attributes (Annex J) Language Defined Pragmas (Annex K) Real-Time annex just gives many additional options to control multitasking. It also imposes some restrictions on Clock granularity. >Moreover, how can GNAT generate hard real time applications on systems >that aren't real time, or are soft real time, like say most UNIXes? If one wants to build "hard" real-time system then one will use any appropriate "hard" Real-Time OS (RTOS) among existing or may be even no underlying OS at all. All that options are available. >Whether or not a given programming system is real time or not depends >a great deal on the guarantees provided by its environment. See above. >For the compiler for a given language to be suitable for real-time work, it >just needs to generate reasonably well behaved machine code. Yes, I agree here. But if language do not provide built-in mechanism for real-time multitasking, then one should reinvent the wheel using low-level stuff. >That is a function of the language implementation. It's not reasonable for a >language standard to impose limits on how many nanoseconds a given operation, >such as access to an object, must take. Sometimes it reasonable. At least for "hard" real-time systems. >Some languages are not well-suited time use. E.g. languages with implicit >dynamic alloocation garbage collection, That's why Ada does not use garbage collection by default. Ada provide several mechanisms to provide efficient resources deallocation. >or with implicit run-time algorithms >whose duration is difficult to estimate, or implicit uses of heavy weight >resources such as databases, networks and the like. This is separate big topic that is beyond the original thread. Regards, Vladimir Olensky