<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Resource-Aware Application Execution Exploiting the BarbequeRTRM</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author role="corresp">
							<persName><forename type="first">Giuseppe</forename><surname>Massari</surname></persName>
							<email>giuseppe.massari@polimi.it</email>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Politecnico di Milano DEIB</orgName>
								<orgName type="department" key="dep2">Dipartimento di Elettronica</orgName>
								<orgName type="department" key="dep3">Informazione e Bioingegneria</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Simone</forename><surname>Libutti</surname></persName>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Politecnico di Milano DEIB</orgName>
								<orgName type="department" key="dep2">Dipartimento di Elettronica</orgName>
								<orgName type="department" key="dep3">Informazione e Bioingegneria</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">William</forename><surname>Fornaciari</surname></persName>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Politecnico di Milano DEIB</orgName>
								<orgName type="department" key="dep2">Dipartimento di Elettronica</orgName>
								<orgName type="department" key="dep3">Informazione e Bioingegneria</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Federico</forename><surname>Reghenzani</surname></persName>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Politecnico di Milano DEIB</orgName>
								<orgName type="department" key="dep2">Dipartimento di Elettronica</orgName>
								<orgName type="department" key="dep3">Informazione e Bioingegneria</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Gianmario</forename><surname>Pozzi</surname></persName>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Politecnico di Milano DEIB</orgName>
								<orgName type="department" key="dep2">Dipartimento di Elettronica</orgName>
								<orgName type="department" key="dep3">Informazione e Bioingegneria</orgName>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Fifos</forename><forename type="middle">/</forename><surname>Binder</surname></persName>
							<affiliation key="aff0">
								<orgName type="department" key="dep1">Politecnico di Milano DEIB</orgName>
								<orgName type="department" key="dep2">Dipartimento di Elettronica</orgName>
								<orgName type="department" key="dep3">Informazione e Bioingegneria</orgName>
							</affiliation>
						</author>
						<title level="a" type="main">Resource-Aware Application Execution Exploiting the BarbequeRTRM</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">E3AA6F84077C42E46E7FE80C3D3A91C3</idno>
					<note type="submission">Platform Drivers CPUfreq Resource Manager daemon Platform Proxy Power Manager Application Proxy Resource Manager Scheduler Manager Synchronization Manager Application Manager Resource Accounter Scheduler Policy Synchronization Policy</note>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T12:14+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Energy efficiency and thermal management have become major concerns in both embedded and HPC systems. The progress of silicon technology and the subsequent growth of the dark silicon phenomena are negatively affecting the reliability of computing systems. As a result, in the next future we expect run-time variability to increase in terms of both performance and computing resources availability. To address these issues, systems and applications must be able to adapt to such scenarios. This work provides a brief overview of the Barbeque Run-Time Resource Manager (BarbequeRTRM ) and the application execution model that it exploits, in order to deal with run-time performance and available resources variability.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>The need of resource-aware and adaptive applications is driven by several issues and requirements that are typical of modern computing systems. For instance, embedded mobile devices must deal with the limited energy budget provided by the battery, while HPC centers must afford huge costs due to the power consumption and the cooling of the infrastructure. Furthermore, the dark silicon phenomenon affecting modern processors is becoming prominent <ref type="bibr" target="#b0">[1]</ref>, since it is increasing the amount of silicon area that must be turned off, to guarantee the power envelope of the processor. For all these reasons, a continuous and full usage of the whole set of system computing resources is often impossible to achieve.</p><p>On the application side, we can gain efficiency by implementing suitable adaptive behaviors like enabling/disabling the execution of a task, or scaling the accuracy of the output depending on the availability of computing resources. A run-time resource management framework can implement such approach by constraining the resource allocation according to system level requirements or runtime conditions, and providing to the applications suitable interfaces to check and negotiate the resource assignment.</p><p>Fig. <ref type="figure">1</ref>. The BarbequeRTRM Architecture. On top the programming languages supported by the application Run-Timr Library (RTLib). In red the resource manager core, on top of the support provided by the Linux OS to control the system resources.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Run-time Resource Management</head><p>The BarbequeRTRM is a modular and portable run-time resource manager targeting both embedded and High-Performance Computing (HPC) systems. From the hardware resources perspective, the framework can manage homogeneous and heterogeneous multi-core processors, as well as heterogeneous systems including devices characterized by completely different ISA (e.g., CPU and GPU).</p><p>The modularity of the BarbequeRTRM comes from a software architecture in which we can distinguish between core components and plugin modules. Typically, the latter are platform-specific extensions and selectable resource management policies.</p><p>The portability instead, is guaranteed by the exploitation of some underlying Linux operating system frameworks, like cpufreq and cgroups, that allows the BarbequeRTRM to enforce the resource allocation decisions <ref type="bibr" target="#b1">[2]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2.1">Abstract Execution Model</head><p>The resource manager exposes its services to the applications through a run-time library (RTLib). The library accomplishes a two-fold objective: 1) to provide a Fig. <ref type="figure">2</ref>. Abstract Execution Model communication channel between the resource manager and the applications; 2) to expose an execution model to support the implementation of the resourceaware adaptive execution of the applications <ref type="bibr" target="#b2">[3]</ref>.</p><p>In Figure <ref type="figure">2</ref> we show the Abstract Execution Model (AEM), that the run-time manageable applications must implemented accordingly. This execution model is put in place by defining and implementing a suitable C++ class, derived from the BbqueEXC class provided by the RTLib.</p><p>At run-time, the BbqueEXC member functions are called by a control thread, which is responsible of synchronizing the application execution with the decisional process of the resource manager. The rationale behind each member function implementation is the following: onSetup(): setting up the application (initialize variables and structures, starting threads, . . . ). onConfigure(): check the amount of assigned resources and configure the application accordingly. onRun(): single cycle of computation (e.g., computing a single frame during a video encoding). onMonitor(): performance and QoS monitoring. onRelease(): cleanup and termination code.</p><p>Therefore, once the application ends the initialization step (onSetup), the control thread waits for the resource allocation decision coming from the Barbe-queRTRM. As soon as it has been received, the onConfigure function is called. In this function, the application can then check the amount of assigned resources, and configure itself accordingly, before starting (or continuing) the execution, as sketched here below. The functions onRun and onMonitor are then sequentially called and executed in a loop, until the entire computation is over.</p><p>The RTLib estimates the current performance of the application, in terms of cycles-per-second (CPS), such that the application could check the gap between the required performance level and the one currently achieved. After that, the application can notify the resource manager about this gap.</p><p>Considering also that the performance goal can vary depending on input data and external events, a effective approach is to exploit the SetCPSGoal function to specify the performance goal and the notification rate, as shown in the following example of onMonitor implementation: RTLIB ExitCode t BlackscholesEXC : : onMonitor ( ) { // S p e c i f i c e v e n t c o n d i t i o n t r i g g e r i n g t h e // change o f performance r e q u i r e m e n t s i f ( . . . ) SetCPSGoal ( 2 . 5 , 1 0 ) ; // . . . }</p><p>In the example, the application sets a performance goal of 2.5 CPS, and a notification rate of 10 cycles. The library keeps track of the application performance, computing the average CPS value over a (configurable) number of last execution cycles. Whenever the performance gap overcomes a given (configurable) threshold, such a gap value is sent to the resource manager. As a consequence, the amount of assigned resources can be adjusted accordingly. The notification rate is then exploited to bound the application reconfiguration rate, and hence the related overhead. In other words, the application asks the resource manager to send back a reconfiguration request after not less than 10 execution cycles or more.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Experimental Scenario</head><p>In this section we show results of the resource-aware adaptive execution of blackscholes from the PARSEC benchmark suite <ref type="bibr" target="#b3">[4]</ref> on a embedded development board that features an ARM Cortex A9 dual-core CPU. The benchmark has been properly modified to fit the Abstract Execution Model. The frequency of the CPU has been set to its maximum value, which is 920 MHz. The full CPU usage, which is shown in Figure <ref type="figure">3a</ref>, causes the chip temperature to raise over 100 • C, thus triggering the thermal throttling response of the operating system.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>RTLIB</head><label></label><figDesc>ExitCode t BlackscholesEXC : : onConfigure ( i n t 8 t awm id ) { // Get t h e number o f CPU c o r e s a s s i g n e d GetAssignedResources ( RTLIB ResourceType : : PROC NR, n r c p u ) ; // C o n f i g u r e . . . }</figDesc></figure>
		</body>
		<back>
			<div type="annex">
