Towards Overhead-Free Interface Theory for Compositional Hierarchical Real-Time Systems

A significant amount of research has been conducted in the past on compositional real-time scheduling as it has become a useful foundational theory for real-time operating systems and hypervisors. However, compositional frameworks suffer from abstraction overhead in composing components. In this paper, we decompose the abstraction overhead into: 1) supply abstraction overhead associated with the supply from a resource provider and 2) demand abstraction overhead associated with the component workload. Then, we provide sufficient conditions for each abstraction overhead to be eliminated. In addition, this paper provides a heuristic technique that transforms a component to satisfy the sufficient conditions so that the abstraction overhead can be minimized. In experiments, we show that our technique outperforms two prior overhead-reducing techniques. The reduction in overhead is about 10% on average when compared to a technique that uses a single global period and about 8% on average when compared to a technique based on harmonicity.

Model-checking-based schedulability analysis techniques were presented in [5] and [7], but they are prone to the well known state-explosion problem.A simulation-based schedulability validation tool, called SymTA/S, was presented in [8] and [9] presents model-based Hypervisor analysis.A schedulability analysis paradigm based on network calculus, called real-time calculus, was proposed in [6].A similar approach based on arrival rate functions was proposed in [10].However, none of the above frameworks abstract component demand into representative real-time tasks (i.e., interface tasks), and therefore incur high analysis complexity.For the same reason, these frameworks are not suitable for compositional analysis of multilevel HSS developed under the open systems paradigm, because higher-level components cannot use scheduling models based on real-time tasks to allocate resource to subcomponents.
Compositional framework (CF) overcomes the above challenges, and presents an efficient component-based analysis paradigm.This framework is well suited for open systems because components can be independently developed and analyzed under it.Studies in CF have been developed along several directions: new resource models for characterizing resource supply on single and multicores [11]- [16], optimization for improving system efficiency [3], [17]- [20], shared-resource communication [21], cache-aware scheduling and implementation overheads, etc.A resource model of CF is an abstraction of supply from a component or hardware platform and an interface of CF is an abstraction of demand of a component.They are prone to abstraction overhead, i.e., the resource is under-utilized due to these abstractions.In the following motivating problem, we give an example of this under-utilization.

A. Motivating Problem
Let us consider an OS-Hypervisor operating two virtual machines using the scheduling algorithm rate monotonic (RM), as shown in Fig. 1(a).The virtual machines schedule tasks using RM and earliest deadline first (EDF), respectively.Here, the system can be modeled by CF using a periodic resource model (PRM) [18], which provides resource periodically to subcomponents.Since the framework considers the worst-case for resource supply, PRM computes sufficient resource budgets of C 1 and C 2 as 3 units for 4 time units (I 1 = (4, 3)) and 5 units for 8 time units (I 2 = (8, 5)), respectively.In this case, the resulting CF does not provide a feasible solution.However, it is easy to see that the system 0278-0070 c 2018 IEEE.Personal use is permitted, but republication/redistribution requires IEEE permission.
See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.is schedulable due to the harmonic property of resource and task periods, as shown in Fig. 1(c).
Note that the periods of C 1 and C 2 's workloads and those of their interfaces are harmonically related to each other.Based on this observation, one could develop a more efficient composition framework.For example, Kramer et al. [22] observed that around 1000-1500 runnables of automotive applications can be divided into ten groups, each of which uses a common period and these group periods are mostly harmonic with each other.It turns out that tasks in a group using the same period benefit from the harmonicity.The above observation motivates this paper such that the harmonicity property is explicitly introduced in CF, even when a component workload is not inherently harmonic, for improving resource utilization of HSS.
To improve resource utilization of HSS, Easwaran et al. [3], [13] introduced a new resource model, called explicit deadline period (EDP) resource model, by extending the PRM of Shin and Lee [12] and Shin et al. [15] with a deadline.Although the EDP model reduces supply abstraction overhead (SAO), it does not eliminate it completely, and further the proposed framework does not consider demand abstraction overhead (DAO).Chen et al. [20] proposed a technique to use the same global period for every interface and thus eliminated abstraction overhead from intermediate (nonleaf) components.However, they did not take into account the increase in runtime overhead such as context switches, which arises due to the use of a common period that must be smaller than or equal to the smallest period of component tasks [23].Recently, Guo et al. [24] presented how to apply harmonicity in independent scheduling components to remove interface abstraction overhead, wherein component tasks adjust their periods to be harmonic with the component interface.However, they have not shown how to apply harmonicity hierarchically in dependent components of HSS, i.e., components in a parent-child relationship.
We have observed that the regularity in execution pattern of harmonic interface tasks makes the resulting resource supply more efficient so that its worst-case starvation interval (WCSI) is halved when compared to an equivalent generic PRM (based on nonharmonic interface tasks) [12].Based on this key observation, this paper presents a novel CF, where a demand abstract is developed to represent a component's demand completely independent from any resource model.From an analysis of the root cause of abstraction overheads in CF, we present sufficient conditions to remove these overheads.Using these sufficient conditions, we then present a CF, called HSS-Sync (HSSS), wherein no abstraction overhead is incurred.In addition, we present how to utilize this CF for HSS with nonharmonic tasks in components.To our best knowledge, this paper is the first to utilize harmonicity property for the reduction of abstraction overhead in CF.The contributions of this paper can be summarized as follows.
1) We analyze the root causes of abstraction overheads in CF and identify sufficient conditions to eliminate both demand and SAOs.2) We develop an overhead-free CF based on the harmonicity property.3) We develop algorithms to approximate nonharmonic tasks using harmonic tasks and to generate harmonic interfaces for components.These algorithms enable the application of above CF for components with nonharmonic tasks in their workload.

