Extending response-time analysis for the automatic synthesis of functional graphs into fixed-priority distributed systems Asma Mehiaoui, Sara Tucci-Piergiovanni, Chokri Mraidha CEA, LIST, Laboratory of Model Driven Engineering for Embedded Systems 91191 Gif-sur-Yvette CEDEX, FRANCE {asma.mehiaoui, sara.tucci, chokri.mraidha}@cea.fr Jean-Philippe Babau Lab-STICC, University of Brest 29200 Brest CEDEX 3, FRANCE jean-philippe.babau@univ-brest.fr Abstract—In this paper, we extend traditional response time analysis to a functional data flow graph (functional graph for brevity) mapped into a set of tasks. Different tasks synchronization semantics can be considered, depending on the way tasks synchronize on inputs consumed and outputs produced by functions in the functional graph. We study three different synchronization semantics and we give the appro- priate response time analysis for functional graphs mapped into a set of preemptible fixed-priority tasks distributed over a priority-based network. Our response time analysis extension is needed to integrate response time constraints in an auto- matic approach for tasks synthesis. In this paper, for each semantics, the corresponding analysis is integrated in a tasks synthesis approach based on mathematical programming. Each semantics is evaluated against the minimum response time that can be obtained running task synthesis over a set of synthetic functional graphs. Finally, different sematics are considered and evaluated for an automotive case study. Keywords-real-time distributed applications, response-time analysis, model-based development, automatic synthesis. I. I NTRODUCTION Model-based software design is an attractive solution to counteract the increasing complexity of distributed real-time systems development, especially when used in conjunction with a synthesis tool that automates the transition from a high-level functional model (representing the system func- tions and the signals exchanged among them), to a low- level operational model consisting of tasks and messages scheduled respectively onto execution nodes and buses [1]. A synthesis process as defined in industrial standards (like the automotive AUTOSAR [2]) and in academic frameworks (including the Platform-Based Design [3]) consists of three phases: i) the placement of functions on execution nodes and, respectively, of signals on buses; ii) the partitioning of functions into tasks and, respectively, of signals into mes- sages; and finally, iii) the scheduling of tasks and messages. Note that each choice made during the three phases of the synthesis process has an impact on system schedulability, i.e. the capability to meet end-to-end deadlines. We consider a synthesis solution as valid (from a real-time point of view) if and only if all end-to-end deadlines, specified on end-to-end activation chains of functions, are met. Each chain is supposed to be activated by an external event (e.g. as detected by a sensor) or a timer, and terminating with the execution of a sink function. Verification of synthesis correctness relies on worst-case response time analysis, allowing to compute worst-case response times of each chain against end-to-end deadlines. The functional model, constituting the entry point for the synthesis process, is often hidden for real-time scheduling researchers that indeed conceived response time analyses applied to a task model. Unfortunately, these traditional response time analyses (e.g., [4, 5]) can be directly inte- grated in the synthesis process only when the entry point is restricted to a task model employed in real-time scheduling theory, i.e. when considering a one-to-one mapping of functions to tasks ([6, 7]. However, since the number of functions is usually huge, exploring how to cluster more functions in one task during synthesis is fundamental, and an appropriate analysis to verify synthesis validity is needed. For this purpose, we extend the fixed-priority analysis given in [4] to apply response time analysis to a functional graph mapped on a tasks graph, where more functions can be partitioned in a single task. Our proposal identifies different synchronization semantics for tasks depending on the way tasks synchronize on inputs consumed and outputs produced by functions in the functional graph. For each synchro- nization semantics a proper response analysis is derived. These analyses take into account the context switch effect, in order to properly analyze clustering benefits. Assuming a given synchronization semantics, we run a synthesis process based on mathematical programming that finds a synthesis solution minimizing response-time. Different semantics are then evaluated and compared in their ability of minimizing response times for some classes of graphs. The paper is organized as follows. Section II gives related work. Section III introduces basic definitions and assump- tions on the system model. Section IV presents the dif- ferent task synchronization semantics and develops related response-time computation. Section V provides evaluation and comparison of different proposed semantics Section VI concludes the paper and discusses the future work.