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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,98fcd569e727e97c X-Google-Attributes: gid103376,public From: "Samuel A. Mize" Subject: Re: Tasking Techniques - Opinions? Date: 1997/06/06 Message-ID: <339808BF.41C6@magellan.bgm.link.com>#1/1 X-Deja-AN: 246541393 References: <5n2hjr$ohm$1@news.pacifier.com> <3394ecbe.215389049@news.pcisys.net> <3395A448.41C6@magellan.bgm.link.com> Organization: PSI Public Usenet Link Newsgroups: comp.lang.ada Date: 1997-06-06T00:00:00+00:00 List-Id: Jon S Anthony wrote: > In article <3395A448.41C6@magellan.bgm.link.com> "Samuel A. Mize" writes: > > > Absolutely true. However, do be aware that protected types have > > significant overhead -- not as much as task rendezvous, but on the > > order of ten times a procedure call. > > I find this surprising. On what do you base this 10X figure? It surprised me too, and forced me to redesign data-sharing in some real-time code. (Measure everything, early. Thank heaven we DID.) As Tom Quiggle of SGI pointed out to me in email, Ada semantics surround a protected call with a lot of required processing: a) deferral of abortion/asynchronous transfer of control (ATC) for the current task b) acquisition of of a mutex c) execution of the protected actions d) release the mutex e) re-enable abortion/ATC f) check for pending abort/ATC Some of this will be system calls, which take longer than simple procedure calls on most systems I know of. In a multi-processor environment, those system calls will have to coordinate between processors, which takes even more time. Sam Mize -- -- Samuel Mize (817) 619-8622 "Team Ada" -- Hughes Training Inc. PO Box 6171 m/s 400, Arlington TX 76005