Professional Documents
Culture Documents
CHAPTER 5
DVS SIMULATOR
5.1
INTRODUCTION
5.2
DESIGN GOALS
(i)
49
(ii) Variations in simulation scenarios should be easily supported.
Simulation scenarios can differ, for example, in task
workloads and variations in executed task set specifications.
(iii) Different type of variable-voltage processors (Hong et
al.1998; Ishihara et al.1998; Pouwelse et al.2001) should be
easily supported.
50
5.3
(i)
51
5.4
(i)
while
the
machine
specification
describes
the
machine
52
5.4.1
Ti - identifier of ri .
Pi - period of ri .
Di - deadline of ri .
53
5.4.2
Machine specification
5.5
The Inter DVS module responsible for scheduling tasks plays a role
of a real-time scheduler in a hard real-time system. The priority-based
scheduling can be implemented by maintaining two queues (Shin and Sakurai
2000), one called run queue and the other called delay queue. The run queue
holds tasks that are waiting to run and the tasks in the queue are ordered by
priority. The task that is running on the processor is called the active task. The
delay queue holds tasks that have already run in their periods and are waiting
for their next periods to start again. They are ordered by the time at which
their release is due. When the scheduler is invoked, it searches the delay
queue to see if any task should be moved to the run queue. If some of the
tasks in the delay queue are moved to the run queue, the scheduler compares
the active task to the task at the head of the run queue. It takes as an input a
task specification for periodic tasks and simulates each task based on the
specified scheduling policy (e.g., RM or EDF). The inter DVS module
consists of three sub modules one for estimating available slack times, one for
execution of task and the another one for estimating energy consumed by a
task in a particular invocation. The slack estimation is done by the slack
estimation module, which computes the total available time for the scheduled
task while the task execution module, which determines the operating speed
54
for the scheduled task and simulates the execution of the task and does the
slack distribution. For a new DVS algorithm, these two sub modules should
be redefined. State machine diagram for real time DVS scheduling of the
simulator is shown in Figure 5.3.
Task
Set
Generator
S3
S1
Machine
Details
S2
S4
S6
S5
S7
55
5.6
5.7
This module has two roles. First, it determines the voltage level and
clock speed based on the available time for the current task and the WCET of
the task. Although most existing DVS algorithms employ a greedy approach
in distributing the available slack times, if a DVS algorithm adapts different
slack distribution methods, they can be supported in this module. Using the
available voltage levels specified in the machine specification input, this
module sets the voltage level and clock speed. With the assigned clock speed,
the activated task instance consumes the entire assigned time interval if its
execution takes the WCET.
56
5.8
This module takes the timing and speed information from the Task
execution module and computes the energy consumption of the current task
execution using the current machine specification. Energy consumption is
calculated using,
E N cycle * Vdd2
E exetime * f i * Vdd2
where
N cycle
Vdd
supply voltage
fi
operating frequency
exetime -
5.9
execution time
ANALYSIS MODULE
5.10
CONCLUSION
57
specification under the same machine configuration. Using this evaluation,
one can decide the best DVS algorithm for the given application on the given
hardware platform. It can be used as well when evaluating a given DVS
algorithm under various evaluation conditions. The EDF scheduler without
any DVS support is also simulated for comparison.