B. Organization
Section II presents the underlying model and problems that we address in this paper.In Section III, we present sufficient conditions to remove demand and SAOs.Section IV provides a new CF, called HSSS.We also show how to apply HSSS to components comprising nonharmonic tasks such that the abstraction overheads are minimized.In Section VI, we compare our framework with various existing abstraction overhead reduction techniques in CF.Section VII discusses the lessons from this paper and concludes this paper.

II. BACKGROUND AND PROBLEM FORMULATION
This section presents the setting and definitions of the underlying system, and the problem that we address in this paper.

A. Background
An HSS consists of components in a tree structure.A component C = (W, A) is composed of a workload W, a set of tasks, and an algorithm A. A parent component encloses child components, i.e., subcomponents.The HSS defines supply demand (parent-child) relations between a task τ i of W and a subcomponent C. A parent component delegates a task to run a subcomponent, meaning that the subcomponent's execution depends on the task.We use the implicit periodic task model τ (p, e) for workloads, where p is the period and e is the worst-case execution time [25].A task is called elementary task if it is mapped to no subcomponent.Similarly, a component enclosing only elementary tasks is called an elementary component or leaf component.U W and U τ i represent utilization of workload W and utilization of a task τ i , respectively.
A resource model captures a resource supply pattern.For instance, the PRM, ( , ), supplies units of resource every time units [12].The resource model is used as an underlying model for the resource supply task as well as the component interface.The resource supply task of a parent component provides resource to a child component.The component interface represents a collective resource requirement of the component's workload.In this paper, we use a periodic interface I(P, B), which denotes that the interface I requires B resource units every P time units.
We use the harmonicity property of real-time tasks [26] to develop the new CF.For this purpose, we define the following two functions.
Definition 1 (Harmonic Tasks): For tasks τ i and τ j H τ i , τ j = 1 if p i mod p j = 0 ∨ p j mod p i = 0 0 Otherwise.
Two tasks τ i and τ j are said to be harmonic if and only if H(τ i , τ j ) = 1.For notational convenience, we overload H so that it can also be used with resource model ( , ).That is, H( , τ ) = 1 if and p are harmonic.
Definition 2 (Harmonic Workload): A workload W is harmonic if every pair of tasks in W is harmonic, i.e.,

