LQ 6-3
LQ 6-3
T1 1 ms 5 ms 4 ms
T2 2 ms 10 ms 8 ms
T3 3 ms 15 ms 13 ms
Fill in the table to show how the tasks are scheduled according to the preemptive EDF.
0-1 T1
1-2 T2
2-3 T2
3-4 T3
4-5 T3
5-6 T1
6-7 T3
7-8 None
8-9 None
9-10 None
10-11 T1
11-12 T2
12-13 T2
13-14 None
14-15 None
15-16 T1
16-17 T3
17-18 T3
18-19 T3
19-20 None
20-21 T1
21-22 T2
22-23 T2
23-24 None
24-25 None
25-26 T1
26-27 None
27-28 None
28-29 None
29-30 None
T1 1 ms 5 ms 4 ms
T2 2 ms 10 ms 8 ms
T3 3 ms 15 ms 13 ms
Fill in the table to show how the tasks are scheduled according to the preemptive EDF.
Here:
–Task 1 must execute before 2 and 3
–Task 2 must execute before 4 and 5
–Task 3 must execute before 6
Assume that the execution time for each task is one time unit. The deadlines are given in the graph. For example the
deadline for executing Task 2 is 5.
Select one:
True
False
No.
Latest Deadline First (LDF) is optimal with precedence in the sense that it minimizes the maximum lateness.
LDF constructs the schedule backwards, choosing first the last task to execute.
The last task to execute is the one on which no other task depends that has the latest deadline.
The algorithm proceeds to construct the schedule backwards, each time choosing from among the tasks whose
dependents have already been scheduled the one with the latest deadline.
T2 then T1 .
Latest Deadline First (LDF) is optimal with precedence in the sense that it minimizes the maximum lateness.
The last task to execute is the one on which no other task depends that has the latest deadline.
The algorithm proceeds to construct the schedule backwards, each time choosing from among the tasks whose
dependents have already been scheduled the one with the latest deadline.
From right to left we first schedule [T6] then [T5] then [T3] then [T4] then [T2] then [T1].
Question 4
EDF* is a Earliest-Deadline-First algorithm that works on dependent tasks and supports arrival of new tasks.
LDF* first adjusts the deadlines of all tasks according to the following formula:
D(i) refers to the set of all tasks that immediately depend on Task i in the precedence graph.
d2'= 2
d3'= 4
d4'= 3
d5'= 5
d6'= 6
Now we can apply the EDF by scheduling the tasks according to their earliest deadlines.
The schedule will be from left to right T1 then T2 then T4 then T3 then
T5 then T6 .
LDF* first adjusts the deadlines of all tasks according to the following formula:
D(i) refers to the set of all tasks that immediately depend on Task i in the precedence graph.
Priority Scheduling
A priority is associated with each process, and the CPU is allocated to the process with the highest priority.
Equal-priority processes are scheduled in a FCFS manner
Priorities are generally indicated by some fixed range of numbers, such as 0 to 7 or 0 to 4096.
However there is no general agreement on whether 0 is the highest or the lowest priority.
Here we assume that low numbers represent high priority.
Given the table and assuming that all the processes arrived at time point 0. Fill in the table to show how the tasks are
scheduled according to Priority Scheduling.
T1 3 10 ms
T2 1 1 ms
T3 4 2 ms
T4 5 1 ms
T5 2 5 ms
0-1 T2
1-2 T5
2-3 T5
3-4 T5
4-5 T5
5-6 T5
6-7 T1
7-8 T1
8-9 T1
9-10 T1
10-11 T1
11-12 T1
12-13 T1
13-14 T1
14-15 T1
15-16 T1
16-17 T3
17-18 T3
18-19 T4
Priority Scheduling
A priority is associated with each process, and the CPU is allocated to the process with the highest priority.
Equal-priority processes are scheduled in a FCFS manner
Priorities are generally indicated by some fixed range of numbers, such as 0 to 7 or 0 to 4096.
However there is no general agreement on whether 0 is the highest or the lowest priority.
Here we assume that low numbers represent high priority.
Given the table and assuming that all the processes arrived at time point 0. Fill in the table to show how the tasks are
scheduled according to Priority Scheduling.
T1 3 10 ms
T2 1 1 ms
T3 4 2 ms
T4 5 1 ms
T5 2 5 ms
T1 0 ms 3 ms
T2 2 ms 2 ms
T3 4 ms 6 ms
T4 5 ms 4 ms
T5 6 ms 5 ms
Fill in the table to show how the tasks are scheduled according to RR with a time quantum of 2 ms.
0-1 T1
1-2 T1
2-3 T2
3-4 T2
4-5 T1
5-6 T3
6-7 T3
7-8 T4
8-9 T4
9-10 T5
10-11 T5
11-12 T3
12-13 T3
13-14 T4
14-15 T4
15-16 T5
16-17 T5
17-18 T3
18-19 T3
19-20 T5
T1 0 ms 3 ms
T2 2 ms 2 ms
T3 4 ms 6 ms
T4 5 ms 4 ms
T5 6 ms 5 ms
Fill in the table to show how the tasks are scheduled according to RR with a time quantum of 2 ms.
A process is assigned permanently to one queue based on some properties of the process such as memory size, process
priority, or process type
P1 0 ms 12 ms
P2 8 ms 25 ms
P3 21 ms 33 ms
P4 30 ms 2 ms
Fill in the table to show how the tasks are scheduled according to MFQS.
0-1 P1
1-2 P1
2-3 P1
3-4 P1
4-5 P1
5-6 P1
6-7 P1
7-8 P1
8-9 P1
9-10 P1
10-11 P2
11-12 P2
12-13 P2
13-14 P2
14-15 P2
15-16 P2
16-17 P2
17-18 P2
18-19 P2
19-20 P2
20-21 P1
21-22 P3
22-23 P3
23-24 P3
24-25 P3
25-26 P3
26-27 P3
27-28 P3
28-29 P3
29-30 P3
30-31 P3
31-32 P4
32-33 P4
33-34 P1
34-35 P2
35-36 P2
36-37 P2
37-38 P2
38-39 P2
39-40 P2
40-41 P2
41-42 P2
42-43 P2
43-44 P2
44-45 P2
45-46 P2
46-47 P2
47-48 P2
48-49 P2
49-50 P3
50-51 P3
51-52 P3
52-53 P3
53-54 P3
54-55 P3
55-56 P3
56-57 P3
57-58 P3
58-59 P3
59-60 P3
60-61 P3
61-62 P3
62-63 P3
63-64 P3
64-65 P3
65-66 P3
66-67 P3
67-68 P3
68-69 P3
69-70 P3
70-71 P3
71-72 P3
P1 0 ms 12 ms
P2 8 ms 25 ms
P3 21 ms 33 ms
P4 30 ms 2 ms
Fill in the table to show how the tasks are scheduled according to MFQS.
Read the feedback: it has an embedded file with the solution.
Time Slot Task running on processor
0-1 [P1]
1-2 [P1]
2-3 [P1]
3-4 [P1]
4-5 [P1]
5-6 [P1]
6-7 [P1]
7-8 [P1]
8-9 [P1]
9-10 [P1]
10-11 [P2]
11-12 [P2]
12-13 [P2]
13-14 [P2]
14-15 [P2]
15-16 [P2]
16-17 [P2]
17-18 [P2]
18-19 [P2]
19-20 [P2]
20-21 [P1]
21-22 [P3]
22-23 [P3]
23-24 [P3]
24-25 [P3]
25-26 [P3]
26-27 [P3]
27-28 [P3]
28-29 [P3]
29-30 [P3]
30-31 [P3]
31-32 [P4]
32-33 [P4]
33-34 [P1]
34-35 [P2]
35-36 [P2]
36-37 [P2]
37-38 [P2]
38-39 [P2]
39-40 [P2]
40-41 [P2]
41-42 [P2]
42-43 [P2]
43-44 [P2]
44-45 [P2]
45-46 [P2]
46-47 [P2]
47-48 [P2]
48-49 [P2]
49-50 [P3]
50-51 [P3]
51-52 [P3]
52-53 [P3]
53-54 [P3]
54-55 [P3]
55-56 [P3]
56-57 [P3]
57-58 [P3]
58-59 [P3]
59-60 [P3]
60-61 [P3]
61-62 [P3]
62-63 [P3]
63-64 [P3]
64-65 [P3]
65-66 [P3]
66-67 [P3]
67-68 [P3]
68-69 [P3]
69-70 [P3]
70-71 [P3]
71-72 [P3]