ISKE2017 Short or Regular Paper

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 6

Fuzzy Multiprocessor Architecture Reconfiguration

based on Dynamic Frequency Scaling


Ben Ahmed Samir
Najar Yousra University of Tunis el Manar,
University of Tunis el Manar, Faculty of Science, Mathematics, Physics and Natural of
High Institute of computing (ISI), Tunis Tunis (FST), Tunis, 2092, Tunisia;
1002, Tunisia; Samir.Benahmed@fst.utm.tn
Yousra_najar@yahoo.co.in,yousra.najar@isi.utm.tn

Abstract— Multicore systems are rapidly immerging as a new Fuzzy Inferencing (apply implication method), Aggregation of
paradigm for integrating both high performance systems and all outputs and Defuzzification.
embedded applications. A large field of research focuses now on
reconfigurable multicore architecture in order to find optimal The use of fuzzy logic to optimize the configuration of
solutions for improved performances such as energy hardware architecture was adopted because it offers some
consumption. A Perfect system would be able to create a balance advantages. First, detailed complex modeling of the system is
between optimum resources allocation and a particular not needed and human logic knowledge is captured. Second, it
workload. The dynamic frequency scaling has been a key offers easily adaptative and light weight design support
technique in exploiting the hardware configurable characteristics system.
of processors. However, for large class of applications in
embedded real time systems, the variable operating frequency This paper describes the contribution of the approach in
interferes with their deadline guarantee. In this paper, a novel three main parts: The first paragraph is a state of art about
fuzzy logic technique is presented to optimize real time system dynamic frequency scaling in multiprocessing architecture and
feasibility and energy consumption in multicore architecture about fuzzy logic in embedded systems. The second part is
based on operating frequency scaling. Tested on different dedicated to the proposed fuzzy technique architecture
periodic task sets generated with different system charges the presentation. Finally, simulation and results are detailed.
proposed technique is an intelligent decision aid system that
studies schedulability and energy consumption aware. II. RELATED WORK
Keywords— multi-core architecture; fuzzy logic; operating In real time embedded systems like portable medical
frequency; feasibility;energy consumption devices and cellular phones, where tasks must be completed
by some specified deadlines, most reconfiguration algorithms
I. INTRODUCTION and techniques do not consider real time constraints and are
based on solely average computational throughput [4].
In recent year, there has been a rapid and wide spread of
non traditional computing platforms, especially mobile and A. Fuzzy Logic and Embedde Systems
portable computing device. Embedded systems typically have
to fulfill timing constraints that are related to their application An objective of fuzzy logic has been to make computers
domain and usage scenarios. Constraints are usually specified think like people, fuzzy logic can deal with vagueness intrinsic
as the deadline to perform specific functions. Therefore, to human thinking and natural language [3]. Using fuzzy logic
embedded designers must be able to evaluate which design algorithms could enable machines to understand and respond
alternatives can fulfill those constraints and guarantee real to vague human concepts without having an exhaustive
time behavior. mathematical model. Almost every application, including
embedded control applications, could reap some benefits from
Simulation based techniques can be used to evaluate fuzzy logic. Its incorporation in embedded systems could lead
whether a particular MPSOC platform architecture is able to to enhanced performance, increased simplicity and
meet the timing constraints of an application. To guarantee the productivity.
best hardware adaptation, this paper proposes a fuzzy logic
reconfiguration technique to search a balance between power The use of heuristic based methodologies to design space
consumption and real time system schedulability. optimization for MPSoC involves the knowledge of processor
characteristics in order to converge toward a final solution.
A fuzzy inference system (FIS) is a system that uses fuzzy Qadri in [1][2] presented a fuzzy based reconfiguration for
set theory to map inputs into outputs. FIS uses a collection of MPSoc that takes into consideration energy consumption and
fuzzy membership functions and rules, instead of Boolean throughout of the real time system. This work argues the
logic, to reason about data. The functional operations in fuzzy advantages of integration fuzzy inference system that
expert system proceed in the following steps: Fuzzification, calculates the number of cores and the operating frequency. In
close loop architecture (fig ) the DSE is reconfigured until the Assuming a specified frequency scaling factor α (0<α≤1)
system is stabilized. simple static DFS condition given by (1) becomes:

