3c1c90033cafa36ecf5191cfa5c50bd28850e38f
[des2015.git] / mart / ex06 / explanations.txt
1 6a.
2 The tasks are released at the same time so the highest priority task goes first
3 so the order is: 2, 1, 0
4
5 6b.
6 The tasks are all released at the same time so the highest priority goes first.
7 Task 1 and 2 have the same priority and then its first come first serve so the
8 order is: 1, 2, 0
9
10 6c.
11 Task 2 starts since it has the highest priority, when it's halfway it changes
12 task1 to a priority higher then his own so that task takes over. When task 1 is
13 finished task 2 can move on and will change the priority of task 0 to something
14 higher then his own so task 1 will start and when task 1 is finished task 2
15 executes the rest of his function.
16
17 6d.
18 Task 2 starts since it has the highest priority, when it's halfway it changes
19 to 38 and task 1 kicks in and halfway it changes its priority to 39. Now task 0
20 has the highest priority so it goes halfway and changes its priority to 40
21 which is again the highest so it can resume execution. When task 0 is finished
22 task 1 kicks in again with the second half and when that's done task 2 can
23 finish its second half.