B. Problem Formulation
The principle of compositional schedulability analysis is to abstract the details of a component with its interface and then use interfaces to reason about the composition of components.In general, to ensure schedulability analysis, an interface over-approximates the demand of a component.The amount of such over approximation is called abstraction overhead.The problem addressed in this paper is how to minimize the abstraction overhead.
This paper presents a new periodic abstract demand, based on the periodic task model [25], which is independent from any resource model.We then analyze the overhead of this periodic demand abstraction (PDA) and present techniques for its minimization.In contrast, component interface computation takes into account a specific resource model in existing CFs, so the interface includes overhead depending on resource models [13], [15].As part of the goal of minimizing abstraction overhead, this paper aims to separate demand and supply abstractions and their overheads, so that we can explicitly divide the causes of overheads in CF, address them individually, and make our CF faithful to the open system principle, e.g., independent component analysis.
This paper is based on the following assumptions.
1) The HSS is an open system, where the analysis of a component must be independent of other components.
2) The demand and supply are not synchronized, thus the supply could occur when there is no demand, i.e., a demand task is not scheduled to execute.3) This paper uses the periodic task model [25] for both demand and supply abstractions.This paper identifies the root causes of the abstraction overheads and proposes ways to eliminate them.More specifically, we answer the following questions. 1) How can we achieve an ideal supply for a periodic supply model (Section III-A)?2) What are sufficient conditions to remove the overhead of a PDA (Section III-B)? 3) How can we utilize the ideal periodic resource supply model and the sufficient conditions to remove the DAO for any given component (Section V)?
III. OVERHEAD OF COMPOSITIONAL FRAMEWORK This section discusses two types of abstraction overheads as the demand of a component is abstracted by an interface and the supply is abstracted by a resource model.Each abstraction results in overhead for HSS since it is necessary to do extra resource provisioning to ensure schedulability.We note that there are other causes of overhead, e.g., context switching by interleaved execution of components, cache misses and loading, etc.This paper focuses on the overheads due to demand and supply abstractions, and hence the other overheads are out of scope.

A. Supply Abstraction Overhead
Since we assume that the demand and supply are not synchronized, Fig. 2 shows when the worst-case supply delay of PRM [12] happens.In Fig. 2, the demand for time duration t arrives just after the supply of the previous period of ( , ) has finished.Furthermore, the supply of ( , ) is delayed in the current period for − , because it is preempted by other components.This worst-case starvation of PRM is known to be 2( − ) [15], which happens because the demand and supply are not synchronized.For the EDP resource model [13], WCSI is + − 2 , where is the deadline of the periodic supply, because EDP guarantees that the delay in supply is at most .
Since the WCSI for ( , ) decreases with its period , one way to reduce WCSI is to use a smaller period, which becomes proportional sharing in the limit.We denote this processor sharing by ( , ).Since processor sharing is not realizable in practice, we present an alternative characterization, which can be used to identify a set of tasks where we can achieve minimal WCSI.We next define an ideal PRM (IPRM) as follows.
Definition 3: For a given period and execution time , an IPRM, denoted by H( , ), is a PRM that guarantees resource units in any time interval of duration .
Note that WCSI of IPRM H( , ) is − .For given ( , ), if the demand and supply are not synchronized, then IPRM has a minimal WCSI among all PRMs as the delay of − cannot be avoided in the worst case.The supply bound function (sbf) of IPRM is defined as follows (from [13]): We now define the SAO as follows.
Definition 4 (SAO): For a PRM ( , ) and a time interval t, the SAO of is the difference between worst-case supplies of ( , ) and ( , ).
For a PRM , the SAO is computed by PRMs may result in different SBFs for the same period and budget parameters, depending on their properties.For instance, the PRM of [12] and IPRM result in different sbfs.
A resource model with less SAO makes more tasks feasible, and hence is desirable.For instance, Fig. 3 shows the SAOs of IPRM H(10, 3) and PRM (10,3).The shaded region shows that IPRM is more resource efficient than PRM.In the following, we present sufficient conditions for a PRM to be an IPRM for a given period .Now, let us discuss how to implement IPRM.The static partitioned resource model [11] guarantees a fraction of resource supply with a bounded delay.In this model, the supply pattern identically repeats in each period.Thus, the first sufficient condition to obtain an IPRM from a PRM is related to the regularity of the periodic supply.We define a regular PRM as follows.
Definition 5: A PRM ( , ) is regular if it provides resource at the same time instants in every supply period. 1ased on the regularity of ( , ), we have a sufficient condition for a PRM to be an IPRM as presented in the following lemma.
Lemma 1: If a PRM ( , ) is regular, it is an IPRM.Proof: Let supply( , t 0 , t) compute the amount of resource supplied by during [t 0 , t 0 + t], i.e., an interval t starting at t 0 .For ( , ) and 0 < t i ≤ and n ∈ N >0 , supply( , (n−1)• , t i )+supply( , (n−1)• +t i , −t i ) = by definition.For any two consecutive periods of a regular , the model supplies resource such that supply( , (n − 1) − t i ) = .Hence, a regular always provides resource units for any time interval .Thus, is an IPRM.Now, we present a sufficient condition to enforce a PRM to be regular.Under RM, tasks with harmonic periods are scheduled at the same points in each period.If harmonic tasks are scheduled under EDF and their ties are identically broken, then each task also executes at the same points in each period.Thus, a PRM implemented by a task under the above harmonic conditions is regular if the PRM is serving the top (root) component fully utilizing resources.
For instance, the resource supply tasks τ 1 and τ 2 in Fig. 4 are harmonic, and hence the corresponding resource models are regular.Then, components C 1 and C 2 supplied by tasks τ 1 and τ 2 can, respectively, utilize as much resource as the individual resource utilizations of τ 1 and τ 2 .
In the following lemma, we provide conditions for a resource supply task τ i to become regular when it is supplied resource by a nonroot parent component using regular PRM .For instance, τ 3 in Fig. 4 is regular since τ 1 supplying resources for C 1 enclosing τ 3 is also regular.
Lemma 2: Consider a regular resource model ( , ) supplying resources to workload W. For each τ i ∈ W, τ i is regular if Proof: Since W is harmonic, the best-case and worstcase response times of each task τ i is e i + k∈HP(i) e k /p i , where HP(i) is the set of tasks whose priority is higher than τ i .The resource supply of regular is proven to be an IPRM from Lemma 1.So the delay in its resource supply is always the same in each supply period.Suppose that the supply delay of is .The best-case and worst-case response times of each task τ i supplied by must then be equal to e i + k∈HP(i) e k /p i + .
Note that Lemma 2 is applicable to resource supply tasks.Fig. 4 shows that all resource supply tasks are harmonic in each component, and hence their supplies satisfy the conditions of IPRM.C 1 enclosing τ 3 and τ 4 is supplied by τ 1 .Then, τ 3 and τ 4 supply resources to C 3 and C 4 .Since τ 1 , τ 3 , and τ 4 are harmonic, the supply tasks τ 3 and τ 4 satisfy the conditions of IPRM.