Usys = C1/T1+ C2/T2 + C3/T3 + …… Cn/Tn ≤ m×α (3)


B. Dynamic Frequency Scaling (DFS) in Multiprocessor
Architecture While applying these settings, observe that scaling the
Significant research and developpement efforts have been operating frequency by a factor effectively results in the worst
made to study voltage and frequency scaling in MPSOC case computation time needed by a task being scaled by a
architecture. Many DFS algorithms are used to raise factor 1/α while the desired period and deadline remains
architecture performances. Typically, they use a simple unaffected. Many research papers treated this static frequency
feedback mechanism, such as detecting the amount of idle scaling in order to create a balance between feasibility test and
time on processors over a period of time and then adjust the architecture performance
frequency and voltage to just optimize computational load.
The main idea of these studies is about avoiding wasting III. RECONFIGURABELE FUZZY SYSTEM
cycles by reducing the operating frequency which optimizes The proposed algorithm is closed–loop architecture that
energy consumption. However, they cannot provide any tries to find a feasible solution of real time periodic model.
timeliness guarantees and real time tasks may miss their Being enable to have a mathematical model that reflects all the
deadlines. In fact, these algorithms are tightly-coupled with information given bellow, fuzzy logic could be the solution
operating system’s task management services, since the that will control the design of DSE using linguistic terms.
dynamic selection of DFS must be coupled to task
computation time [4]. The main challenge is to guarantee that
A. System Model
the deadlines will not be violated when frequency is reduced
to decrease energy consumption. 1) Real time application model
The techniques outlined in this work assume the classic In this paper, we assume a periodic task model. In this
model of real time system in which a set of periodic tasks that model, each task Γi=(ri1, Ci, Ti, Di) is characterized
are characterized with release time ri, period Ti, deadline Di respectively by its first release time ri1, its computation time
and WCET (worst case computation time) Ci. As in classical Ci, its period Ti and its deadline Di. Further, we focus our
treatments of the real-time scheduling problem [4], the relative attention on implicit deadline task system (Ci<Ti=Di ). A task
deadline is assumed to be equal to period i.e a task must Γi invokes a series of jobs, each separated from its predecessor
complete its execution before the next release of the task. by Ti time units. We also assume that a single job of a task
Given that the worst case computation time is supposed to cannot be executed in parallel. We let n denote the total
be the time needed by the task to complete its charge in number of tasks in the system and Γn is a set of the n periodic
maximum operating frequency, a real time scheduler allocates independent tasks. The kth activation date of job Γik is defined
processor time to the task in such way that it respects its as rik= ri1 + (k-1).Ti. This instance (job) of the task Γi must
deadline. In this section, we try to establish a relationship respect its relative deadline dik=rik + Di .
between operating frequency and system shedulability. A
2) Configurable multiprocessor architecture
system is schedulable when all its tasks respect their deadline
The proposed MPSoC is comprised of 16-core symmetric
under designed architecture and specific real time scheduler.
chip multiprocessor platform based on the Intel x86
Many schedulability tests where associated with several
architecture, employing a shared memory architecture. The
schedulers. Being identified as optimal scheduling algorithm
platform incorporates L1 and L2 caches. The number of active
for this kind of real system, EDF is priority based scheduler.
cores and the processor frequency/voltage can be adjusted
For a set of n periodic tasks, when we assume that the both for energy consumption optimization. Table 1. details
platform is composed of m identical unit-capacity processors MPSoC processors characteristics.
and that Usys is system utilization, system feasibility is
assured if this sufficient and necessary condition (1) is TABLE I. SYSTEM PARAMETERS
satisfied [9]:
Intel x 86
Parameter Value
Usys = C1/T1+ C2/T2 + C3/T3 + …… Cn/Tn ≤ m (1) Number of cores [1..16]
Processing frequency [16 20 25 33]Mhz
Worst case computing time is number of cycle needed by Operating voltage [2.0 2.2 2.4 2.7]V
the task under maximum operating frequency to achieve its Dynamic Energy Consumption [13.1 15.4 18.7 22.9] nJ
execution. A frequency scaling factor α is defined (2) :
The energy consumption and voltage/frequency
information was obtained from Intel 486 GX embedded
freq=[f1, f2, …..fmax] , α=fi/fmax with fi in freq (2)
processor datasheet [7]. This particular architecture was
chosen because our study is situated in homogenous and
symmetric multicore architecture which will reduce the Fuzzy membership functions
number of rules in fuzzy system. TERM verylow := (-1, 0) (0, 1) (0.3, 1) (0.635, 0);
TERM low := (0.284, 0) (0.62, 1) (0.84, 1) (0.986, 0);
The processor energy consumption per cycle is denoted Ed TERM good := (0.9, 0) (0.954, 1) (1.02, 1) (1.04, 0);
when we suppose that static energy is negligible. We suppose TERM high := (0.098, 0) (1.23, 1) (30, 1) (32, 0);
that our model doesn’t need memory access or pipeline.
Energy consumption of the whole system will be calculated in TABLE III. ED MEMEBERSHIP FUNCTIONS
multiplying Ed by the number of cores. Fuzzy membership functions
TERM Verylow := (0.554, 0) (0.57, 1) (0.588, 0);
TERM Low := (0.66, 0) (0.67, 1) (0.69, 1);
Esys = (Ed1 + Ed2+……..+ Edm ) (4) TERM Medium := (0.78, 0) (0.81, 1) (0.84, 0);
TERM High := (0.97, 0) (1, 1) (2, 0);

