7.1 In what way are the first-come—first-served and shortest job next algorithms fair?
7.2 Why are these algorithms not suitable for real-time systems?
7.3 First-come—first-served may be most suitable for some client-server models; however, suppose that
there are significant differences between the times it takes to service the different clients. What could you
do if you can predict the service time of an incoming request for a service and
1. there is only one server, or
2. there are multiple servers.
7.3 The initialization of a server requires that seven tasks be executed where some tasks must be in
specified orders and some tasks have deadlines. Use timeline-scheduling to create an acceptable schedule
of these algorithms. Do not interrupt any of the tasks:
Task
1
2
3
4
5
6
7
Run-time
(ms)
1.2
0.7
0.5
0.4
0.9
1.1
0.6
Deadline
Dependencies
(ms)
1
1
1
5.0
2, 3
4.0
4
4
7.4 Define the earliest-deadline first algorithm for selecting a task.
7.5 How could you modify the earliest-deadline first algorithm if there are dependencies, as suggested in
Question 7.3?
7.6 Is the set of tasks in the following table schedulable using earliest-deadline first (EDF) scheduling?
Task
1
2
3
4
5
Run-time
(ms)
1.3
0.6
0.5
0.7
0.2
Deadline
(ms)
1.5
2.0
2.5
3.0
3.5
7.7 Why are we guaranteed that the set of periodic tasks (with their worst-case computation time and
periods) in the following Table is schedulable using EDF scheduling?
Task
1
2
3
4
ck
(ms)
3
2
3
4
k
(ms)
11
12
15
20
7.8 Suppose we have an additional task that must have a period of 14 ms. What is the longest its worstcase computation time can be?
7.9 Suppose we have an additional task that has a worst-case computation time of 5 ms. What is the
shortest period that task could have?
7.10 Suppose you had a set of tasks that were divided into hard, firm and soft real-time. If the hard realtime tasks do not overload the system but the inclusion of the firm and soft real-time tasks od overload the
system, how would you decide which tasks to execute?
7.11 Describe two techniques for determining the worst-case execution time.
7.12 How could you determine the worst-case execution time of the following piece of code? The worstcase run-time of the functions is given in the comments.
void f() {
if ( condition ) {
g(); // 35 ms
}
do {
h();
// 1 ms
if ( condition ) {
i(); // 25 ms
break;
}
} while ( condition );
j();
// 4 ms
}
Suppose that it is known that the loop will run at most 6 times. What is the worst-case execution time?
7.12 What is the criteria for rate-monotonic scheduling?
7.13 RM scheduling bases the priority on the length of the period. Could you come up with a scheduling
algorithm based on the worst-case execution time?
7.14 The LPC1768 microcontroller allows you change the clock speed of the processor. Suppose that you
had a system that had twenty periodic and sporadic tasks for which the utilization was 0.035 when the
system clock is at a maximum and you are using RM scheduling. What could you do to reduce the cost
of the deployment of your system?
7.15 Suppose you have a system that is schedulable using RM scheduling and the clock rate on the
microcontroller is only at 50 % of the maximum clock speed, but a decision has been made to use a realtime garbage collection service similar to Metronome which must run for 1 ms every 10 ms. What is the
simplest solution to incorporating this scheduler?
7.16 Is the set of tasks with utilizations 0.3, 0.16, 0.15, 0.12 and 0.02 guaranteed to be RM schedulable?
7.17 Schedule the tasks in the following table for a period of 100 ms.
Task
1
2
3
4
5
ck
(ms)
3
4
3
3
1
k
(ms)
10
25
20
25
50
7.18 Schedule the tasks in the following table using EDF and RM scheduling.
Task
1
2
3
4
ck
(ms)
4
3
2
2
k
(ms)
20
15
15
10
7.19 Suppose the periods were reduced by 20 % in Question 7.18. Again, attempt to schedule the tasks
using both EDF and RM scheduling.
7.20 Find the maximum integer value of n such that this set of three tasks is schedulable using EDF and
RM scheduling, respectively.
Task
1
2
3
ck
(ms)
3
2
n
k
(ms)
8
10
12
7.21 If we were to implement EDF scheduling using priorities, it would be necessary to continually
modify those priorities. Suppose that we have the following three tasks:
Task
1
2
3
ck
(ms)
1
3
5
k
(ms)
5
8
12
Initially, Tasks 1, 2 and 3 would have priorities 0, 1 and 2, respectively. How would these be updated if
over time to ensure the highest propriety task (lowest value) is the one with the earliest deadline?
In the case of a tie, there are two scenarios:
1. If a task is running and another task becomes ready, but they both have the same deadline, keep
running the same task; and
2. If two tasks have the same deadline but currently none is running, you may choose either one.
7.22 In EDF and RM scheduling, if a task is currently running and another task with the same deadline or
priority becomes ready, why would it be easier to keep the current task running?
7.23 Consider the following overloaded system:
Task
1
2
3
4
ck
(ms)
1
3
6
8
k
(ms)
5
10
10
20
What is the expected behavior if these are scheduled with EDF scheduling? What is the expected
behavior if they are scheduled using RM scheduling?
7.24 Suppose that you have the following system which you would like to schedule with RM scheduling;
however, the utilization is close to unity. How could you do to schedule these?
Task
1
2
3
4
ck
(ms)
1
2
3
4
k
(ms)
4
9
12
18
Could you adjust the periods to 4, 8, 12, 16? Could you adjust the periods to 5, 10, 10, 20?
7.25 Suppose that a sensor created a single value every 10 ms, and a task was responsible for reading this
value every 10 ms. In this case, the task should likely use a period of k = 10. Suppose that it was
necessary—to ensure a harmonic periods—to change the period to k = 9? Consider this under the
following circumstances:
1. the sensor has only one register and
a. the task has the highest priority, versus
b. the task is one of the lower priority tasks; versus
2. the sensor has two registers in which it can store a previous not-yet-read value.
© Copyright 2026 Paperzz