Worst-case execution time is
C values in all the equations we use. Known as ‘Timing Analysis’.
You either use static analysis or measurement. Static analysis is pessimistic whereas measurement is potentially optimistic (makes sense intuitively).
Without semantic meaning you might get really pessimistic information. For example if you have a loop like:
for i in 1..10 loop if Cond then -- basic block of cost 100 else -- basic block of cost 10 end if; end loop;
Naively, you might assume total cost is 1000, but if
Cond can only be true 4 times cost is 460.
A compiler can’t really check this. There are methods of adding spec around the program to help it (I think).
- Deal with the fact that the processors may or may not be identical; may have different characteristics (really hard to deal with).
- Two fundamentally different ways of dealing with these systems. You could partition the world up, or have global scheduling. There are also alternatives between these two extremes.
- Some things that are optimal in a single processor environment are not optimal in a multiprocessor environment. E.g. EDF isn’t, FPS is sometimes better than EDF.
- Also, Global is not always better than partitioned.
Scheduling has an additional use; you can save power if you know what the lowest speed you can run your processor at. This was only briefly covered.
Some quick exam notes
You should be able to know how to apply the (simple) repsonse time analysis equations. However the other equations; you don’t need to remember, you just need to be aware of them and understand how they work.