B. Fuzzy Architecture Reconfiguration TABLE IV. FI MEMBERSHIP FUNCTIONS


The main idea of the proposed architecture is to take
Fuzzy membership functions
advantage of fuzzy logic to avoid the establishment of a model TERM VL := (15, 0) (16, 1) (17, 0);
describing the exact relations between input and output TERM L := (19, 0) (20, 1) (21, 1);
parameters. As shown in fig. 1, it’s a classic feedback control TERM M := (24, 0) (25, 1) (26, 0);
system which is governed by the real time schedulability test. TERM H := (32, 0) (33, 1) (34, 0);
The system is stabilized when the system charge is around
one. 2) Rule base and Deffuzzification
To establish relationship between the input variables and
output parameters, fuzzy logic rules were defined. There are
standard criteria for the definition of the rule base. Some logic
facts led us to the rule base detailed in table 5 which are:
When the system utilization Un is inferior to one then we
could decrease the operating frequency trying to minimize
energy consumption and the number of idles. Working with
lower frequencies must respect schedulabiliy test. When Un is
superior to one the operating frequency is increased until it
reaches one. If the system charge doesn’t allow it the feed-
back module will augment the number of cores until
stabilization.

Fig. 1. Closed Loop Reconfiguration system TABLE V. RULE BASE


Fuzzy rule base
The fuzzy system involves: input and output variables
R1: IF U IS verylow AND Ep IS Verylow THEN freq IS VL;
identification, associating variables with appropriate R2: IF U IS verylow AND Ep IS Low THEN freq IS VL;
membership functions, formulating rule base and R3: IF U IS verylow AND Ep IS High THEN freq IS M;
defuzzification. R4: IF U IS low AND Ep IS Low THEN freq IS VL;
R5: IF U IS low AND Ep IS Medium THEN freq IS L;
1) Input and Output Varibles identification and R6: IF U IS low AND Ep IS High THEN freq IS M;
fuzzification R7: IF U IS good AND Ep IS Verylow THEN freq IS L;
The number of parameters were identified that can be R8: IF U IS good AND Ep IS Low THEN freq IS M;
R9: IF U IS good AND Ep IS Medium THEN freq IS H;
modified dynamically in a reconfigurable MPSoC where they R10: IF U IS good AND Ep IS High THEN freq IS H;
are considered as control variables of the close loop R11: IF U IS high AND Ep IS Verylow THEN freq IS M;
architecture. Input variables are: Un=Usys/m×α which is R12: IF U IS high AND Ep IS Low THEN freq IS H;
normalized system utilization that would reflect schedulability R13: IF U IS high AND Ep IS Medium THEN freq IS H;
test and Esys which is normalized energy consumption. The R14: IF U IS high AND Ep IS High THEN freq IS H;
fuzzy system output is the operating frequency. All cores will
run through the same frequency. The number of cores is The output of the inference system is crisp value after
calculated in the feedback module.
defuzzification. Many defuzzification method are used such as
Four linguistic variables were associated with the input centroid, mean and thresholds. In this work, Centroid (Center
and output variables. Which could be explained by the fact of gravity) method was adopted.
that the system have four scaling operating frequency.
Trapezoidal membership functions were associated with each
linguistic variable, as detailed in table II, III and IV.