<div xmlns="http://www.tei-c.org/ns/1.0"><p>A continuous frequency scaling is operated in order to cool down the CPU, with performance variability as a further consequence.</p><p>In Figure <ref type="figure">3b</ref>, the application sets a performance goal of CPS=1. The resource manager takes into account such information shrinking the amount of CPU time assigned. The implicit result is a lower but more stable performance level, along with a reduced thermal stress.</p></div>			</div>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">Dark silicon and the end of multicore scaling</title>
		<author>
			<persName><forename type="first">H</forename><surname>Esmaeilzadeh</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Blem</surname></persName>
		</author>
		<author>
			<persName><forename type="first">R</forename><surname>St</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Amant</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Sankaralingam</surname></persName>
		</author>
		<author>
			<persName><surname>Burger</surname></persName>
		</author>
		<idno type="DOI">10.1145/2000064.2000108</idno>
		<ptr target="http://doi.acm.org/10.1145/2000064.2000108" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 38th Annual International Symposium on Computer Architecture, ser. ISCA &apos;11</title>
				<meeting>the 38th Annual International Symposium on Computer Architecture, ser. ISCA &apos;11<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2011">2011</date>
			<biblScope unit="page" from="365" to="376" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<analytic>
		<title level="a" type="main">Effective Runtime Resource Management Using Linux Control Groups with the BarbequeRTRM Framework</title>
		<author>
			<persName><forename type="first">P</forename><surname>Bellasi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Massari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Fornaciari</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">ACM Transactions on Embedded Computing Systems (TECS)</title>
		<imprint>
			<biblScope unit="volume">14</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page">39</biblScope>
			<date type="published" when="2015">2015</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Combining application adaptivity and system-wide resource management on multi-core platforms</title>
		<author>
			<persName><forename type="first">G</forename><surname>Massari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">E</forename><surname>Paone</surname></persName>
		</author>
		<author>
			<persName><forename type="first">P</forename><surname>Bellasi</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Palermo</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Zaccaria</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Fornaciari</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><surname>Silvano</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS XIV), 2014 International Conference on. IEEE</title>
				<imprint>
			<date type="published" when="2014">2014</date>
			<biblScope unit="page" from="26" to="33" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">The PARSEC benchmark suite: characterization and architectural implications</title>
		<author>
			<persName><forename type="first">C</forename><surname>Bienia</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Kumar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><forename type="middle">P</forename><surname>Singh</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Li</surname></persName>
		</author>
		<idno type="DOI">10.1145/1454115.1454128</idno>
		<ptr target="http://doi.acm.org/10.1145/1454115.1454128" />
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 17th international conference on Parallel architectures and compilation techniques, ser. PACT &apos;08</title>
				<meeting>the 17th international conference on Parallel architectures and compilation techniques, ser. PACT &apos;08<address><addrLine>New York, NY, USA</addrLine></address></meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="72" to="81" />
		</imprint>
	</monogr>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