B. Demand Abstraction Overhead
We define a PDA D(P, E), based on the periodic task model [25].Our goal is to determine when it does not incur supply related overheads like WCSI.It is defined as follows.
Definition 6 (PDA): For a workload W under scheduling algorithm A, (P, E) is said to be a PDA, denoted by D(P, E), if, whenever a resource supply can schedule D, it can also schedule W.
PDA is a supply independent interface, while the existing interface models rely on a resource supply model.Hence, it is free from any resource-model-dependent overhead.Now, we define bandwidth-DAO (bDAO) of a PDA in terms of its resource utilization.For a workload W and a PDA D(P, E), the bDAO is defined by O bdem (W, D) = U W −E/P.A PDA with no bDAO is said to be zero-bDAO.Now, we propose how to remove bDAO.In [17], it is shown that a workload under EDF scheduled by a resource supply is schedulable if the component interface period divides the workload periods and the total utilization of the workload is less than or equal to that of the resource supply.We apply this condition to remove bDAO from the PDA abstraction of a workload scheduled under EDF.
Lemma 3 (From [17]): For a workload W scheduled under EDF, a PDA D(P, E) is zero-bDAO if Now, we present a condition to eliminate bDAO from the PDA abstraction of a workload scheduled under RM.It has been shown that a harmonic task set scheduled under RM can make full use of resources [26].The following lemma uses this to show that if all the tasks in a workload are harmonic with each other and the PDA, and the PDA has the same resource utilization as the workload, then the PDA has no abstraction overhead.
Lemma 4: For a harmonic W scheduled under RM, a PDA D(P, E) is zero-bDAO if Proof: Since W is scheduled under RM and harmonic, it requires resources at the rate of U W . Since ∀τ i ∈ W, H(τ i , P) = 1, ∀τ i ∈ W, (p i /P) ∈ N. τ i requires the amount (e i /p i ) • P of resource in every period P. Hence, W requires the total amount τ i ∈W (e i /p i ) • P of resource in every period P. Let E = τ i ∈W (e i /p i ) • P.Then, W requires (E/P) amount of resource in every period P. Thus, D(P, E) sufficiently represents the total resource requirement of W if W is harmonic and U W = (E/P).