TABLE II. UN MEMBERSHIP FUNCTIONS


Simulation system
Periodic Task Random generation
Number of tasks Usys
Set method
Set 4 100 4.77 Rand fix sum

Fig. 2. 2-D representation of the frequency variations within fuzzy system

The fact that the membership functions were centered on


scaling values of normalized energy consumption and
operating frequencies explains the fig. 2 variations. In fact,
there are four stages for the operating frequency: When the
system charge load is not important the operating frequency is
at the minimum scaling value otherwise it rises from stage to
another depending on energy consumption state.

3) Implementation in python
The fuzzy logic engine was implemented using python 3.4
conforming to TCE 61131-7 standard [7]. The free Fuzzy
logic module (Fuzzython) is an open source class library
which is optimized for faster response. System total energy
was calculated as the sum of each processor core energy
supposing that the application tasks don’t need cache. The
(a)
whole application class diagram is illustrated with fig. 3.

(b)
Fig. 4. Number of iterations result
Fig. 3. Class Diagram of the application developped in python
The main emphasis of the proposed fuzzy reconfiguration
technique is to assure balance between energy consumption
IV. SIMULATIONS AND RESULTS and system schedulability. However, mainly it represents
In order to perform the proposed architecture evaluation, a Decision Support System (DSS) for real time applications
task generator was used to generate a set of periodic tasks with periodic tasks feasability studies. The rule base was
within fixed total system load charge (random values with written while given schedulability test priority over energy
fixed sum). Task periods are generated with log-uniform consumption.
distribution between 1 and 1000. In order to fulfill our aims, the proposed algorithm starts
the iteration 0 with initial parameters i.e number of cores
TABLE VI. SIMULATION SETS (m=1), operating frequency (fi=fmax=33MHz), normalized
energy consumption (1) and total system utlization Usys
Simulation system calculated from the task model.
Periodic Task Random generation
Number of tasks Usys
Set method It begins modifying the configurable parametrs and it
Set 1 10 1.33 Rand fix sum completes the system configuration in two cases: the system
Rand fix sum utilisation is equal to one or it stays unvariant. The number of
Set 2 30 25.6 iterations needed to stabilise the system depends on real time
Set 3 60 14.066 Rand fix sum application number of tasks and on system utilisation value. In
fig 4. (a) (b), we could notice that the final configuration on the fuzzy system is unvariant and the application stills
the most important set (Set 4 with 100 tasks) needed 17 non schedulable the algorithm rises the number of
iterations which prooved that it stabilises quickly. Both the cores. It could be noticed that when set of periodic
system utilisation and the number of tasks affects tasks has important utilisation factor (Set 3 and Set 2)
proportionnaly the number of iterations. all cores are used with maximum operating frequency
scaling. The system is then stabilized with (m=16 and
fi=33 MHz). Our system is therefore not feasible under
this architecture (see fig. 6).

Fig. 6. Number of cores variation with total system load


(a)
The decision support system is mainly responsible of
system feasibility guarantee then it takes care of energy
consumption. Let’s take the case of Set 2 (n=30 and
Usys=25.6): After 17 iterations, the system utilization with 16
cores and operating frequency equal to 33 MHz becomes 1.60.

