University of Pennsylvania ScholarlyCommons
Technical Reports (CIS) Department of Computer & Information Science
January 2009
A Compositional Framework for Avionics (ARINC-653) Systems
Arvind Easwaran University of Pennsylvania
Insup Lee University of Pennsylvania, [email protected]
Oleg Sokolsky University of Pennsylvania, [email protected]
Steve Vestal Honeywell International Inc.
Follow this and additional works at: https://repository.upenn.edu/cis_reports
Recommended Citation Arvind Easwaran, Insup Lee, Oleg Sokolsky, and Steve Vestal, "A Compositional Framework for Avionics (ARINC-653) Systems", . January 2009.
University of Pennsylvania Department of Computer and Information Science Technical Report No. MS-CIS-09-04
This paper is posted at ScholarlyCommons. https://repository.upenn.edu/cis_reports/898 For more information, please contact [email protected]. A Compositional Framework for Avionics (ARINC-653) Systems
Abstract Cyber-physical systems (CPSs) are becoming all-pervasive, and due to increasing complexity they are designed using component-based approaches. Temporal constraints of such complex CPSs can then be modeled using hierarchical scheduling frameworks. In this paper, we consider one such avionics CPS described by ARINC specification 653-2. The eal-timer workload in this system comprises of partitions, where each partition consists of one or more processes. Processes incur blocking and preemption overheads, and can communicate with other processes in the system. In this work, we develop techniques for automated scheduling of such partitions. At present, system designers manually schedule partitions based on interactions they have with application vendors. This approach is not only time consuming, but can also result in under utilization of resources. Hence, in this work we propose compositional analysis based scheduling techniques for partitions.
Comments University of Pennsylvania Department of Computer and Information Science Technical Report No. MS- CIS-09-04
This technical report is available at ScholarlyCommons: https://repository.upenn.edu/cis_reports/898 A Compositional Scheduling Framework for Digital Avionics Systems
Arvind Easwaran∗ Insup Lee, Oleg Sokolsky Steve Vestal CISTER/IPP-HURRAY Department of CIS Boston Scientific Polytechnic Institute of Porto University of Pennsylvania MN 55112, USA Portugal PA, 19104, USA [email protected] [email protected] lee,sokolsky @cis.upenn.edu { }
Abstract global global processor processor ARINC specification 653-2 describes the interface between application software and underlying middleware in a dis- tributed real-time avionics system. The real-time workload in this system comprises of partitions, where each partition con- local local local local sists of one or more processes. Processes incur blocking and 1 2 3 4 preemption overheads, and can communicate with other pro- P P P P ...... cesses in the system. In this work, we develop compositional τ τ τ τ τ τ τ τ τ τ τ τ techniques for automated scheduling of such partitions and 1,1 1,2 1,m1 2,1 2,2 2,m2 3,1 3,2 3,m3 4,1 4,2 4,m4 processes. At present, system designers manually schedule Blocking (semaphore) partitions based on interactions they have with the partition Communication chain (end−to−end latency bound) vendors. This approach is not only time consuming, but can also result in under utilization of resources. Figure 1. Scheduling hierarchy for partitions
1 Introduction single processor in a core module can therefore be described as a two-level hierarchical real-time system. Each partition comprises of one or more processes that are scheduled among ARINC standards, developed and adopted by the Engi- themselves using a (local) partition specific scheduler. All neering Standards for Avionics and Cabin Systems commit- the partitions that are allocated to the same processor are then tee, deliver substantial benefits to airlines and aviation in- scheduled among themselves using a (global) partition level dustry by promoting competition, providing inter changeabil- scheduler. For example, Figure 1 shows two such systems, ity, and reducing life-cycle costs for avionics and cabin sys- where partitions and are scheduled together under a tems. In particular, the 600 series ARINC specifications and 1 2 global scheduler onP one processor,P and partitions and reports define enabling technologies that provide a design 3 4 are scheduled together under a global scheduler onP anotherP foundation for digital avionics systems. Within the 600 se- processor. Each partition in turn is comprised of processes ries, this work deals with ARINC specification 653-2, part i τ , . . . , τ , scheduledP under a local scheduler1. Processes I [3] (henceforth referred to as ARINC-653), which defines a i,1 i,mi are periodic tasks that communicate with each other. Se- general-purpose Application/Executive (APEX) software in- quences of such communicating processes form dependency terface between the operating system of an avionics computer chains, and designers can specify end-to-end latency bounds and the application software. for them. For example, Figure 1 shows one such chain be- As described in ARINC-653, the real-time system of an tween tasks τ , τ , and τ . Processes within a partition aircraft comprises of one or more core modules connected 1,1 2,2 3,2 can block each other using semaphores for access to shared with one another using switched Ethernet. Each core module data, giving rise to blocking overhead (tasks τ and τ is a hardware platform that consists of one or more processors 4,2 4,m4 in the figure). Further, processes and partitions can also be among other things. They provide space and temporal par- preempted by higher priority processes and partitions, respec- titioning for independent execution of avionics applications. tively, resulting in preemption overheads. Each independent application is called a partition, and each partition in turn is comprised of one or more processes rep- There are several problems related to the hierarchical sys- resenting its real-time resource demand. The workload on a tem described above that must be addressed. For schedul-
∗Work done when author was a PhD student at the University of Pennsyl- 1The local scheduler can be different from the global scheduler and each vania, USA, and a summer intern at Honeywell Inc., USA. of the other local schedulers.
1 ing partitions, it is desirable to abstract the communication techniques to take into account (a) process communi- dependencies between processes using parameters like off- cations modeled as offsets, jitter, and constrained dead- sets, jitter, and constrained deadlines. This simplifies a global lines, and (b) process preemption and blocking over- processor and network scheduling problem into several local heads. Section 3 presents this solution, and illustrates its single processor scheduling problems. The process deadlines effectiveness using actual workloads from avionics sys- must also guarantee satisfaction of end-to-end latency bounds tems. specified by the designer. Given such processes we must then generate scheduling parameters for partitions, to be used 2. We develop techniques to schedule partitions using their by the global scheduler. The resulting global schedule must interfaces, taking into account preemption overheads in- provide sufficient processor capacity to schedule processes curred by partitions. Specifically, in Section 4, we within partitions. Furthermore, these scheduling parameters present a technique to count the exact number of pre- must also account for blocking and preemption overheads in- emptions incurred by partitions in the global schedule. curred by processes and partitions. This avionics system frequently interacts with the physi- 2 System model and related work cal world, and hence is subject to stringent government reg- ulations. Then, to help with system certification, it is desir- Partitions and processes. Each partition has an asso- able to develop schedulability analysis techniques for such ciated period that identifies the frequency with which it exe- hierarchical systems. Furthermore, these analysis techniques cutes, i.e., it represents the partition interface period. Typi- must account for resource overheads arising from preemp- cally, this period is derived from the periods of processes that tions, blocking, and communication. In order to protect the form the partition. In this work, we assume that partitions intellectual property rights of partition vendors, it is also de- are scheduled among themselves using deadline-monotonic sirable to support partition isolation; only so much informa- (DM) scheduler [16]. This enables us to generate a static par- tion about partitions must be exposed as is required for global tition level schedule at design time (hyper-period schedule), scheduling and the corresponding analysis. We therefore con- as required by the specification. Processes within a partition sider compositional techniques for partition scheduling, i.e., are assumed to be periodic tasks2. ARINC-653 allows pro- we schedule partitions and check their schedulability by com- cesses to be scheduled using preemptive, fixed priority sched- posing interfaces, which abstractly represent the resource de- ulers, and hence we assume that each partition also uses DM mand of processes within partitions. to schedule processes in its workload. Partition workloads can be abstracted into interfaces using As discussed in the introduction, we assume that commu- existing compositional techniques [17, 11, 23, 9]. These tech- nication dependencies and end-to-end latency requirements niques use resource models as interfaces, which are models are modeled with process offsets, jitter, and constrained dead- characterizing resource supply from higher level schedulers. lines. Hence, each process can be specified as a constrained In the context of ARINC-653, these resource model based in- deadline periodic task τ = (O, J, T, C, D), where O is offset, terfaces can be viewed as abstract resource supplies from the J is jitter, T is period, C is worst case execution time, and global scheduler to each partition. Various resource models D( T) is deadline. Jobs of this process are dispatched at like periodic [17, 23], bounded-delay [11], and EDP [9] have time≤ instants x T + O for every non-negative integer x, and been proposed in the past. However, before we can use these each job will be released for execution at any time in the in- techniques, we must modify them to handle ARINC-653 spe- terval [x T + O, x T + O + J]. For such a process it is rea- cific issues like communication dependencies, and blocking sonable to assume that O D [24]. Furthermore, we denote ≤ and preemption overheads. In this paper, we assume that com- as τ , . . . , τ , DM , a partition comprising of processes h{ 1 n} i P munication dependencies and end-to-end latency bounds are τ 1, . . . , τ n and using scheduler DM. Without loss of general- abstracted using existing techniques into process parameters ity we assume that τ i has higher priority than τ j for all i < j like offset, jitter, and constrained deadline (see [24, 21]). Note under DM. that although we do not present solutions to this problem, it In addition to the restrictions specified so far, we make the is however important, because it motivates the inclusion of following assumptions for the system described herein. These aforementioned process parameters. assumptions have been verified to exist in avionics systems. Contributions. In this paper we model ARINC-653 as (1) The processes within a partition, and hence the partition a two-level hierarchical system, and develop compositional itself, cannot be distributed over multiple processors. (2) Peri- analysis techniques for the same. This is a principled ap- ods of partitions that are scheduled on the same processor are proach for scheduling ARINC-653 partitions that provides harmonic3. Note that this assumption does not prevent pro- separation of concerns among different partition vendors, and cesses from having non-harmonic periods. (3) Processes in a therefore should facilitate system integration. In particular, partition cannot block processes in another partition. This is our contributions can be summarized as follows: 2Partitions with aperiodic processes also exist in avionics systems, but they are scheduled as background workload. Hence, we ignore them. 3 1. We extend and improve existing periodic [17] and A set of numbers {T1,..., Tn} is harmonic if and only if, for all i and EDP [9] resource model based compositional analysis j, either Ti divides Tj or Tj divides Ti.
2 because mutual exclusion based on semaphores require use of shortcomings. shared memory which can only happen within a partition. Related work. Traditionally, the partition scheduling 3.1 Inadequacy of existing analysis problem has been addressed in an ad-hoc fashion based on interactions between the system designer and vendors who A periodic process such as the one described earlier, con- provide the partitions. Although many different ARINC-653 sists of an infinite set of real-time jobs that are required to platforms exist (see [1, 2]), there is little work on automatic meet temporal deadlines. The resource request bound func- scheduling of partitions [14, 15, 20]. Kinnan et. al. [14] tion of a process upper bounds the amount of computational only provide preliminary heuristic guidance, and the other resource required to meet all its temporal deadlines (rbf : studies [15, 20] use constraint-based approaches to look at ). Similarly, the request bound function of a parti- combined network and processor scheduling. In contrast to tion< → is 3 ( max {0, t − x2 − y2 Π} + y2 Θ t ≥ ∆ − Θ τ τ sbfη(t) = (4) 3 3 0 Otherwise τ 2 τ 2 When processes in a partition have zero offset and jitter values, conditions for schedulability of the partition using a τ 1 τ 1 τ 1 τ 1 periodic or EDP resource model have been proposed in the τ = (2, 1, 2) past [23, 9]. These conditions can be easily extended for pro- 1 cesses with non-zero jitter, and is presented below. τ = (4, 1, 4) 2 Theorem 1 A partition = τ 1 = τ 3 = (4, 1, 4) (0, J , T , C , D ), . . . , τ =P (0, J , T , C hh, D ) , DM , 1 1 1 1 n n n n n i i where τ j has higher priority than τ k for all j < k, is Process release Process deadline schedulable over a periodic or EDP resource model R iff ∀i, 1 ≤ i ≤ n, ∃ti ∈ (0, Di − Ji] s.t. rbfP,i(ti) ≤ sbfR(ti), Figure 2. Tasks with harmonic periods where rbf ,i is as defined in Equation (2). P task τ φ is identical to its relative deadline. For the ARINC- Periodic or EDP resource model based interface for parti- 653 partitions, this means that partitions scheduled on a pro- tion can be generated using Theorem 1. For this purpose, cessor are abstracted into periodic tasks with harmonic peri- 4 we assumeP that the period of resource model R is equal to Π . ods. When such implicit deadline periodic tasks are sched- If R is a periodic resource model, then techniques presentedP uled under DM, every job of a task is scheduled in the same in [23] can be used to develop a periodic model based inter- time instants within its execution window. This follows from face. Since we are interested in minimizing processor usage the observation that whenever a job of a task is released, all (and hence resource bandwidth), we must compute the small- the higher priority tasks also release a job at the same time. For example, Figure 2 shows the schedule for a periodic task est Θ that satisfies this theorem. Hence, for each process τ i, set τ 1 = (2, 1, 2), τ 2 = (4, 1, 4), τ 3 = (4, 1, 4) . It can be we solve for different values of ti and choose the smallest Θ { } among them. Θ for model R is then given by the largest value seen that every job of τ 3 is scheduled in an identical manner of Θ among all processes in . Similarly, if R is an EDP within its execution window. resource model then EaswaranP et. al. [9] have presented a Whenever task τ φ is executing, the resource is available for use by periodic model φ. This means that resource sup- technique that uses this theorem to compute a resource model ply allocations for φ also occur in an identical manner within having smallest bandwidth. However, as described in the in- intervals (n Π, (n + 1) Π], for all n 0. In other words, the troduction, processes can be more accurately modeled using blackout interval x in sbf can never≥ exceed Π Θ. For the 1 φ − non-zero offset values. Then, a major drawback in using the example shown in Figure 2, assuming task τ 3 is transformed aforementioned techniques is that Theorem 1 only gives suffi- from a periodic resource model φ = 4, 1 , the blackout in- 3 h i cient schedulability conditions. This follows from the fact that terval for φ3 can never exceed 3. Therefore, the general sbf the critical arrival pattern used by Equation (2) is pessimistic for periodic models given in Equation (3) is pessimistic for for processes with non-zero offset. Additionally, these tech- our case. Improved sbfφ is defined as follows. niques do not take into account preemption and blocking over- — t — t ff heads incurred by processes. sbfφ(t) = Θ + max 0, t − (Π − Θ) − Π (5) Π Π In the following sections we extend Theorem 1 to accom- modate processes with non-zero offsets, as well as to account For a EDP resource model η = Π, Θ, ∆ , the blackout h i for blocking and preemption overheads. Recollect from Sec- interval in sbfη is Π + ∆ 2 Θ [9]. Since ∆ Θ is a nec- tion 2 that all the partitions scheduled on a processor are as- essary condition, this blackout− interval can never≥ be smaller sumed to have harmonic interface periods. This observation than Π Θ. Then, there will be no advantage in using EDP leads to a tighter supply bound function for periodic resource models− for partition interfaces over periodic models. There- models when compared to the general case. Therefore, we fore, we focus on periodic models in the remainder of this first present a new sbf for periodic resource models, and then paper. extend Theorem 1. 3.3 Schedulability condition for partitions 3.2 sbf under harmonic interface periods Request function. When processes have non-zero off- sets, identifying the critical arrival pattern to compute rbf is In the technique described in [23], a periodic interface φ = a non-trivial task. It has been shown that this arrival pattern Π, Θ is transformed into a periodic task τ = (Π, Θ, Π), φ could occur anywhere in the interval [0, LCM], where LCM beforeh i it is presented to the global scheduler. Note that the 4 period of model φ and task τ φ are identical, and period (Π) of Tasks with D = T. 4 denotes least common multiple of process periods (see [13]). its deadline. Furthermore, dispatch pattern of processes in As a result, no closed form expression for rbf is known in is periodic with period LCM . Therefore, it is sufficientP to this case 5. Therefore, we now introduce the request function check the schedulability of allP jobs in the interval [0, LCM ]. P (rf : ), which for a given time interval gives the We now prove statement (2). Consider the job of τ with < × < → < i maximum possible amount of resource requested by the par- latest release time tx. For this job to be schedulable under tition in that interval. Since rf computes the resource request resource model φ, higher priority interference encountered by for a specific time interval as opposed to an interval length, it the job in interval [tx, tx + t) must be satisfied by resource can be computed without knowledge of the critical arrival pat- model φ. This higher priority interference arises from pro- tern. When processes have non-zero jitter in addition to non- cesses released before tx, as well as from those released at or zero offsets, we must compute rf ,i assuming an arrival pat- after t . Condition rf (t , t) sbf (t t ) guarantees that P x ,i x φ x tern that results in the maximum higher priority interference φ provides enough supplyP to satisfy≤ the interference− from pro- for τ i. The following definition gives this arrival pattern for a cesses released at or after tx. To account for the interference job of τ i with latest release time t, where t = Oi + Ji +x Ti from processes released before tx, we have the second con- for some non-negative integer x. dition, i.e., rf ,i(0, t) sbfφ(t). This condition ensures that the minimumP resource≤ provided by φ in an interval of length Definition 1 (Arrival pattern with jitter [24]) Recall that a t, is at least as much as the total higher priority interference job of process τ = O, J, T, C, D is dispatched at time up to time t. This proves that these conditions are sufficient instant x T + O forh some non-negativei integer x, and for schedulability of partition . can be released for execution at any time in the interval P [x T + O, x T + O + J]. Then, a job of τ with latest release We now prove that these conditions are also necessary i for schedulability of . For this purpose, observe that time t, incurs maximum interference from higher priority pro- P rf ,i(0, t) sbfφ(t) is a necessary condition to guarantee cesses in whenever, (1) all higher priority processes with P ≤ dispatch timeP before t are released at or before t with maxi- that resource model φ satisfies the higher priority interference mum jitter, and (2) all higher priority processes with dispatch in interval [0, t). Furthermore, this condition alone is not suffi- time at or after t are released with zero jitter. cient, because it does not guarantee that φ will provide enough resource in interval [tx, t). The second condition ensures this The request function for processes with non-zero offset and property. 2 jitter values is then given by the following equation. i „‰ ı ‰ ı« Periodic resource model based interface for partition X t2 − Oj t1 − Oj − Jj P rfP,i(t1, t2) = − Cj (6) can be generated using Theorem 2. Assuming period Π is Tj Tj j=1 equal to Π , we can use this theorem to compute the small- est capacityP Θ that guarantees schedulability of . When Schedulability conditions. The following theorem P presents exact schedulability conditions for partition under compared to Theorem 1, this theorem represents a compu- periodic resource model φ. P tationally expensive (exponential versus pseudo-polynomial), but more accurate interface generation technique. In fact, for Theorem 2 Let = τ , . . . , τ denote a set of pro- many avionics systems we expect this technique to be com- T { 1 n} cesses, where for each i, τ i = (Oi, Ji, Ti, Ci, Di). Partition putationally efficient as well. For instance, if process peri- = , DM is schedulable using a periodic resource model ods are harmonic as in many avionics systems, then LCM Pφ = hTΠ, Θ iffi i : 1 i n, t s.t. t + D O J < P h i ∀ ≤ ≤ ∀ x x i − i − i is simply the largest process period, and our technique has LCM and tx = Oi + Ji +x Ti for some non-negative inte- P pseudo-polynomial complexity in this case. ger x, t (tx, tx + Di Oi Ji] such that ∃ ∈ − − Although Theorem 2 presents an exact schedulability con- rfP,i(0, t) ≤ sbfφ(t) and rfP,i(tx, t) ≤ sbfφ(t − tx) (7) dition for , it ignores the preemption and blocking overheads incurred byP processes in . Hence, in the following section, rf ,i is given by Equation (6) and sbfφ is given by Equa- we extend our definition ofP rf to account for these overheads. tionP . Also, denotes the least common multiple of (5) LCM Blocking and preemption overheads. Recollect that process periods P . T1,..., Tn processes incur blocking overhead because of mutual exclu- sion requirements modeled using semaphores. Blocking oc- Proof To prove that these conditions are sufficient for curs when a lower priority process is executing in a critical schedulability of , we must validate the following state- section, and a higher priority process cannot preempt this ments: (1) it is sufficientP to check schedulability of all jobs lower priority process. In this case the higher priority process whose deadlines lie in the interval [0, LCM ], and (2) Equa- P is said to be blocked by the lower priority process, resulting tion (7) guarantees that the job of τ with latest release time i in blocking overheads. Assuming critical sections span entire t , is schedulable using periodic resource model φ. x process executions, two properties of this overhead can be de- Since D T and O D for all i, no process released i i i i rived immediately: (1) this overhead varies with each job of before LCM≤ can execute≤ beyond LCM without violating P P a process, and (2) any job of a process can be blocked by at 5 rbfP,i defined in Equation (2) is only an upper bound. most one lower priority process. 5 τ l τ i+2 τ i+1 τ l restored. Thus, every preemption results in an execution over- head associated with storing and restoring of process con- τ l texts. Many different techniques for bounding this preemp-