C. Composition Overhead-Free Components
In this section, we present sufficient conditions that HSS has no abstraction overheads.For given PDA and IPRM, we present conditions that an interface I is generated such that it satisfies PDA and IPRM satisfies I without loss of resources.Interface and PDA are both workload demand abstracts and subject to bDAO.However, the interface differs from the PDA in that it depends on a resource model of its parent component.Thus, a (better) component interface can be computed after its parent component's resource model is known.We present conditions for a workload schedulable by a PDA to be also schedulable by an interface when a IPRM is given.For a given IPRM, H( , ), a PDA schedulable by this IPRM satisfies the following conditions.
Lemma 5: A PDA D(P, E) is schedulable by IPRM H( , ) if where k ∈ N >0 for the following reason.Since Now, we prove the lemma as follows.k Since (E/P) = (k /k ) holds as shown in Fig. 5, D is schedulable by H.
To generate an interface I with zero-bDAO, we have the following theorem and corollary.

IV. HIERARCHICAL SCHEDULING SYSTEMS WITH SYNC
In this section, we show how an HSS free from abstraction overheads and component scheduling overheads is built, depending on scheduling algorithms RM and EDF.

A. Harmonic Composition of Component Under RM
We now discuss the abstraction of a component scheduled under RM such that the composition has no abstraction overhead.First, we define a harmonic component as follows.
Definition 7: A component with a PDA D(P, E) is harmonic if the task periods in its workload and the PDA's period are harmonic.
As indicated in Theorem 1, a PDA or an interface I is zero-bDAO if E = P • U W or B = P • U W .Let us assume that an IPRM H( , ) provides resources to a harmonic component.If the parameters of H are identical to D of the component, we can say the component abstraction incurs no abstraction overhead or is overhead-free.Thus, the following lemma presents overhead-free composition of a component under RM scheduling algorithm.
Lemma 6: For a given component C with RM scheduling algorithm, if the resource model H(P, E) is an IPRM and D(P, E) is harmonic with the workload, then the interface I(P, E) has no abstraction overhead.
Proof: Since a PDA D(P, E) is harmonic with the workload, the PDA is zero-bDAO.If the same parameter (P, E) is used for H, D, and I, then they satisfy the three conditions of Theorem 1.
The interface I derived from the zero-bDAO PDA is called harmonic interface.

B. Divisible Composition of Component Under EDF
A harmonic component scheduled under EDF can achieve overhead-free composition using Lemma 6.However, in the case of EDF, we can use the divisible constraint rather than the stricter harmonic constraint for abstraction overhead elimination.As indicated in Theorem 1, a divisible interface produces no DAO if E = P • U W under EDF.Thus, the following lemma presents overhead-free composition of a component under EDF.
Lemma 7: For a given component C scheduled under EDF, if the resource model H(P, E) is an IPRM and D(P, E) is divisible with the workload, then the interface I(P, E) has no abstraction overhead.
Proof: Since the PDA D(P, E) is divisible with the workload, the PDA is zero-bDAO.If the same parameter (P, E) is used for H, D, and I, then they satisfy the three conditions of Theorem 1.
The interface I derived from the zero-bDAO and divisible PDA is called divisible interface.

C. Overhead-Free Hierarchical Composition
This section presents an overhead-free CF with harmonic or divisible components.We first show the following conditions.
1) If the interface of a component under RM is harmonic or the interface of a component under EDF is divisible, then the interface is zero-bDAO.2) If a resource model is a resource supply task of a harmonic component, then the resource model becomes an IPRM with no SAO.Then, if a CF satisfies the above two conditions, it has no abstraction overhead.
For example, the system in Fig. 4 meets the harmonicity condition for RM components and the divisibility condition for EDF components.Note that the resource model of an EDF component with a divisible interface is not an IPRM.In Fig. 6, the component C 2 is a divisible component.The tasks τ 5 and τ 6 of C 2 may not be IPRMs because they may not be regular under EDF.
Lemma 8: If each component in a hierarchical system is harmonic and the resource supply is the same as the interface, the composition has no abstraction overhead.
Proof: The proof is direct from Theorem 1, since = P and = B for resource supply H( , ) and interface I(P, B).
In Lemma 8, since the harmonicity condition includes the divisibility condition, it applies to any component with either RM or EDF.We call such an HSSS and use it for composing components with nonharmonic tasks.
The next problem is how to make all component interfaces satisfy the above two conditions of HSSS.For a given hierarchical system, only task information and the hierarchical structure are initially provided.In most cases, a workload is not harmonic.Hence, in the following section, we describe a method to derive interfaces for such components with the purpose of minimizing the abstraction overhead using HSSS.

