From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Ada.Execution_Time
Date: Tue, 28 Dec 2010 16:46:20 +0200
Date: 2010-12-28T16:46:20+02:00 [thread overview]
Message-ID: <8nubhsF6e8U1@mid.individual.net> (raw)
In-Reply-To: <1j9i6trxinqtg$.renlw9wdtpsf.dlg@40tude.net>
Dmitry, from now on I am going to respond only to those of your comments
that to me seem to make some kind of sense and have not been discussed
before. From my omissions you may deduce my opinion of the remainder.
Dmitry A. Kazakov wrote:
>>> 2. It would be extremely ill-advised to use Ada.Execution_Time instead of
>>> direct measures for an implementation of time sharing algorithms.
Niklas Holsti replied:
>> If by "direct measures" you mean the use of some external measuring
>> device such as an oscilloscope or logic analyzer, such measures are
>> available only externally, to the developers, not within the Ada program
>> itself.
Dmitry:
> You forgot one external device called real time clock.
And you seem to forget that Ada.Execution_Time may be implemented by
reading a real-time clock. As has been said before.
Dmitry:
>>> I don't
>>> care how much processor time my control loop takes so long it manages to
>>> write the outputs when the actuators expect them.
Niklas:
>> You should care, if the processor must also have time for some other
>> tasks of lower priority, which are preempted by the control-loop task.
Dmitry:
> Why? It is straightforward: the task of higher priority level owns the
> processor.
Do you mean that your system has only one task with real-time deadlines,
and no CPU time has to be left for lower-priority tasks, and no CPU time
is taken by higher-priority tasks? Then scheduling is trivial for your
system and your system is a poor example for a discussion about scheduling.
Niklas:
>> For example, assume that the computation in a control algorithm consists
>> of two consecutive stages where the first stage processes the inputs
>> into a state model and the second stage computes the control outputs
>> from the state model. Using Ada.Execution_Time or
>> Ada.Execution_Time.Timers the program could detect an unexpectedly high
>> CPU usage in the first stage, and fall back to a simpler, faster
>> algorithm in the second stage, to ensure that some control outputs are
>> computed before the deadline.
Dmitry:
> No, in our systems we use a different schema.
So what? I said nothing (and know nothing) about your system, any
resemblance is coincidental. And there can be several valid schemas.
> The "fall back" values are
> always evaluated first. They must become ready at the end of each cycle. A
> finer estimation is evaluated in background and used when ready.
So your problem is different (the coarse values are the rule). Different
problem, different solution.
> In general, real-time systems are
> usually designed for the worst case scenario,
Yes, but this is often criticized as inefficient, and there are
scheduling methods that make good use of the difference (slack) between
actual and worst-case execution times. These methods need something like
Ada.Execution_Time. As has been said before.
> Consider a system with n-processors. The execution
> time second will be 1/n of the real time second.
No. If you have n workers digging a ditch, you must pay each of them the
same amount of money each hour as if you had one worker. So the "digging
hour" is still one hour, although the total amount of work that can be
done in one hour is n digging-hours. You are confusing the total amount
of work with the amount of work per worker.
With n processors the system can do n seconds worth of execution in one
real-time second. But each processor still executes for one second. And
as I understand the Ada task dispatching/scheduling model, one task
cannot execute at the same time on more than one processor, so one task
cannot accumulate more than one second of execution time in one second
of real time.
(At the risk of introducing another side issue, I note that an
automatically parallelizing compiler might make a task use several
processors in parallel, at least for some of the time. But I don't think
that RM D2.1 considers this possibility.)
> With shared memory it will
> be f*1/n, where f is some unknown factor.
I agree that variable memory access times, and other dynamic timing that
may depend on the number of processors and on how they share resources,
is a complicating factor in the analysis of CPU loads and
schedulability. Indeed this is why I fear that the concept of "the
execution time of task" is becoming fearsomely context-dependent and
therefore problematic -- something that you disagreed with.
For the definition of Ada.Execution_Time, memory access latency is
relevant only if the Ada RTS suspends tasks that are waiting for memory
access, so that they are "not executing" until the memory access is
completed. Most RTOSes do not suspend tasks in that way, I believe.
--
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
. @ .
next prev parent reply other threads:[~2010-12-28 14:46 UTC|newest]
Thread overview: 124+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-12 4:19 Ada.Execution_Time BrianG
2010-12-12 5:27 ` Ada.Execution_Time Jeffrey Carter
2010-12-12 16:56 ` Ada.Execution_Time Jeffrey Carter
2010-12-12 21:59 ` Ada.Execution_Time BrianG
2010-12-12 22:08 ` Ada.Execution_Time BrianG
2010-12-13 9:28 ` Ada.Execution_Time Georg Bauhaus
2010-12-13 22:25 ` Ada.Execution_Time Randy Brukardt
2010-12-13 22:42 ` Ada.Execution_Time J-P. Rosen
2010-12-14 3:31 ` Ada.Execution_Time Jeffrey Carter
2010-12-14 15:42 ` Ada.Execution_Time Robert A Duff
2010-12-14 16:17 ` Ada.Execution_Time Jeffrey Carter
2010-12-14 19:10 ` Ada.Execution_Time Warren
2010-12-14 20:36 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-14 20:48 ` Ada.Execution_Time Jeffrey Carter
2010-12-14 8:17 ` Ada.Execution_Time Vinzent Hoefler
2010-12-14 15:51 ` Ada.Execution_Time Adam Beneschan
2010-12-14 15:53 ` Ada.Execution_Time Robert A Duff
2010-12-14 17:17 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-14 17:45 ` Ada.Execution_Time Robert A Duff
2010-12-14 18:23 ` Ada.Execution_Time Adam Beneschan
2010-12-14 21:02 ` Ada.Execution_Time Randy Brukardt
2010-12-15 22:52 ` Ada.Execution_Time Keith Thompson
2010-12-15 23:14 ` Ada.Execution_Time Adam Beneschan
2010-12-17 0:44 ` Ada.Execution_Time Randy Brukardt
2010-12-17 17:54 ` Ada.Execution_Time Warren
2010-12-20 21:28 ` Ada.Execution_Time Keith Thompson
2010-12-21 3:23 ` Ada.Execution_Time Robert A Duff
2010-12-21 8:04 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-21 17:19 ` Ada.Execution_Time Robert A Duff
2010-12-21 17:43 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-14 19:43 ` Ada.Execution_Time anon
2010-12-14 20:09 ` Ada.Execution_Time Adam Beneschan
2010-12-15 0:16 ` Ada.Execution_Time BrianG
2010-12-15 19:17 ` Ada.Execution_Time jpwoodruff
2010-12-15 21:42 ` Ada.Execution_Time Pascal Obry
2010-12-16 3:54 ` Ada.Execution_Time jpwoodruff
2010-12-17 7:11 ` Ada.Execution_Time Stephen Leake
2010-12-15 21:40 ` Ada.Execution_Time Simon Wright
2010-12-15 23:40 ` Ada.Execution_Time BrianG
2010-12-15 22:05 ` Ada.Execution_Time Randy Brukardt
2010-12-16 1:14 ` Ada.Execution_Time BrianG
2010-12-16 5:46 ` Ada.Execution_Time Jeffrey Carter
2010-12-16 16:13 ` Ada.Execution_Time BrianG
2010-12-16 11:37 ` Ada.Execution_Time Simon Wright
2010-12-16 17:24 ` Ada.Execution_Time BrianG
2010-12-16 17:45 ` Ada.Execution_Time Adam Beneschan
2010-12-16 21:13 ` Ada.Execution_Time Jeffrey Carter
2010-12-17 0:35 ` New AdaIC site (was: Ada.Execution_Time) Randy Brukardt
2010-12-16 13:08 ` Ada.Execution_Time Peter C. Chapin
2010-12-16 17:32 ` Ada.Execution_Time BrianG
2010-12-16 18:17 ` Ada.Execution_Time Jeffrey Carter
2010-12-16 8:45 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-16 16:49 ` Ada.Execution_Time BrianG
2010-12-16 17:52 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-17 8:49 ` Ada.Execution_Time Niklas Holsti
2010-12-17 9:32 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-17 11:50 ` Ada.Execution_Time Niklas Holsti
2010-12-17 13:10 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-18 21:20 ` Ada.Execution_Time Niklas Holsti
2010-12-19 9:57 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-25 11:31 ` Ada.Execution_Time Niklas Holsti
2010-12-26 10:25 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-27 12:44 ` Ada.Execution_Time Niklas Holsti
2010-12-27 15:28 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-27 20:11 ` Ada.Execution_Time Niklas Holsti
2010-12-27 21:34 ` Ada.Execution_Time Simon Wright
2010-12-28 10:01 ` Ada.Execution_Time Niklas Holsti
2010-12-28 14:17 ` Ada.Execution_Time Simon Wright
2010-12-27 21:53 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-28 14:14 ` Ada.Execution_Time Simon Wright
2010-12-28 15:08 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-28 16:18 ` Ada.Execution_Time Simon Wright
2010-12-28 16:34 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-31 0:40 ` Ada.Execution_Time BrianG
2010-12-31 9:09 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-28 14:46 ` Niklas Holsti [this message]
2010-12-28 15:42 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-28 16:27 ` Ada.Execution_Time (see below)
2010-12-28 16:55 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-28 19:41 ` Ada.Execution_Time (see below)
2010-12-28 20:03 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-28 22:39 ` Ada.Execution_Time Simon Wright
2010-12-29 9:07 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-27 17:24 ` Ada.Execution_Time Robert A Duff
2010-12-27 22:02 ` Ada.Execution_Time Randy Brukardt
2010-12-27 22:43 ` Ada.Execution_Time Robert A Duff
2010-12-27 22:11 ` Ada.Execution_Time Randy Brukardt
2010-12-29 12:48 ` Ada.Execution_Time Niklas Holsti
2010-12-29 14:30 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-29 16:19 ` Ada.Execution_Time (see below)
2010-12-29 16:51 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-29 19:57 ` Ada.Execution_Time (see below)
2010-12-29 21:20 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-30 5:13 ` Ada.Execution_Time Randy Brukardt
2010-12-30 13:37 ` Ada.Execution_Time Niklas Holsti
2010-12-29 20:32 ` Ada.Execution_Time Niklas Holsti
2010-12-29 21:21 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-30 13:34 ` Ada.Execution_Time Niklas Holsti
2010-12-30 19:23 ` Ada.Execution_Time Niklas Holsti
2010-12-30 5:06 ` Ada.Execution_Time Randy Brukardt
2010-12-30 23:49 ` Ada.Execution_Time Niklas Holsti
2010-12-31 23:34 ` Ada.Execution_Time Randy Brukardt
2011-01-01 13:52 ` Ada.Execution_Time Niklas Holsti
2011-01-01 14:42 ` Ada.Execution_Time Simon Wright
2011-01-01 16:01 ` Ada.Execution_Time Simon Wright
2011-01-01 19:18 ` Ada.Execution_Time Niklas Holsti
2011-01-03 21:27 ` Ada.Execution_Time Randy Brukardt
2011-01-06 22:55 ` Ada.Execution_Time Niklas Holsti
2011-01-07 6:25 ` Ada.Execution_Time Randy Brukardt
2011-01-01 15:54 ` Ada.Execution_Time Simon Wright
2011-01-03 21:33 ` Ada.Execution_Time Randy Brukardt
2011-01-05 15:55 ` Ada.Execution_Time Brad Moore
2010-12-17 8:59 ` Ada.Execution_Time anon
2010-12-19 3:07 ` Ada.Execution_Time BrianG
2010-12-19 4:01 ` Ada.Execution_Time Vinzent Hoefler
2010-12-19 11:00 ` Ada.Execution_Time Niklas Holsti
2010-12-21 0:37 ` Ada.Execution_Time Randy Brukardt
2010-12-21 1:20 ` Ada.Execution_Time Jeffrey Carter
2010-12-19 12:27 ` Ada.Execution_Time Dmitry A. Kazakov
2010-12-21 0:32 ` Ada.Execution_Time Randy Brukardt
2010-12-19 22:54 ` Ada.Execution_Time anon
2010-12-20 3:14 ` Ada.Execution_Time BrianG
2010-12-22 14:30 ` Ada.Execution_Time anon
2010-12-22 20:09 ` Ada.Execution_Time BrianG
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox