[SOUND] So we know how the Time demand analysis is done in theory, and in this lesson we will take a more practical example. The time demand can be determined in two different ways. The first is with a mathematical formulation we saw in another lesson. But it is also possible to illustrate the time demand as a graphical time demand function. To start with example, we consider the following periodic tasks that shown in the table. And we want to verify this task set with the Time demand analysis method to answer whether the system is feasible with the rate-monotonic scheduler. Since we used the rate-monotonic scheduler, we start with the highest priority task which is determined by the period. And in this case it is T1, right? Because T1 is the shortest period, and that means it has the highest priority. And now we want to calculate W1 for each integer step T. And since we start with the highest priority task, we can assume that no other tasks have been scheduled so far. So we want to evaluate W1(1) using the formula. ei the execution time of this task is 10 1, because this is the execution time e1. Since no other task is scheduled, the sum from k = 1 to i- 1 is 0 and we can skip it for this task. Reiterate one step to T = 2 and evaluate W1(2). In this case it is still 1 because no other task has so far been scheduled, so nothing changes. And finally we compare the time in the end of the period at time 2, with the time demand W1(2). Since we have the time 2, and the time demand W1(2) = 1, the time demand is now less than the time needed, and the system is still feasible at least with task 1. We continue to T2 because it has the second highest priority. And now we want to calculate W2 for each time step, taking into account that the 1 is already scheduled. In time step 1, we have W2(1) = the execution time of this task, which is 1 plus the utilization of the already scheduled task T1, which is 1 divided by its period of 2 and multiplied by its execution time 1. The same thing is iterated for time 2 and 3 in the same way. And when we have the time demand in the end of the period at time 3 we compare it again to the time demand. The time demand is now exactly the same as the time 3, so the system is still feasible. And finally we evaluate T3 which has the lowest priority. In the first time step 1 we have the execution done ei, the execution time of this task as 0.5 plus the utilization of both T1 and T2. The first calculated for T1 and a utilization is 1 divided by 2 rounded up and multiplied by the execution time of T1 which is 1. Then we take T2 which has a period of 3 rounded up, and an execution time of 1 W3(1) is then 2.5. And we then iterate this step until the end of the period of the 3 which is at times 6. So okay, now we have W3(6) being 0.5 + 6 divided by 2, rounded up, multiplied by 1 + 6 divided by 3, round it up and multiply it by 1, W3(6) is then 5.5. We're now comparing the time demand of 5.5 to the provided time 6, we can see that the system is indeed feasible, because 5.5 is smaller than 6. We also want to show a different method to do the test. In this example, we take a new set of tasks shown in the table, and we want to draw the Time demand function as a graph, and the question we ask is whether the system is feasible or not? All right so here we go. We first draw the diagonal, calling the upper side the bad side, because if a task ends up on this side, it means that more time is demanded than what is provided. The lower side is the good side, and if a task ends up here in the end of its period, more time is given than what is demanded and this is good. So we start with task 1 and draw 1 period. And since it has an execution time of 1, we start where W1(1) is 1. And then a new job in T1 is released, and we increase the time demand with the execution time of T1 and so on for the next period. We now see that all the jobs in T1 ends up on the good side of the diagonal, so the system is still feasible. Then we take task 2, because it has the second lowest period. T2 is then scheduled until time 3, after which it must respect the next period of T1. And the time demand increases now with 1 because of e1. Then it is further scheduled until time 5, where T2 ends and the time demand is increased with the execution time of T2 which is 1.5. Again at time 6, the T1 period ends and the time demand increases with execution time of T1. So as we now look at the figure, T2 always ends a period under the diagonal which means that the system is still feasible. And finally we take T3 and starting from time demand, can you calculate it yourself? 1 + 1.5 + 1.25 = 3.75. T3 is then scheduled until the end of T1, and the time demand increases there with 1. Then T3 is further scheduled until the end of T2, and the time demand increases with 1.5, because this was the execution time of T2. T3 has a period of 7, and we schedule it until this point. At 7 we see that T3 ends the period on the upper side of the diagonal, meaning the bad side. T3 now demands more time than what can be provided, so the system is now not feasible. In conclusion, they have learned that the Time demand analysis can determine if a priority task set using the right monotonic scheduler is feasible without the need of actually running the system. This was shown both as a mathematical formulation, and as a graphical time demand function. Where we've shown that if all tasks demand less time than what the system can provide, no deadlines will ever be missed, and they have a formal proof of the feasibility.