V. COMPOSITIONAL FRAMEWORK-SYNC FOR NONHARMONIC TASKS
This section discusses how arbitrary periodic tasks can be approximated to an HSSS so as to remove abstraction overheads of intermediate components.In particular, we present: 1) an adaptation (proximation) of a nonharmonic component to a harmonic component and 2) an algorithm that determines an interface period such that it is harmonic with the underlying component's workload.

A. Proximation of Nonharmonic Workload Tasks
For a nonharmonic task set, we dedicate a periodic resource server [27] to each task.We call the dedicated periodic server proxy task and denote it by v( , ).A given task can run only when the associated proxy task runs.In our framework, we force the proxy tasks in a component to be harmonic with each other and the component interface as well, so that the interface incurs no abstraction overhead and becomes an IPRM.Lemma 9 presents a computation that creates a proxy task v( , ) for a given task.
Lemma 9 (Budget for Proxy Task): For a given task τ (p, e) and period , the resource demand of the proxy task v( , ) is computed by where p = k + α.
Proof: Note that a proxy task serves a single task.The demand of this single task is represented by dbf EDF (W, t) = τ i ∈W t/p i e i [18].Given a task τ (p, e) and an IPRM H = ( , ) such that ∃t ≤ p, dbf EDF ({τ }, t) = sbf IPRM (H, t), let p = k + α.Then, there are two cases depending on the value of α: 0 ≤ α ≤ − [case of Fig. 7(a)] and − < α ≤ [case of Fig. 7(b)].For each case, is computed as follows.
Case 1 (0  Fig. 8 shows the mappings from tasks (τ 7 , . . ., τ 12 ) to the corresponding proxy tasks (v 7 , . . ., v 12 ).We call such a creation of proxy tasks proximation in this paper.Creating a proxy task for a given task may cost an overhead, called proximation overhead, which is defined as U τ i − U v i .While the abstraction overhead of a PRM-based CF is incurred by every component, the proximation overhead is incurred only by tasks in leaf components.Using numerical analysis and simulation experiments in Section VI, we show that the proximation overheads in our approach are much smaller than the component abstraction overheads of existing approaches.

B. Harmonic Interface Generation
This section presents an algorithm that determines interfaces of components and proxy tasks for a given system.The challenging issues in deriving interfaces are: 1) to meet harmonicity requirements of interface periods and 2) to reduce proximation overheads.The component interface's period should be harmonic with all the workload tasks' periods.In addition, proxy tasks in leaf components must also be harmonic with each other.This harmonicity condition leads to no abstraction overheads in the resulting hierarchical system.
The proximation overhead depends on the proxy task period which can be any number less than or equal to the original task's period.We prefer a larger period for the proxy task that is close to the original task's period to avoid implementation-related overheads (e.g., context switching and interrupt handling [20]).
The first step of the algorithm is to decide the base period for harmonic composition of the system.When we derive the interface of a component, the period of the interface should be harmonic with both its workload tasks and the interfaces of other sibling components.This base period, denoted as h base , can be any number between one and p min /2 , where p min is the smallest task period in the system.This range is selected because the resulting abstractions would not need more resources than the corresponding original tasks [20].
Since the component interface is derived from the workload, the generation procedure is accomplished from leaves to the root component in the component hierarchy graph.Fig. 9 shows the pseudo-code of deriving a component interface.We use the depth-first-search mechanism to compute the interface, so that the function findCompInterface calls itself recursively if the workload task is a component (Line 3-4).For example, the function call of findCompInterface (H, C 0 ) in Fig. 8 determines the interfaces of components in the sequence The function findProxyTaskInterface determines the proxy task of a task in a leaf component.For each period from one to half of the task's period, we test the harmonicity with the given set H of periods.If a period is harmonic, we calculate the required budget for the proxy task using (4).Thus, the function selects the minimum-utilization proxy task interface among harmonic periods.For example, for a given h base = 9, possible proxy task periods of task τ 7 are 1, 3, 9, and 18.Since the proxy period 9 results in minimum utilization, the proxy task of τ 7 is determined as v 7 (9, 1).Once the proxy task of a task or the interface of a component is determined, the next proxy task or component interface period should be harmonic with the period of the recently computed proxy task or interface.For example, when the proxy task period of v 9 in Fig. 8 is determined as 27, the proxy task period of task τ 10 should be harmonic with 9 and 27.Thus, we add the new proxy task or interface period in the set of harmonic periods H C (line 7 of Fig. 9).When the function findProxyTaskInterface is called for task τ 10 , for instance, the harmonic period set H is given by {9, 27}.The possible proxy task periods less than half of the period of τ 10 are 1, 9, 27, 54, 81, and 108.The algorithm selects one among these possible harmonic periods.
When all the tasks or subcomponents in a component workload have determined their proxy tasks or interfaces, the component interface can be determined easily.The interface period becomes the minimum among the periods of proxy tasks or interfaces in the workload.Since we need the interface period to be harmonic with the workload, the minimum period satisfies this condition (line 9 of Fig. 9).The execution time of the interface is determined by the utilization of the workload (line 10 of Fig. 9).
We derive all the interfaces by calling the function find-CompInterface with the root component and the base harmonic period.Since the algorithm searches all positive integer-valued periods less than half of a task or interface period, the proposed algorithm runs in pseudo-polynomial time.

