Discuss the disadvantages of using a central scheduling algorithm

advertisement
Distributed Systems – Chapter 18 – Scheduling
Project - Homework Questions and Answers
1. Discuss the disadvantages of using a central scheduling algorithm in a distributed
system. [Easy]
-
Communications bottleneck at the node of the scheduler since all nodes must
communicate with it
Central point of failure. If the node of the scheduler goes down, entire scheduling
system breaks.
Lots of message passing since all nodes must keep scheduler node up to date with
information
2. Why can’t dynamic scheduling in distributed real-time systems guarantee timeliness?
[Easy]
For dynamic scheduling in distributed real-time systems, the evaluation of
timeliness is based on probability models and observations. Assumptions about
input distributions are also based on probability models. Rare events may occur
which will generate behavior that the models did not predict. Evaluations based
on observations cannot predict such events either since by definition, these events
are rare and cannot be observed with any known frequency or pattern.
3. In a masking protocol, why is it necessary to send k+1 copies of the same message in
order to tolerate k transient faults? [Easy]
In order to tolerate k transient faults, you need to send k+1 copies of the message
since k transient faults means that k messages are lost. Having just k copies would
not guarantee that the message makes it to the receiver successfully. Having the
extra 1 message guarantees that even after k transient faults, the message makes
it to the receiver.
4. For the protocols in the class of Positive Acknowledgement or Retransmission (PAR),
how does the protocol detect transient faults and permanent faults? [Med]
PAR protocols require the receiver to send an ACK back to the sender to verify
that the receiver has received the message. If the sender does not get an ACK
back, it retransmits the message to the receiver. If the sender then gets an ACK
back from the receiver, the sender knows that a transient fault occurred. If after
several retransmissions the sender still has not gotten an ACK, it can deduce that
there is a permanent fault.
5. When is dynamic scheduling more resource efficient than static scheduling? When is it
less resource efficient than static scheduling? [Easy]
If the system is generally under low loads, then dynamic scheduling is more
efficient since resources are freed immediately after a task completes rather than
after a maximum time period as in static scheduling.
If the system is generally under near peak loads, then static scheduling is more
efficient since a system under near peak loads will have tasks that run near the
maximum execution time. There is also little overhead during run-time. Dynamic
scheduling would incur massive overhead during run-time to try and determine
how to schedule the current task set. The run-time overhead directly competes
with the task set for the resources on the system.
6. How are sporadic tasks different from aperiodic tasks? [Med]
Sporadic tasks are tasks that have unknown request times. However sporadic
tasks must have a minimum interval between two request times of a task.
Aperiodic tasks are also tasks that have unknown request times. However,
aperiodic tasks have no time constraints between two requests of a task.
7. Why is it not possible to calculate static schedules if the number of tasks needs to be
dynamic?
Static schedules are calculated off-line using full knowledge about the tasks. If the
number of tasks in that schedule were to be dynamic, a compile-time generated
schedule would fail once the number of tasks changes since the schedule is based
on a fixed number of tasks. If you were to assume that you had multiple compile
time schedules, like those in the Mode Changes model, then it is theoretically
possible to generate multiple schedules. The problem with this assumption is that
the number of tasks could increase or decrease by any amount, which means an
infinite amount of possible schedules. Also, if the system had to generate that
many schedules at compile-time, the system would spend a lot of time just trying
to generate schedules, rather than running the tasks.
8. In the Rate Monotonic Algorithm, explain why assumption 6 does not assume μ  1 in
the general case. [Hard]
The Rate Monotonic Algorithm is a dynamic preemptive scheduling algorithm
based on static task priorities. The algorithm is designed for single CPU systems.
This means that the CPU is responsible for both the execution of the tasks, as well
as the run-time generation of the schedule. Since the scheduler has to compete
with the tasks for computation time on the CPU, μ can never be 1.
Download