Professional Documents
Culture Documents
in Self-aware Systems
private :
Type Id id ; 4.2 Case Study: Adaptive PABX
Power Mode mode;
List <Thread> threads;
Three components that integrate a digital PABX system
were implemented using the adaptive components infrastruc-
static Hash<Energized, COMPONENTS, Type Id> devices; ture to evaluate our approach in an industrial application:
};
AES, ADPCM, and DTMF. The PABX consists of a commutation
Figure 11: The Energy_Aware aspect responsible for export- matrix that switches connections among different input and
ing the component’s power mode switch methods and the output data channels connected tone generators, tone de-
Energized that controls power mode switch. tectors, and to phone lines. AES implements the Advanced
Encryption Standard (AES) ciphering and inverse ciphering
used for secure communications. ADPCM is an Adaptive Dif-
we performed a case study using components commonly ferential Pulse-Code Modulation (ADPCM) codec commonly
found on Private Automatic Branch Exchange (PABX) tele- used in telephony networks that compresses 16 bit audio sam-
phony systems. The adaptive components infrastructure was ples into 4 bit. Finally, DTMF is a Dual-Tone Multi-Frequency
prototyped on the Epos operating system communication (DTMF) detector that uses the Goertzel algorithm to verify if
framework [11] which already implemented a large part of the a set of audio samples contains the set of frequencies that de-
necessary building blocks. In all experiments, the hardware fine to a tone. The ADPCM is a stateless component while the
platform was prototyped in ZedBoard, a development kit AES, and the DTMF comprise the encryption key and the tone
based on Xilinx’s Zynq-7000, a SoC couples a reconfigurable samples buffer as their state respectively. Despite the sim-
fabric with an ARM Cortex-A9 dual core CPU with several plicity of the studied components, complex algorithms with
peripherals integrated in a single die. The software was com- multiple flavors can encapsulated as adaptive components
piled with GCC 4.4.4 targeting the ARMv7 ISA using level 2 as long as each flavor has the same interface and implement
optimization enabled by GCC’s -O2 flag while the hardware the state handling functions. The reconfiguration process of
was prototyped using Xilinx’s Vivado 14.2 for RTL hard- the studied components including when it is deployed, its
ware synthesis. Xilinx’s Vivado HLS 14.2 was used to obtain overhead, and latency were explored in a previous work [29].
RTL descriptions of the hardware flavors described using UD. Following UD techniques, a software and a hardware flavor
Synthesis constraints were adjusted on Vivado to minimize for each component were generated from the same unified C++
circuit area considering a maximum frequency of operation description [25]. In the software domain, the hardware flavor
of 100 MHz. The CPU clock frequency is 666.666 MHz while is represented by its proxy that dispatches method invoca-
hardware flavors’ clock frequency is 100 MHz. tions to the agent deployed in hardware which is responsible
for invoking the component functionality. Trade-offs regard-
4.1 Adaptive Component Infrastructure ing execution time and hardware resources usage of the three
The execution time overhead due to the adaptive com- components were previously explored [23, 25]. Despite being
ponents infrastructure was profiled for component with a generally faster and consuming less energy than software
Table 1: Memory footprint comparison of an application using adaptive components in the Epos operating system with a
monomorphic component.
Footprint (byte) Overhead (byte) Impact (%)
Mutant Mutant Mutant Mutant Mutant Mutant
Section Monomorphic (one flavor) (two flavors) (one flavor) (two flavors) (one flavor) (two flavors)
Text 12 212 12 504 14 464 292 2252 2.34 15.57
Data 52 52 52 0 0 0 0
BSS 564 564 564 0 0 0 0
Total 12 828 13 120 15 080 292 2252 2.23 14.93
1.2
1.13
1.13
1.12
1.05
1.03
1.03
1.2
1.02
1.02
1.01
1.01
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0.8
0.6
0.4
0.2
0
DTMF DTMF ADPCM ADPCM ADPCM ADPCM AES AES AES AES
detect() detect() decode() decode() encode() encode() decrypt() decrypt() encrypt() encrypt()
(hardware) (software) (hardware) (software) (software) (hardware) (hardware) (software) (hardware) (software)
Figure 13: Normalized execution time for methods member of components with a hardware and a software flavor.
component. On the other hand, a slower method as the sensors specially PMUs.
hardware flavor of AES::decrypt() (4008.00 µs) has a barely
noticeable increase when deployed on a component with two 6. REFERENCES
flavors. [1] N. Abel. Design and implementation of an
Notice that the software flavor of AES::decrypt() when object-oriented framework for dynamic partial
deployed on an adaptive component with a single flavor reconfiguration. In Proc. International Conference on
is slower than on an adaptive component with two flavors. Field Programmable Logic and Applications, pages
Despite being visible in the assembly code generated by the 240–243, Aug. 2010.
compiler that a virtual function call is performed on the [2] J. Ansel, C. Chan, Y. L. Wong, M. Olszewski, Q. Zhao,
latter case implying that a larger number of instructions is A. Edelman, and S. Amarasinghe. PetaBricks: A
executed, we attribute the anomaly to a possible latency language and compiler for algorithmic choice.
hiding mechanism in the Cortex-A9 CPU which employs an SIGPLAN Notices, 44:38–49, 2009.
out-of-order speculative issue superscalar execution 8-stage
[3] W. Baek and T. M. Chilimbi. Green: a framework for
pipeline.
supporting energy-conscious programming using
controlled approximation. SIGPLAN Notices,
5. CONCLUSION 45:198–209, June 2010.
[4] M. D. Berejuck and A. A. Fröhlich. Evaluation of
In this work we proposed a framework for adaptive compo- silicon consumption for a connectionless
nents that can be reconfigured during run-time while keeping network-on-chip. International Journal of Advanced
the same interface. While the syntax and semantics of the in-
Studies in Computer Science and Engineering,
terface are preserved across the different versions, the system 3(11):1–11, 2014.
may at any time pick any of the versions that is better suited
[5] D. Cemin, M. Götz, and C. E. Pereira. Dynamically
for the current execution context. Moreover, task remapping
reconfigurable hardware/software mobile agents. Design
and power mode transition were presented as adaptation
Automation for Embedded Systems, 18(1-2):39–60, 2014.
mechanisms. The framework also supports sensing using
event based notification in which components can leverage [6] K. Czarnecki and U. W. Eisenecker. Generative
sensor data for decision making. Programming: Methods, Tools, and Applications. ACM
Three adaptive components that integrate a PABX were Press/Addison-Wesley Publishing Co., 2000.
evaluated: AES, ADPCM, and DTMF. The execution time of mul- [7] G. De Micheli, C. Seiculescu, S. Murali, L. Benini,
tiple methods of the adaptive components were profiled and F. Angiolini, and A. Pullini. Networks on chips: from
the application size of an application with adaptive compo- research to products. In Proc. Design Automation
nents were measured. Results show that when compared Conference, pages 300–305, 2010.
with their equivalent monomorphic versions, for most cases [8] B. Donyanavard, T. Mück, S. Sarma, and N. Dutt.
the adaptive component presents a small relative memory SPARTA: Runtime task allocation for energy efficient
usage footprint and time overhead on method invocation. heterogeneous many-cores. In Proc. International
This work focus on providing the infrastructure neces- Conference on Hardware/Software Codesign and System
sary for transparently deploying run-time reconfiguration Synthesis, pages 27:1–27:10, 2016.
for computing systems willing to exploit the variations in [9] H. Falaki. Automating Personalized Battery
their environment and adapt to unpredictable application Management on Smartphones. PhD thesis, UCLA,
requirements. We are currently working on general guidelines 2012.
to define when to reconfigure the system or even which is [10] P. Fonseca, R. Rodrigues, and B. B. Brandenburg. SKI:
the best reaction for a particular set of conditions based Exposing kernel concurrency bugs through systematic
on machine learning techniques exploring multiple types of schedule exploration. In Proc. USENIX Symposium on
Operating Systems Design and Implementation, pages IEEE Transactions on Computers, (11):2880–2893, Nov.
415–431, 2014. 2014.
[11] A. A. Fröhlich. Application-Oriented Operating Systems. [26] K. Ostrowski, K. Birman, D. Dolev, and J. H. Ahnn.
Number 17 in GMD Research Series. GMD - Programming with live distributed objects. In Proc.
Forschungszentrum Informationstechnik, Aug. 2001. European Conference on Object-Oriented Programming,
[12] G. Gracioli. Real-Time Operating System Support for pages 463–489, 2008.
Multicore Applications. PhD thesis, Federal University [27] A. Pant, P. Gupta, and M. van der Schaar. AppAdapt:
of Santa Catarina, 2014. Opportunistic application adaptation in presence of
[13] G. Gracioli and A. A. Fröhlich. On the design and hardware variation. IEEE Transactions on Very Large
evaluation of a real-time operating system for Scale Integration Systems, 20(11):1986–1996, Nov. 2012.
cache-coherent multicore architectures. SIGOPS Oper. [28] A. Rahimi, D. Cesarini, A. Marongiu, R. K. Gupta,
Syst. Rev., 49(2):2–16, Jan. 2016. and L. Benini. Task scheduling strategies to mitigate
[14] G. Gracioli, A. Fröhlich, R. Pellizzoni, and hardware variability in embedded shared memory
S. Fischmeister. Implementation and evaluation of clusters. In Proc. Design Automation Conference, pages
global and partitioned scheduling in a real-time OS. 152:1–152:6, 2015.
Real-Time Systems, 49(6), 2013. [29] J. G. Reis, A. A. Fröhlich, and L. Wanner. A
[15] A. J. Hoeller, L. F. Wanner, and A. A. Fröhlich. A framework for dynamic real-time reconfiguration. In
hierarchical approach for power management on mobile Proc. Euromicro Conference on Digital System Design
embedded systems. In Proc. Conference on Distributed (DSD’15), pages 255–258, Aug. 2015.
and Parallel Embedded Systems, pages 265–274, Oct. [30] J. G. Reis, L. F. Wanner, and A. A. Fröhlich. X-ware:
2006. Mutant computing substrates. In Proc. International
[16] H. Hoffmann, S. Sidiroglou, M. Carbin, S. Misailovic, Symposium on Rapid System Prototyping, Oct. 2015.
A. Agarwal, and M. Rinard. Dynamic knobs for [31] S. Sarma and N. Dutt. FPGA emulation and
responsive power-aware computing. SIGARCH prototyping of a cyberphysical-system-on-chip
Computer Architecture News, 39:199–212, 2011. (CPSoC). In Proc. International Symposium on Rapid
[17] A. Lachenmann, P. J. Marrón, D. Minder, and System Prototyping, pages 121–127, Oct. 2014.
K. Rothermel. Meeting lifetime goals with energy levels. [32] S. Sarma, N. Dutt, P. Gupta, N. Venkatasubramanian,
In Proc. International Conference on Embedded and A. Nicolau. Cyberphysical-system-on-chip
Networked Sensor Systems, 2007. (CPSoC): A self-aware MPSoC paradigm with
[18] Y. Li, Z. Jia, S. Xie, and F. Liu. Dynamically cross-layer virtual sensing and actuation. In Proc. of
reconfigurable hardware with a novel scheduling Design Automation and Test in Europe, 2015.
strategy in energy-harvesting sensor networks. IEEE [33] J. Sorber, A. Kostadinov, M. Garber, M. Brennan,
Sensors Journal, 13(5):2032–2038, May 2013. M. D. Corner, and E. D. Berger. Eon: a language and
[19] E. Lubbers and M. Platzner. ReconOS: Multithreaded runtime system for perpetual systems. In Proc.
programming for reconfigurable computers. ACM International Conference on Embedded Networked
Transactions on Embedded Computing Systems, Sensor Systems, 2007.
9(1):8:1–8:33, Oct. 2009. [34] B. Sprunt. The basics of performance-monitoring
[20] M. K. Ludwich and A. A. Frohlich. Proper handling of hardware. IEEE Micro, 22(4):64–71, July 2002.
interrupts in cyber-physical systems. In Proc. [35] M. B. Taylor. Is dark silicon useful? harnessing the
International Symposium on Rapid System Prototyping, four horsemen of the coming dark silicon apocalypse. In
pages 83–89, Oct. 2015. Proc. Design Automation Conference, pages 1131–1136,
[21] H. Marcondes and A. A. Fröhlich. Analysis, 2012.
Architectures and Modelling of Embedded Systems: [36] M. J. Voss and R. Eigemann. High-level adaptive
Proc. IFIP International Embedded Systems program optimization with ADAPT. SIGPLAN
Symposium, chapter A Hybrid Hardware and Software Notices, 36(7):93–102, June 2001.
Component Architecture for Embedded System Design, [37] L. Wanner and M. Srivastava. ViRUS: Virtual function
pages 259–270. 2009. replacement under stress. In Proc. Workshop on
[22] V. M. G. Martins, P. R. C. Villa, H. C. C. Neto, and Power-Aware Computing and Systems. USENIX, 2014.
E. A. Bezerra. A TMR strategy with enhanced
dependability features based on a partial
reconfiguration flow. In Proc. IEEE Computer Society
Annual Symposium on VLSI, pages 161–166, July 2015.
[23] R. S. Meurer, T. R. Mück, and A. A. Fröhlich. An
implementation of the AES cipher using HLS. In Proc.
Brazilian Symposium on Computing Systems
Engineering, pages 113–118, Dec. 2013.
[24] T. Mück and A. Fröhlich. Towards unified design of
hardware and software components using C++. IEEE
Transactions on Computers, 63(11):2880–2893, Nov.
2013.
[25] T. R. Mück and A. A. Fröhlich. Towards unified design
of hardware and software components using C++.