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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!buffer2.nntp.dca1.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail NNTP-Posting-Date: Sun, 13 May 2018 10:00:41 -0500 From: Dennis Lee Bieber Newsgroups: comp.lang.ada Subject: Re: How to get Ada to ?cross the chasm?? Date: Sun, 13 May 2018 11:00:42 -0400 Organization: IISS Elusive Unicorn Message-ID: References: <87po27fbv9.fsf@nightsong.com> <87in7x62vw.fsf@nightsong.com> <878t8szdtk.fsf@nightsong.com> <87tvrdhl5v.fsf@nightsong.com> User-Agent: ForteAgent/8.00.32.1272 X-No-Archive: YES MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Usenet-Provider: http://www.giganews.com NNTP-Posting-Host: 108.68.179.11 X-Trace: sv3-u775zch/C+DrDd0ZjpFaqTyJIocQYTOXBibwdMGjcbvoAb7e3rToHTObWa3AeaNb79q1nGcfiXOplp2!R9UChmhRXusuCMg2wwvS6XwlHNJHzwsKYxelHikLfaXlHFCFkRiSqdNxZY3mqdRfZOT42wds1IC9!LVH6o3N+D5XPHWcK8aeVRkWTOhc= X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 2790 Xref: reader02.eternal-september.org comp.lang.ada:52338 Date: 2018-05-13T11:00:42-04:00 List-Id: On Sun, 13 May 2018 16:41:51 +0300, Niklas Holsti declaimed the following: >Ok, that shows two more possible motivations for not using system heap: >variability of the time required for allocation (and perhaps for >release, too), and the need to use locks if the heap is shared by >multiple tasks. But some heap structures have good WCET bounds (buddy >systems, for example), and many acceptable data structures need locks >(inter-task message queues, for example). So I don't feel that these >motivations are as strong as the two I quoted above. The message queue tends to be a bounded time -- you know (or can determine) the worst case time to perform lock, adjust queue pointers, unlock... and if needed, interrupts are disabled so no task switch takes place. If using circular buffers, one may not even need locks as the write pointer must be "ahead" (in the circle) of the read pointer (I forget if the implementation used "same => empty queue" or "delta of 1 => empty") and (as the message queues tend to be defined as one producer, one consumer) incrementing pointers can be done without locking. -- Wulfraed Dennis Lee Bieber AF6VN wlfraed@ix.netcom.com HTTP://wlfraed.home.netcom.com/