C. Utilization Bound Computation in Using Proxy Tasks
We now analyze the utilization bound (UB) of a component under the proposed framework.First, we derive the UB of a proxy task which guarantees the schedulability of a given task in a leaf component.Then, we extend it to the UB of a component workload.
Lemma 10 (Proxy Task UB: UB v ): A task τ i (p i , e i ) is schedulable by a proxy task v i ( i , i ), if where )t, which denotes the linear function passing through the point (k i + ( i − i ), k i ) as shown in Fig. 10.Then, for Since dbf A ({τ i }, p i ) = e i for any scheduling algorithm A, the demand of the task at time p i is less than or equal to the resource supply by the proxy task, which guarantees the schedulability of the task.Now we extend the proxy task UB in Lemma 10 to a workload as shown in the following theorem.
Theorem 2 (UB of a Workload: UB W ): A workload W is schedulable by IPRM H( , ), if where Proof: In the proposed framework, we assign a proxy task v i ( , i ) for each task τ i ∈ W. Since all proxy tasks have the same period as the interface period, the component becomes harmonic so that there is no composition overhead among and v i 's.Now, let = 1 + 2 + . . .+ n , where each . Then, such a proxy resource distribution satisfies (6).Suppose that the component workload with such a proxy resource allocation is not schedulable.However, each task is schedulable by the proxy task ( i , i ) according to Lemma 10 because Therefore, this contradicts the assumption that the workload is not schedulable.

VI. PERFORMANCE EVALUATION
In this section, we compare the proposed CF with other overhead-reducing frameworks for hierarchical real-time systems.Specifically, we consider the following frameworks.
2) PRM with a single global period (PRM-single) [20]: Every interface is given a single period, which is less than or equal to p min , the smallest task period in the system.3) A combination technique-harmonic component by using period-shrinking (PRM-sync-Trans): Components are harmonic and task periods are shrunken to be harmonic with interface periods.4) Our technique (PRM-sync-Proxy).The third scheme extends [24] to compose independent components into a system with harmonic interface periods.We adopt a simple harmonic transformation of tasks based on period-shrinking for the third scheme.

A. Composition Overhead of Independent Components
In this comparison, we want to show the efficiency of the proposed proximation-based composition approach.The proposed framework of this paper does not produce any abstraction overheads in intermediate components, but the proximation overhead incurred by leaf components remain.For this reason, we show the efficiency of proximation by comparing the resource UB of our approach against those of a PRM-based CF for a single component.
Since the resource bound in (6) depends on individual task utilizations, we analyze it in two ways.First, we analyze it under the assumption of individually identical task utilization (i.i.t.u.).Second, we measure the average resource bound for randomly generated task sets.
If we assume that each task has the same utilization, (6) becomes (k + 1)U W /(k + U W /n), where k = min τ i ∈W k i and n is the number of tasks in W. We can then compare the resource bound of the proximation-based CF against that of PRM under RM and EDF based on the in [18].Fig. 11 shows the resource bounds of three schemes when n = 4.The results for other n show a similar pattern.
The proposed scheme generally shows lower resource bound in lower utilization.As k increases, the resource bounds of the proposed scheme performs better than PRM-RM and becomes close to PRM-EDF.In the case of k = 1, the proposed scheme under i.i.t.u. is worse than PRM-RM (PRM under RM).It is because the component overhead of the proposed technique is the sum of proximation overheads of individual tasks and a large interface period (k = 1) increases each proximation overhead of tasks.
Next, we analyze the resource bounds for randomly generated tasks.We generate n tasks for each workload utilization range, where n is randomly selected from 2 to 6. Individual task utilization is generated using a normal distribution with mean U W /n and standard deviation 50% of the utilization range (i.e., 0.05).We also randomly select k from 1 to 10.We measure the average resource bounds of 500 random task sets   for each utilization range and show the results in Fig. 12(a).The resource bound overhead of Fig. 12(b) is obtained using (UB W − U W )/U W for a given resource bound UB W .
The resource bound of the proposed scheme performs better than PRM when the workload utilization is less than about 70%.However, for higher workload utilizations, the proposed scheme has higher resource bounds than PRM-EDF.This is because the resource bound of the proposed scheme depends on individual task proximation overheads, as shown in Fig. 12(b).