(b)
Fig. 5. Energy Consumption results
Fig. 7. Set 2 Results : n= 30 and Usys= 25.6
The impact of these iterations configuration on individual
To maintain this result simulation scheduling within
parametres is discussed as bellow:
Global EDF, Global LLF, EDZL and Pfair algorithms on Set 2
 Energy Consumption : It is abvious that fuzzy were done conserving the Worst case computing time as the
algorithm gives importance to system feasibility rather charge needed by each task.
than optimizing energy consumption. Whith every
In another hand, when considering task periodic Set
value of m the fuzzy inference looks for the most
number 1 with n=10 and Un=1.33, the fuzzy reconfiguration
appropriate operating frequency which influences
system is stabilized after 5 iterations:
directly the energy consumption. Fig 5. Gives an
abvious conclusion about the correlation of the mean
energy consumption with the number of used cores in TABLE VII. RECONFIGURATION OF SET 1 (USYS=1.33)
one hand and with the importance of system utilization. Reconfiguration Results for Set 1
 Number of Cores : Initiated at 1, the number of iteration
Un m Ep fi (MHz)
required cores is directly affected with system (Normalised)
utilization. When the operating frequency calculated by 1
0 1.33 1 33
Reconfiguration Results for Set 1 [9] Baker TP, Cirinei M, ‘A necessary and sometimes sufficient condition
for the feasibility of sets of sporadic hard-deadline tasks’, In:
iteration Proceedings of IEEE real-time systems symposium (RTSS), pp 178–
Un m Ep fi (MHz)
(Normalised) 190, 2006.
1 1.33 2 1 FIS = 33

2 0.683 2 0.81 FIS = 25

3 0.888 2 0.67 FIS = 20

4 1.01 2 0.81 FIS = 25

5 0.88 2 0.81 FIS =25

In this case the RT-application is schedulable with two


processor m=2 and energy consumption is optimized when all
processors are executed with fi=25MHz. The scheduling of the
Set 1 tasks must be done with computing Time multiplied by
1/α=0.75 .

V. CONCLUSION
In this paper a novel reconfiguration fuzzy based algorithm
for multicore architecture is presented. The proposed
technique was used to find an overall balance between the
feasibility of RT periodic application and energy consumption
of the multicore architecture. A higher priority was attributed
to system feasibility while writing the algorithm. It was
developed using python and Fuzzython module. The
simulation was executed in a multiprocessor run time
developed that we develop on python.
The results discussed bellow showed the capability and
usefulness of the detailed methodology especially when the
system utilization doesn’t exceed 27. Therefore, it can be
concluded that the proposed reconfigurable fuzzy logic can
produce an overall good performance where there is no need
for exhaustive mathematical model. However, it will be
interesting to study the effect of cache size and associativity
on shedulability test.

References

[1] M.Y. Qadri et al., “Fuzzy logic based energy and throughput aware
design space exploration for MPSoCs, “ Microprocess. Microsyst. J.
Clerk Maxwell, A Treatise on Electricity and Magnetism, 3rd ed., vol. 2.
Oxford: Clarendon, 1892, pp.68-73, 2015.
[2] M.Y. Qadri et al., “Energy and throughputs aware fuzzy logic based
reconfiguration for MPSoC,“ Journal of intelligent and fuzzy systems.
(), 3rd ed., vol. 2. Oxford: Clarendon, 1892, pp.68-73, 2014.
[3] A. Ibrahim, Fuzzy Logic for Embedded Systems Applications,
Butterworth, Heinemann, Newton, MA, USA, 2003.
[4] Jorg Henkel and , Designing Embedded Processors: A lower Power
Perspective, Springer., 2007.
[5] Nicolat Navet and Bruno Grajar, Systemés temps réel, Hermes, 2006.
[6] Thiago R. da Rosa, Vivian Larrea, Ney Calazans, Fernando Gehm
Moraes: Power consumption reduction in MPSoCs through DFS, SBCCI
2012, 1-6.
[7] Intel, Embedded Ultra-Low Power Intel486? GX Processor Datasheet,
Intel
[8] IEC, International Standard: Programmable Controllers – Part 7: Fuzzy
Control Programming, International Electrotechnical Commission,
Geneva, Switzerland, iEC Standard, 2000.

You might also like