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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,cae92f92d6a1d4b1 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news4.google.com!feeder2.cambriumusenet.nl!feed.tweaknews.nl!85.158.31.10.MISMATCH!newsfeed-0.progon.net!progon.net!news-zh.switch.ch!switch.ch!news.belwue.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada.Execution_Time Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <4d05e737$0$6980$9b4e6d93@newsspool4.arcor-online.net> <1wmsukf0wglz3$.odnzonrpayly.dlg@40tude.net> <6n1c5myuf2uz$.10jl3ln7il3aq.dlg@40tude.net> <8n0mgnFv2sU1@mid.individual.net> <1n3o55xjdjr9t.1u33kb75y2jfl$.dlg@40tude.net> <8n1142Fto2U1@mid.individual.net> Date: Fri, 17 Dec 2010 14:10:48 +0100 Message-ID: <1o5cbm4b1l20d$.19winbma6k5qw.dlg@40tude.net> NNTP-Posting-Date: 17 Dec 2010 14:10:48 CET NNTP-Posting-Host: fb72d0bd.newsspool1.arcor-online.net X-Trace: DXC=l:;H43d[Yh<]E=H1Q9`787ic==]BZ:af>4Fo<]lROoR1<`=YMgDjhg2BegFcK<>=`>[6LHn;2LCV>7enW;^6ZC`4\`mfM[68DC3_[3KF2YPOK: X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:16980 Date: 2010-12-17T14:10:48+01:00 List-Id: On Fri, 17 Dec 2010 13:50:26 +0200, Niklas Holsti wrote: > Dmitry A. Kazakov wrote: >> On Fri, 17 Dec 2010 10:49:26 +0200, Niklas Holsti wrote: >> >>> Dmitry A. Kazakov wrote: >>>> CPU_Time has no physical meaning. 2s might be 2.5s >>>> real time or 1 year real time. >>> CPU_Time values have physical meaning after being summed over all tasks. >>> The sum should be the real time, as closely as possible. >> >> 1. Not tasks, but threads + kernel services + kernel drivers + CPU >> frequency slowdowns => a) wrong; b) out of Ada scope => cannot be mandated > > I believe we are talking about the intended meaning of > Ada.Execution_Time.CPU_Time, not about how far it can be precisely > "mandated" (standardized). > > Appendix D is about real-time systems, and I believe it is aimed in > particular at systems built with Ada tasks and the Ada RTS. In such > systems there may or may not be CPU time -- "overhead" -- that is not > included in the CPU_Time of any task. See the last sentence in RM D.14 > 11/2: "It is implementation defined which task, if any, is charged the > execution time that is consumed by interrupt handlers and run-time > services on behalf of the system". In most systems there will be some > such non-task overhead, but in a "pure Ada" system it should be small > relative to the total CPU_Time of the tasks. Yes, this is what I meant. CPU_Time does not have the meaning: "CPU_Time values have physical meaning after being summed over all tasks. The sum should be the real time, as closely as possible." Anyway, even if the sum of components has a physical meaning that does not imply that the components have it. > By "CPU frequency slowdowns" I assume you mean a system that varies the > CPU clock frequency, for example to reduce energy consumption when load > is low. This do not necessarily conflict with Ada.Execution_Time and the > physical meaning of CPU_Time, although it may make implementation > harder. One implementation could be to drive the CPU-time counter by a > fixed clock (a timer clock), not by the CPU clock. I am not a language lawyer, but I bet that an implementation of Ada.Execution_Time.Split that ignores any CPU frequency changes when summing up processor ticks consumed by the task would be legal. >> 2. Not so anyway under many OSes => again, cannot be mandated > > Whether or not all OSes support the concepts of Ada.Execution_Time is > irrelevant to a discussion of the intended meaning of CPU_Time. ARM usually does not intend what would be impossible to implement. > "Simulation", "projection"... convey no meaning to me. http://en.wikipedia.org/wiki/Discrete_event_simulation -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de