B. Composition Overhead
In simulation experiments, we use a system structure with the depth of three as in Fig. 13.Each leaf component has three tasks, resulting in a system that contains eighteen tasks in all.The task period is randomly generated between p min and p max for each component as shown in Table I.
For a given system utilization range of [U min , U max ], we generate each task period and execution time such that the total utilization resides in the range.As shown in Fig. 14, we varied the utilization range from 0.2 to 0.6 in an interval of 0.05.We define the utilization overhead as the difference between the top-layer workload utilization by composition and the actual utilization of eighteen tasks.For each utilization range, we generate 100 task sets and measure the average overhead.requirement between leaf components and their proxy tasks.Since PRM-sync-Trans incurs more overhead than PRM-sync-Proxy, task proximation seems to be more efficient than just reducing task periods for harmonicity.

C. Runtime Overhead of HSS
The smaller the interface period, the more is the runtime overhead such as context switch and scheduling [23].For instance, the common period of PRM-single [20] needs to be smaller than or equal to p min of the system, implying that it may induce frequent context switches.The proxy task of our framework also imposes such a runtime overhead.So this section compares the runtime overhead of the proposed technique against prior techniques.We only counted the number of context switches of components per time unit in simulations, since context switches are one of the major runtime overheads.Fig. 16 shows the average number of context switches of four schemes.PRM-single has many context switches due to the small interface period.On the contrary, PRM-sync-Trans shows the least context switch overhead.Since PRM-sync-Proxy has an additional layer due to task proximation, it shows more context switch overhead than PRM-sync-Trans, but still significantly lower than PRM-single.

VII. CONCLUSION
OS-Hypervisor engineers can better utilize resources using our technique as follows.
1) OS-Hypervisor can better utilize the resources by using harmonic interfaces.2) If the host system manages the virtual system to be harmonic, regardless of host's scheduling algorithm, it can guarantee / bandwidth of resource supply for the virtual system's resource request of ( , ). 3) If the host system running EDF manages the virtual system to be divisible, it can guarantee / bandwidth of resource supply for the virtual system's resource request of ( , ).This paper discussed two abstraction overheads of prior CF and presented sufficient conditions to remove these overheads.In addition, we provided novel techniques and algorithms that allow tasks to be composed in an HSS with low overheads.We showed that our technique reduces overhead by about 10% on average when compared to a technique that uses a single global period and by about 8% on average when compared to a technique based on harmonicity.
Our proximation technique is not optimal since the base period of harmonic periods is randomly selected such that it is less than the minimal period among all workload tasks.In the future work, we plan to devise an algorithm to compute optimal harmonic periods of components and investigate how to reduce the overheads when applying the proposed technique in practical systems.

Fig. 15
shows the utilization overhead in each component of PRM and PRM-sync-Proxy.Since PRM does not consider intermediate component overheads, it generates additional composition overhead in C 1 and C 2 as shown in Fig. 15.The proposed framework removes all intermediate composition overheads, so C 1 and C 2 in Fig. 15 has solid bars.Note that PRM-single is also a special case of the proposed framework because all components use a common period, resulting in harmonicity.Another improvement comes from the reduction of overhead in leaf components with RM scheduling algorithm.For example, C 4 , C 6 , and C 8 in Fig. 15 show high overheads because of RM algorithm.

TABLE I PERIOD
RANGES OF TASKS IN SIMULATIONS