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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,cae92f92d6a1d4b1 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: "(see below)" Newsgroups: comp.lang.ada Subject: Re: Ada.Execution_Time Date: Wed, 29 Dec 2010 19:57:19 +0000 Message-ID: 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> <1o5cbm4b1l20d$.19winbma6k5qw.dlg@40tude.net> <8n4mskF7mmU1@mid.individual.net> <8nm30fF7r9U1@mid.individual.net> <8o0p0lF94rU1@mid.individual.net> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: individual.net cYPqKFr89G2LO4UaGabiVA9mP8bUV8pyQl8eHIuiozH7SEKGk8 Cancel-Lock: sha1:wntBFHchIuqWOD015KZ5CtL/+fU= User-Agent: Microsoft-Entourage/12.28.0.101117 Thread-Topic: Ada.Execution_Time Thread-Index: AcunkplYvcLObbdfL025OnRcL6R/5w== Xref: g2news2.google.com comp.lang.ada:17206 Date: 2010-12-29T19:57:19+00:00 List-Id: On 29/12/2010 16:51, in article jw9ocxiajasa.142oku2z0e6rx$.dlg@40tude.net, "Dmitry A. Kazakov" wrote: > On Wed, 29 Dec 2010 16:19:13 +0000, (see below) wrote: > >> From this I deduce that the intent for CPU_Time is that it be a useful >> approximation to the sum of the durations (small "d") of the intervals of >> local inertial-frame physical time in which the task is in the running >> state. > > There exist more pragmatic considerations than the relativity theory. The > duration you refer above is according to which clock? I referred to time dilation to preempt your bringing it up. 8-) > - Real time CPU counter > - Programmable timer > - BIOS clock > - OS system clock > - Ada.Real_Time.Clock > - Ada.Calendar.Clock > - an NTP server from the given list ... > ... Quite so, but these issues, and rounding, and so on, are all subsumed under "useful approximation". They are implementation dependent in the best of circumstances, and so need to be specified by the implementer. >> It seems to me that the only grey area is the degree of approximation that >> is acceptable for the result to be "useful". > > That is the next can of worms to open. Once you decided which clock you > take, you would have to define the sum of *which* durations according to > this clock you are going to approximate. This would be way more difficult > and IMO impossible. What is the "CPU" is presence of many cores? What does > it mean for the task to be "active" keeping in mind the cases it could get > blocked without losing the "CPU" (defined above)? I think you are are creating unnecessary difficulties. Note that I said nothing about CPUs, only about process states. The elapsed time between dispatching a task/process and pre-empting or blocking it is a well defined physical quantity. It has nothing to do with cores, and I've no idea what "blocked without losing the CPU" means. In my dictionary that is simply self-contradictory. But if it does mean something in some implementation, all that is necessary is to inform of the approximation it gives rise to. > In my humble opinion, !-) > ARG defined Ada.Execution_Time in the most > *reasonable* way, in particular, allowing to deliver whatever garbage the > underlying OS service spits. I agree. What else could they do? And if the implementation documents that, where is the harm? -- Bill Findlay with blueyonder.co.uk; use surname & forename;