You are on page 1of 10

48

CHAPTER 5

DVS SIMULATOR

5.1

INTRODUCTION

DVS is an effective low-power design technique and many DVS


algorithms have been proposed to several commercial variable-voltage
microprocessors, especially targeting hard real-time systems. Although
proposed DVS algorithms are shown to be effective in reducing the energy
consumption of a target system under their own experimental scenarios, these
algorithms have not been quantitatively evaluated under a unified evaluation
framework. In this section, DVS simulator, an integrated simulation
environment for DVS algorithms, which can be used for comparing the
energy efficiency of various DVS algorithms, is described elaborately.

5.2

DESIGN GOALS

The following subsection describes the simulator and the


assumptions made in its design. In order to effectively evaluate various DVS
algorithms under a variety of simulation scenarios, the DVS simulator was
designed to meet the following design goals:

(i)

New DVS algorithms based on different DVS approaches


should be easily integrated into DVS simulator.

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.

As shown in Figure 5.1 DVS simulator (Shin et al 2002) can be


used to compare the energy efficiency of different DVS algorithms using the
same task set 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. DVS simulator can be used as well when
evaluating a given DVS algorithm under various evaluation conditions. For
example, one can evaluate how the energy efficiency of the DVS algorithm
changes with different task sets. A similar evaluation can be performed with
different machine configurations. If properly instrumented, DVS simulator
can collect information on various systems, events or performance parameters
other than energy consumption. These extra profiling data are useful when
understanding how DVS algorithms affect the general behavior of a target
system.

50

Figure 5.1 DVS simulator

5.3

DVS SIMULATOR MODULES

The architectural overview of DVS simulator is shown in


Figure 5.2 and it consists of six main modules.

(i)

The task set generator

(ii) The inter DVS Module


(iii) The task execution module
(iv) Slack estimation module
(v) Energy estimation module and
(vi) Analysis module.

51

Figure 5.2 An architectural overview of DVS simulator

5.4

DVS SIMULATOR INPUTS

DVS simulator takes three inputs:

(i)

A task set specification

(ii) A target machine specification.


(iii) Duration of simulation

DVS simulator requires three inputs; task set specification, duration


of simulation and machine specification. The task set specification describes
various task set characteristics that affect the energy efficiency of a DVS
algorithm

while

the

machine

specification

describes

the

characteristics that affect the energy efficiency of a DVS algorithm.

machine

52
5.4.1

Task set specification

The energy-efficiency of DVS algorithms can be affected by the


characteristics of a given task set such as the number of tasks, the task
execution time distributions and the worst-case execution time (WCET).
Therefore, when evaluating DVS algorithms, it is necessary to understand
how the performance of the DVS algorithms varies depending on task sets
with different characteristics.

In DVS simulator, the characteristics of a task set T : (r1 , r2 ,...rn ) is


specified in a script file that contains the following information on each task
ri of the task set T :

Ti - identifier of ri .

Pi - period of ri .
Di - deadline of ri .

Ci - worst-case execution time (WCET) of ri .

In order to automatically generate a task set with specific


characteristics, the task set generator is used. The task set generator takes
inputs as given in Table 3.1 and generates as an output the corresponding
script file for a task set satisfying the requirements. The task set generator
creates schedulable task sets only under the predefined scheduling policy. For
EDF scheduling, if the worst-case processor utilization of the task set is lower
than or equal to 1.0, the task set is schedulable.

53
5.4.2

Machine specification

A machine specification includes the available voltage and clock


levels of a target variable-voltage processor. The machine specification
reflects the characteristics of the target variable-voltage processor. Using
DVS simulator with the target task sets and DVS algorithms fixed, the DVSrelated architectural exploration is possible in designing variable-voltage
processors. If necessary, other machine specifications are easily supported.

5.5

INTER DVS MODULE

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

S1: Scheduler initialization

S2: Task selection

S3: Task set update

S4: Task execution

S5: End time check

S6: Energy estimation state

S7: Halt state

Figure 5.3 State machine diagram for RT - Scheduling

55
5.6

SLACK ESTIMATION MODULE

The implementation of this module is different depending on how


the target. Inter DVS algorithm estimates the available slack times. This
module is integrated with the Inter DVS module. Some DVS algorithms may
need off-line pre-processing steps for computing total available times during
run time. For these algorithms, the slack estimation module can take off-line
slack analysis results as an additional input.

5.7

TASK EXECUTION MODULE

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.

Second, this module simulates the task execution itself. In this


module, a real workload for each task is generated based on the input
workload variation factors (i.e., distribution), and the unused time as well as
the elapsed time is calculated out of the available time interval. This module
also sends the execution time information and speed information to the energy
estimation module.

56
5.8

ENERGY ESTIMATION MODULE

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

number of execution cycles

Vdd

supply voltage

fi

operating frequency

exetime -

5.9

execution time

ANALYSIS MODULE

This module gets the consumed energy details of various DVS


algorithms from energy estimation module after executing the same task set
generated by task set generator and normalizes their energy consumption
against non RT- DVS scheduling algorithms.

5.10

CONCLUSION

Using C++, a simulator was developed for the operation of


hardware capable of voltage and frequency scaling with real-time scheduling.
It supports all the inter DVS algorithms and it can be used to compare the
energy efficiency of different inter DVS algorithms using the same task set

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.

You might also like