Re: Worst case execution time problem
- From: Randy Howard <randyhoward@xxxxxxxxxxxxxxxxx>
- Date: Sat, 30 Dec 2006 17:47:10 GMT
On Sat, 30 Dec 2006 11:31:52 -0600, gw7rib@xxxxxxx wrote
(in article <1167499912.126975.59540@xxxxxxxxxxxxxxxxxxxxxxxxxxx>):
Christian Christmann wrote:
Hi,
in real-time systems the worst case execution time (WCET) is an important
issue. In the literature I found the statement that its calculation is
undecidable in general. Why? I appreciate any detailed explanations.
Perhaps an example will help.
We're talking a program running in an OS along with other tasks, kernel
code and device drivers though. Such simplifications are fine for CS
class, but not for measuring WCET in a real-time system.
Suppose you have a program something like the following pseudo-code:<possible kernel, task switching, or interrupt latency here>
max = 3
loop:
<possible kernel, task switching, or interrupt latency here>
for x = 1 to max
for y = 1 to max<possible kernel, task switching, or interrupt latency here>
for z = 1 to max<possible kernel, task switching, or interrupt latency here>
for n = 3 to max<possible kernel, task switching, or interrupt latency here>
if x^n + y^n = z^n then print "Solution found" : stop<possible kernel, task switching, or interrupt latency here>
next n<possible kernel, task switching, or interrupt latency here>
next z<possible kernel, task switching, or interrupt latency here>
next y<possible kernel, task switching, or interrupt latency here>
next x<possible kernel, task switching, or interrupt latency here>
max = max + 1<possible kernel, task switching, or interrupt latency here>
goto loop
How long does this program take to run?
Now what's the right answer?
--
Randy Howard (2reply remove FOOBAR)
"The power of accurate observation is called cynicism by those
who have not got it." - George Bernard Shaw
.
- Follow-Ups:
- Re: Worst case execution time problem
- From: gw7rib
- Re: Worst case execution time problem
- References:
- Worst case execution time problem
- From: Christian Christmann
- Re: Worst case execution time problem
- From: gw7rib
- Worst case execution time problem
- Prev by Date: Re: Worst case execution time problem
- Next by Date: Re: How to program an enigma cipher?
- Previous by thread: Re: Worst case execution time problem
- Next by thread: Re: Worst case execution time problem
- Index(es):
Relevant Pages
|