Isabelle Puaut

Robert De Simone

Pierre Talpin

Thierry Gautier

Keywords: graph models, synchronous model

A Sets, orders, and sequences

Introduction

Embedded systems are everywhere: homes, cars, airplanes, phones, etc. Every time we take a picture, watch TV, or answer the phone, we are interacting with an embedded system. The number of embedded systems in our daily lives is growing ceaselessly. A modern heart pacemaker is an example of so-called safety-critical embedded systems, a term that refers to systems whose failure might endanger human life or cause an unacceptable damage. A heart pacemaker is also a real-time embedded system, a term that refers to systems which must perform their functions in time frames dictated by the environment.

Embedded systems design requires approaches taking into account non-functional requirements regarding optimal use of resources (e.g. memory, energy, time, etc.) while ensuring safety and robustness. Therefore, design approaches should use as much as possible formal models of computation to describe the behavior of the system, formal analysis to check safety properties, and automatic synthesis to produce "correct by construction" implementations. Many models of computation for embedded systems design have been proposed in the past decades. Most of them have to deal with time and concurrency. Among these models, the dataflow and the periodic task models are very popular.

Dataflow models of computation Dataflow models are characterized by a data-driven style of control; data are processed while flowing through a network of computation nodes. There are three major variants of dataflow models in the literature, namely, Kahn process networks, dataflow process networks, and dataflow synchronous languages. These models are widely used to design stream-based systems. The Turing-completeness of Kahn and dataflow process networks has motivated the research community to propose less expressive but decidable dataflow models such as synchronous and cyclo-static dataflow graphs. In these models, a system is described by a directed graph where computation nodes (called actors) communicate only through one-to-one FIFO buffers. Each time an actor executes (or fires), it consumes a predefined (either constant or cyclically changing) number of tokens from its input channels and produces a predefined number of tokens on its output channels. These two models are used in the signal and stream processing community due to the following reasons: Expressiveness : They are expressive enough to model most of digital signal processing algorithms (e.g. FFT, H.263 decoder, etc.).

Introduction

Decidability : The questions of boundedness (i.e. whether the system can be executed with bounded buffers) and liveness (i.e. whether each actor can fire infinitely often) are decidable. Furthermore, static-periodic schedules (i.e. infinite repetitions of firing sequences of actors) can be easily constructed.

Powerful tools : Many tools (e.g. SDF 3 , Ptolemy) propose algorithms for staticperiodic scheduling of dataflow graphs considering many optimization problems: buffer minimization, throughput maximization, code size minimization, etc.

Real-time scheduling The major drawback of static-periodic schedules (or cyclic executives) is their inflexibility and difficult maintainability. Therefore, new scheduling techniques have been proposed; e.g. fixed-priority scheduling, earliest-deadline first scheduling, etc. Their underlying model of computation consists of a set of (periodic, sporadic, or aperiodic) independent and concurrent real-time tasks. Each task is characterized by a deadline that must be met by all invocations (called jobs) of that task. The real-time research community has proposed a set of algorithms (called schedulability tests) to verify before the costly implementation phase whether tasks will meet their deadlines or not.

Nowadays real-time embedded systems are so complex that real-time operating systems are used to manage hardware resources and host real-time tasks. Most of real-time operating systems implement a bunch of priority-driven scheduling algorithms (as deadline monotonic and earliest-deadline first scheduling policies). In parallel with the rapid increase in software complexity, demands for increasing processor performance have motivated using multiprocessor platforms for real-time embedded applications. While not as mature as uniprocessor scheduling theory, multiprocessor scheduling theory starts providing us with very interesting schedulability tests.

Problem statement

Real-time scheduling of periodic task sets The key properties of any real-time safety-critical system are functional determinism (i.e. for the same sequence of inputs, the system always produces the same sequence of outputs) and temporal predictability (i.e. tasks meet their deadlines even in the worst-case scenario). Besides of all the above mentioned advantages of dataflow graphs, functional determinism is an inherent property of this model of computation. This is why we argue that dataflow graphs are suitable for designing safety-critical systems. Thus, the input of our synthesis technique is a dataflow graph specification.

Static-periodic scheduling of dataflow graphs

Real-time scheduling of dataflow graphs

Since real-time operating systems are used in most recent real-time systems, we must ask the following question: how to generate a set of independent real-time tasks (or precisely a periodic task set) from a dataflow specification? As depicted in Figure 1, we refer to this problem as real-time scheduling of dataflow graphs. Many properties (from both communities) should be satisfied for correct implementations. The most important ones are boundedness, data dependencies, and schedulability on a given architecture.

Introduction

Symbolic schedulability analysis

Each real-time task must be characterized with some timing parameters (e.g. periods, first start times, deadlines). However, abstract scheduling does not attribute any timing properties to actors. Thus, the symbolic schedulability analysis consists in defining the scheduling parameters that: respect the abstract scheduling constraints, ensure the schedulability for a given scheduling algorithm and a given architecture, and optimize a cost function (e.g. maximize the throughput, minimize the buffering requirements, minimize the energy consumption, etc.).

This thesis presents several symbolic schedulability analyses regarding the earliestdeadline first and fixed-priority scheduling policies. Both uniprocessor and homogeneous multiprocessor scheduling are considered. Though the thesis focuses more on scheduling of connected dataflow graphs, we have also presented few symbolic schedulability algorithms for disconnected dataflow graphs.

Thesis overview

This thesis is organized as follows.

Chapter 1 first introduces the three major varieties of dataflow models of computation. We only present the most important properties regarding their semantics and expressiveness. The second part briefly reviews the existing results about static-periodic scheduling of synchronous and cyclo-static dataflow graphs. Finally, the real-time scheduling theory is briefly introduced together with the very few existing results about parametric schedulability analysis. All the mathematical concepts used in this chapter are introduced in Appendix A.

Chapter 2 presents the abstract scheduling step. Again, all needed mathematical concepts and notations about sequences can be found in Appendix A. This chapter first describes activation-related schedules (i.e. the general framework) and then affine schedules with more details on the overflow and underflow analyses w.r.t. earliestdeadline first and fixed-priority scheduling policies. The chapter ends with notes about some specific cases.

Chapter 3 presents the symbolic schedulability analysis step. Two performance metrics are considered: buffer minimization and throughput maximization. Furthermore, two scheduling policies are addressed: earliest-deadline first and fixed-priority scheduling policies for both uniprocessor and multiprocessor systems.

Chapter 4 presents the results obtained by the scheduling algorithms on a set of real-life stream processing applications and randomly generated dataflow graphs w.r.t. buffer minimization and throughput maximization. It also briefly presents how to use the affine scheduling technique to automatically generate safety-critical Java Level 1 applications from a dataflow specification.

Finally, we end this thesis with some conclusions and perspectives for future work.

Résumé en français

Les systèmes embarqués sont omniprésents dans l'industrie comme dans la vie quotidienne. Ils sont qualifiés de critiques si une défaillance peut mettre en péril la vie humaine ou conduire à des conséquences inacceptables. Ils sont aussi qualifiés de temps-réel si leur correction ne dépend pas uniquement des résultats logiques mais aussi de l'instant où ces résultats ont été produits. Les méthodes de conception de tels systèmes doivent utiliser, autant que possible, des modèles formels pour représenter le comportement du système, afin d'assurer, parmi d'autres propriétés, le déterminisme fonctionnel et la prévisibilité temporelle.

Les graphes « flot de données », grâce à leur déterminisme fonctionnel inhérent, sont très répandus pour modéliser les systèmes embarqués de traitement de flux. Dans ce modèle de calcul, un système est décrit par un graphe orienté, où les noeuds de calcul (ou acteurs) communiquent entre eux à travers des buffers FIFO. Un acteur est activé lorsqu'il y a des données suffisantes sur ses entrées. Une fois qu'il est actionné, l'acteur consomme (resp. produit) un nombre prédéfini de données (ou jetons) à partir de ses entrées (resp. sur ses sorties). L'ordonnancement statique et périodique des graphes flot de données a été largement étudié surtout pour deux modèles particuliers : SDF et CSDF. Le problème consiste à identifier des séquences périodiques infinies d'actionnement des acteurs qui aboutissent à des exécutions complètes et à buffers bornés. Le problème est abordé sous des angles différents : maximisation de débit, minimisation des tailles des buffers, etc. Cependant, les ordonnancements statiques sont trop rigides et difficile à maintenir.

Aujourd'hui, les systèmes embarqués temps-réel sont très complexes, au point qu'ils ont recours à des systèmes d'exploitation temps-réel (RTOS) pour gérer les tâches concurrentes et les ressources critiques. La plupart des RTOS implémentent des stratégies d'ordonnancement temps-réel dynamique ; par exemple, RM, EDF, etc. Le modèle de calcul sous-jacent consiste en un ensemble de tâches périodiques (ou non) indépendantes ; chaque tâche est caractérisée par des paramètres d'ordonnancement (ex. : période, échéance, priorité, etc.). La théorie de l'ordonnancement temps-réel fournit de nombreux tests d'ordonnançabilité pour déterminer avant la phase d'implémentation, et pour une architecture et une stratégie d'ordonnancement données, si les tâches vont respecter leurs échéances.

Il est intéressant de pouvoir modéliser les systèmes embarqués par des graphes flot de données et en même temps d'être capable d'implémenter les acteurs par des tâches temps-réel indépendantes ordonnançables par un RTOS. Cette thèse aborde le problème Résumé en français d'ordonnancement temps-réel dynamique des graphes flot de données. Le problème n'est pas anodin et il est résolu en deux étapes : la construction d'un ordonnancement affine abstrait et l'analyse symbolique d'ordonnançabilité.

Ordonnancement abstrait

Un ordonnancement abstrait des acteurs est construit dans une première étape. Il consiste en un ensemble de contraintes d'ordonnancement non temporelles ; plus précisément, un ensemble de relations entre les horloges abstraites d'activation des tâches. La figure 2.(a) représente un graphe flot de données composé de deux acteurs, p 1 et p 2 , et d'un buffer e = (p 1 , p 2 , x, y) de taille δ(e) et qui contient initialement θ(e) jetons. Les fonctions x, y : N >0 → N indiquent les taux de production et de consommation du buffer e ; durant le j e actionnement du producteur p 1 , le nombre de jetons produits sur e est égal à x(j). Les taux de production et de consommation sont constants dans le modèle SDF et périodiques dans le modèle CSDF. Dans cette thèse, on traite de types de taux plus expressifs comme par exemple les taux ultimement périodiques. Chaque acteur p i est associé à une horloge d'activation pi qui indique combien d'instances de p i sont activées à un moment donné. Puisque cette première étape ne prend pas en compte le temps physique, nous sommes intéressés uniquement par l'ordre logique des activations d'où la notion de relation d'activation. La figure 2.(b) représente une relation d'activation entre les acteurs p 1 et p 2 . La relation montre clairement l'ordre logique des activations ; par exemple, la première activation de p 2 est précédée par deux activations de p 1 . Cependant, ça ne veut dire pas que la première instance de p 2 (dénotée par p 2 [1]) ne commence son exécution que lorsque p 1 [2] s'acheva. Cela dépend de la stratégie d'ordonnancement et d'autres paramètres (par ex. priorités). Une relation d'activation peut être exprimée à l'aide de deux séquences infinies d'entiers. La construction d'un ordonnancement abstrait consiste à calculer toutes les relations d'activation entre les acteurs adjacents de façon à satisfaire les conditions suivantes.

Analyse des overflows : Un overflow se produit lorsqu'une tâche (i.e. un acteur) tente d'écrire des jetons sur un buffer plein. Pour éliminer ce type d'exception, il faut garantir que le nombre de jetons accumulés dans chaque buffer à chaque instant est inférieur ou égal à la taille du buffer. Si ⊕x(j) = j i=1

x(i), alors l'analyse des overflows pour un buffer e = (p i , p k , x, y) peut être décrite par l'équation suivante : ∀j ∈ N >0 : θ(e) + ⊕x(j) -⊕y(j ′ ) ≤ δ(e)

(1) de telle sorte que p k [j ′ ] est la dernière instance de p k qui certainement lit ses entrées à partir de e avant que p i [j] ne commence l'écriture de ses résultats sur le buffer. Le calcul de j ′ dépend de la relation d'activation entre p i and p k mais aussi de la stratégie d'ordonnancement. Ce calcul ne doit pas prendre en compte le temps physique (par ex. le temps d'exécution pire-cas des tâches) mais plutôt les scénarios pire-cas des overflows.

Analyse des underflows : Un underflow se produit lorsqu'une tâche tente de lire à partir d'un buffer vide. Il faut donc garantir que le nombre de jetons accumulés dans chaque buffer à chaque instant est supérieur ou égal à zéro. Formellement, il faut assurer que ∀j ∈ N >0 : θ(e) + ⊕x(j ′ ) -⊕y(j) ≥ 0 (2) de telle sorte que p i [j ′ ] est la dernière instance de p i qui écrit tous ses résultats sur e avant que p k [j] ne commence la lecture de ses entrées à partir du buffer.

Consistance : Si le graphe flot de données ne contient pas de cycles non orientés, alors chaque relation d'activation peut être calculée séparément des autres relations en utilisant les équations 1 et 2. Cependant, s'il y a des cycles non orientés dans le graphe, il faut assurer la cohérence des relations calculées afin d'éviter les problèmes de causalité. La figure 3 Nous présentons dans la deuxième partie du chapitre 1 une méthode pour calculer les ordonnancements abstraits et affines des graphes dont les taux de production et de consommation sont ultimement périodiques. Cette méthode se base sur la programmation linéaire en nombres entiers et a comme objectif la minimisation de la somme totale des tailles des buffers. Par ailleurs, deux stratégies d'ordonnancement sont considérées : EDF et ordonnancement à priorités fixes.

Analyse symbolique d'ordonnançabilité

Chaque acteur p i est assigné à une tâche temps-réel périodique caractérisée par un temps d'exécution pire-cas C i , une période π i , une phase r i , une échéance d i , une priorité (dans le cas d'ordonnancement à priorités fixes), et le processeur sur lequel elle s'exécute (dans le cas d'ordonnancement multiprocesseur partitionné). L'ordonnancement abstrait décrit les relations entre les paramètres des tâches mais il ne calcule pas les valeurs de ces paramètres. L'analyse symbolique d'ordonnançabilité consiste à calculer ces paramètres de telle façon à :

-Respecter l'ordonnancement abstrait : Si la relation affine entre deux acteurs p i et p k est de paramètres (n, ϕ, d), alors les caractéristiques temporelles des deux tâches doivent satisfaire les deux contraintes suivantes qui assurent que les activations d'un acteur sont séparées par une période constante.

dπ i = nπ k r k -r i = ϕ n π i
-Optimiser les performances : Dans cette thèse, on considère deux métriques de mesure de performance des systèmes embarqués temps-réel : le débit (ou de manière équivalente, le facteur d'utilisation du processeur U = p i C i π i ) et la somme totale des tailles des buffers. Malheureusement, la maximisation du débit est en conflit avec la minimisation des tailles des buffers. Les paramètres qui influencent principalement ces performances sont : les périodes, les priorités dans le cas d'ordonnancement à priorités fixes, les échéances dans le cas d'ordonnancement EDF, et l'allocation des processeurs dans le cas d'ordonnancement multiprocesseur partitionné. Nous proposons plusieurs techniques d'affectation des priorités et d'adaptation des échéances pour optimiser les performances.

-Assurer l'ordonnançabilité : On ne peut pas appliquer directement les tests standards d'ordonnançabilité car les paramètres temporels des tâches (principalement les périodes) sont inconnus. C'est pourquoi on a modifié ces tests afin de pouvoir calculer les paramètres temporels des tâches pour lesquelles le système est ordonnançable sur une architecture et pour une stratégie d'ordonnancement données. Nous proposons plusieurs algorithmes ; à titre d'exemple, SQPA pour l'ordonnancement EDF monoprocesseur, SRTA pour l'ordonnancement monoprocesseur à priorités fixes, SQPA-FFDBF pour l'ordonnancement EDF multiprocesseur global, etc.

Pour conclure, nous montrons l'efficacité de notre approche en utilisant des graphes issus de cas réels, ainsi que des graphes générés aléatoirement. Nous proposons aussi un flot de conception des applications Java pour les systèmes critiques (SCJ), basé sur l'approche décrite précédemment.

Embedded systems

Embedded systems are ubiquitous in our daily lives. They are present in many industries, including transportation, telecommunication, defense, and aerospace. They have changed the way we communicate, the way we conduct business -in short, our inventions are changing who we are.

What are embedded systems? There are several definitions in the literature [START_REF] Henzinger | The embedded systems challenge[END_REF][START_REF] Li | Real-time concepts for embedded systems[END_REF][START_REF] Gamatié | Designing embedded systems with the Signal programming language: synchronous, reactive specification[END_REF]] that may agree with our vision. We believe that an embedded system is one that integrates software with hardware to accomplish a dedicated function that is subject to physical constraints. Such constraints are arising from either the behavioral requirements (e.g. throughput, deadlines, etc.) or the implementation requirements (e.g. memory, power, processor speed) of the system.

Separate design of software and hardware does not work for embedded systems where techniques from both fields should be combined into a new approach that should not only meet physical constraints but also reduce the development cost and the time to market.

Reactive systems

A reactive system is a system that maintains a permanent interaction with its environment [START_REF] Halbwachs | Synchronous programming of reactive systems[END_REF]. Unlike interactive systems (e.g. database management systems) which interact at their own speed with users or with other programs, reactive systems are subject to some reaction constraints represented in the way the external environment dictates the rhythm at which they must react. Reactive systems may enjoy functional determinism. This key property means that for a given sequence of inputs, a system will always produce the same sequence of outputs.

All reactive systems are embedded systems; however, not all embedded systems are reactive systems. For example, proactive systems (e.g. autonomous intelligent cruise control) extend reactive systems with more autonomy and advanced capabilities -they anticipate and take care of dynamically occurring (not necessarily a priori predicted) situations.

Depending on how reactive systems acquire inputs, they can be either event-driven or sampled systems. An event-driven system waits for a stimulus to react. So, if its response time is too long, it may miss some subsequent events. On the other hand, a sampled system requires its inputs at equidistant time instants according to some physical requirements. Examples of sampled systems are flight control systems and real-time signal processing systems. In this thesis, we are mainly interested in sampled systems.

Real-time systems

Real-time systems are reactive systems for which the correct behavior depends not only on the outputs but also on the time at which the results are produced. A real-time task is usually characterized by a deadline before which the task must complete its execution. It is said to be hard if missing the deadline may cause catastrophic consequences; while it is said to be soft if missing the deadline is not catastrophic but the the result becomes less valuable -e.g. it decreases the quality of a video game. Finally, the task is said to be firm if a late response is worthless.

Real-time computing is not just fast computing or matter of good average case performance, since these cannot guarantee that the system will always meet its deadlines in the worst-case scenario. Real-time computing should rather be a predictable computing [START_REF] Buttazo | Hard real-time computing systems: predictable scheduling algorithms and applications[END_REF]. The need for predictability should not be confused with the need for temporal determinism where the response times of the system can be determined for each possible state of the system and set of the inputs.

Safety-critical systems

A safety-critical system is a system whose failure may cause serious injury to people, loss of human life, significant property damage, or large environmental harm. Flight control systems, railway signaling systems, robotic surgery machines, or nuclear reactor control systems naturally come to mind. But, something simple as traffic lights can also be considered as safety-critical since giving green lights to both directions at a cross road could cause human death.

Many disciplines are involved in safety-critical systems design [START_REF] Knight | Safety critical systems: challenges and directions[END_REF]: domain engineering, embedded systems engineering, safety engineering, reliability engineering, etc. Unlike reliability engineering which is concerned with failures and failure rate reduction, the primary concern of safety engineering is the management of hazards, i.e. identifying, analyzing, and controlling hazards throughout the life cycle of a system in order to prevent or reduce accidents. In a domain such as avionics, a system is designed to have at most 10 -9 accidents per hour.

All safety-critical systems are real-time systems because they must respond, as required by the safety analysis, to a fault by the fault tolerance time which is the length of time after which the fault leads to an accident [START_REF] Douglass | Real-time agility: the harmony/ESW method for real-time and embedded systems development[END_REF].

Dataflow models of computation

It is easier to explain the concept of "model of computation" by giving some examples rather than to search for a precise essential definition. State machines, timed Petri nets, synchronous models, Kahn process networks, and communicating sequential processes are typical examples of models of computation. A model of computation consists of a set of laws that govern the interaction of components in a design. It usually defines the following elements [START_REF] Lee | Computing for embedded systems[END_REF]ontology: what is a component? epistemology: what knowledge do components share? protocols: how do components communicate? lexicon: what do components communicate?

A model of computation for embedded real-time systems should deal with concurrency and time. A classification of models of computation according to their timing abstraction can be found in [START_REF] Jantsch | Models of computation and languages for embedded system design[END_REF]. They can be continuous-time, discrete-time, synchronous, or untimed models.

Dataflow models of computation are characterized by a data-driven style of control; data are processed while flowing through a network of computation nodes. Therefore, communication and parallelism are very exposed. Dataflow programming languages can be traced back to the 70's with a great advancement in the underlying models of computation and visual editors since then [START_REF] Johnston | Advances in dataflow programming languages[END_REF].

In this chapter, we will present the three major variants of dataflow models in the literature, namely, Kahn process networks [START_REF] Kahn | The semantics of a simple language for parallel programming[END_REF], Dennis dataflow [START_REF] Dennis | First version of a data flow procedure language[END_REF], and synchronous languages [START_REF] Benveniste | The synchronous languages 12 years later[END_REF][START_REF] Halbwachs | Synchronous programming of reactive systems[END_REF]. Mathematical notations and definitions used in this chapter can be found in Appendix A.

Kahn process networks

A Kahn process network (KPN) is a collection of concurrent processes that communicate only through unidirectional first-in, first-out (FIFO) channels. A process is a deterministic sequential program that executes, possibly forever, in its own thread of control. It cannot test for the presence or absence of data (also called tokens) on a given input channel. Therefore, a process will block if it attempts to read from an empty channel. Communications in KPNs are asynchronous; i.e. the sender of the token needs not to wait for the receiver to be ready to receive it. Furthermore, writing to a channel is a non-blocking operation since channels are assumed to be unbounded.

KPNs are deterministic; i.e. the history of tokens produced on channels does not depend on either the execution order or the communication latencies. Gilles Kahn had provided an elegant mathematical proof of determinism using a denotational framework [START_REF] Kahn | The semantics of a simple language for parallel programming[END_REF].

A Denotational semantics

A denotational semantics explains what input/output relation a KPN computes. A Kahn process is a continuous functional mapping from input streams into output streams. A stream or a history of a channel is the sequence of tokens communicated along that channel. It can be the input (and the output) of at most one process. The basic patterns of deterministic composition of processes are described in [START_REF] Lee | The semantics of dataflow with firing[END_REF].

Every continuous process is monotone but not vice versa. Monotonicity of a process means that the process needs not to wait for all its inputs to start computing outputs, but it can do that iteratively. Thus, monotonicity implies a notion of causality since future inputs concern only future outputs. Furthermore, continuity prevents a process from waiting forever before sending some outputs.

Let {s 1 , . . . , s N } be the set of streams of the network; and let {f 1 , . . . , f N } be the set of terms built out of processes such that for each stream s i , we have that s i = f i (s 1 , . . . , s N ). If we take S to be equal to the N -tuple [s 1 , . . . , s N ] ∈ A N , then the network can simply be described as S = F (S) with F : A N -→ A N . It is worth mentioning that feedback loops, which can be used to model local states, fit naturally in this description framework.

The denotational semantics of the KPN is the solution of the equation system S = F (S). Therefore, it is only a matter of computing a least fixed point solution. Since Kahn processes are continuous over cpos, there is a unique least fixed point solution; i.e. the network is deterministic. According to the least fixed point theorem for monotone functions on cpos, the minimum solution of the system can be iteratively computed by S j+1 = F (S j ) till stabilization such that S 0 consists of the initial streams of the network.

B Operational semantics

Despite its mathematical beauty, the denotational semantics is not suitable for reasoning about implementation related aspects such as buffer sizes and potential deadlocks. In the past decades, several operational semantics of KPNs were given, for instance, in the form of labeled transition systems [START_REF] Geilen | Requirements on the execution of Kahn process networks[END_REF], I/O automata [START_REF] Lynch | A proof of the Kahn principle for input/output Bibliography automata[END_REF], or concurrent transition systems [START_REF] Stark | Concurrent transition system semantics of process networks[END_REF]. Like it had been proved, the behavior of a KPN according to these operational semantics corresponds to the least fixed-point solution given by Kahn. This equivalence is referred to as the Kahn principle.

C Limitations of determinism

A Kahn process network models a functional deterministic system; however, it is widely accepted that there are many systems that require non-determinism such as resource management systems. KPNs are unsuitable for handling asynchronous events or dealing with timing properties. To model such behaviors, one has to extend the model with additional features that may break the property of determinism. Non-determinism can be added to KPNs by any of the following methods described in [START_REF] Lee | Dataflow process networks[END_REF]: (1) allowing a process to test inputs for emptiness; a solution that was adopted in [START_REF] De Kock | Yapi: application modeling for signal processing systems[END_REF][START_REF] Martin | The probe: an addition to communication primitives[END_REF], (2) allowing multi-writer channels and/or multi-reader channels, (3) allowing shared variables; a solution that was used in [START_REF] Kaplan | An introduction to the processing graph method[END_REF], and (4) allowing a process to be internally non-deterministic.

The non-deterministic merge is essential for modeling reactive systems. Its behavior consists in moving tokens whenever they arrive on any of its two inputs to its unique output. Hence, the output sequence depends on the arrival times of the input tokens. This merge process is not a Kahn process since it has to be either non-monotone or unfair [START_REF] Brock | Scenarios: a model of non-determinate computation[END_REF].

Bounded execution of KPNs

Kahn process networks are deterministic; i.e. the order in which the processes execute, assuming a fair scheduler, does not affect the final result. Fairness states that in an infinite execution, a ready process must not be postponed forever. Even if KPNs only allow modeling of functional deterministic systems, they are a very expressive model. In fact, they are Turing-complete.

Due to Turing-completeness, some interesting properties of KPNs are undecidable [START_REF] Buck | Scheduling dynamic dataflow graphs with bounded memory using the token flow model[END_REF]. For instance, the boundedness of an arbitrary KPN, i.e. whether it can be executed with bounded internal channels or not, is undecidable. Another undecidable problem is deadlock-freedom which states that, whatever the input sequences, the KPN will never deadlock. Indeed, the halting problem of Turing machines, known to be undecidable, can be reduced to these problems.

The KPN model is not amenable to compile-time scheduling since it is not possible, in the general case, to decide boundedness in finite time. Thus, it is necessary to resort to the dynamic scheduling which has infinite time to find a bounded memory solution, if any. The behavior of a dynamically scheduled network must conform to its denotational semantics. Authors of [START_REF] Parks | Bounded scheduling of process networks[END_REF][START_REF] Basten | Efficient execution of process networks[END_REF][START_REF] Geilen | Requirements on the execution of Kahn process networks[END_REF] have defined some requirements, described below, for correct schedulers.

A Correctness criteria

A scheduler is correct with respect to Kahn semantics if and only if every execution the scheduler may produce is sound, complete, and bounded whenever it is possible.

Soundness An execution is sound if and only if the produced tokens are not different from the formal ones. So, if s is the actual stream produced on a given channel and s # is the corresponding formal stream predicted by the denotational semantics, then s ⊑ s # .

Completeness Let s 0 ⊑ s 1 ⊑ • • • be the partial streams produced by the execution on a given channel such that any progress is done in finite time. The execution is complete if and only if s # = {s 0 , s 1 , . . .}.

Boundedness An execution is bounded if and only if the number of accumulated tokens on each internal channel does not exceed a bound. Following [START_REF] Parks | Bounded scheduling of process networks[END_REF], a KPN is strictly bounded if every complete execution of the network is bounded; it is bounded if there is at least one bounded execution; and it is unbounded if any execution requires unbounded memory.

B Boundedness and artificial deadlocks

The assumption about unbounded channels is clearly unrealistic. Real implementations bound channel capacities and impose blocking write operations; i.e. a process may block if it attempts to write on a full channel. This limitation of the model does not impact its determinism. In fact, any arbitrary KPN can be easily transformed into a strictly bounded network by adding a feedback channel for each internal channel. Before writing a token to an internal channel, a process must first read one token from the corresponding feedback channel. Dually, after reading a token from a channel, it has to write one token on the feedback channel. This way, the size of the channel is bounded by the number of initial tokens in the feedback channel.

This new operational semantics could introduce artificial deadlocks. This is the case when a subset of processes are blocked in a deadlock cycle, with at least one process being blocked on writing to a full channel. Since it is impossible to compute channel capacities at compile-time, one solution is to dynamically increase capacities when artificial deadlocks occur. Thus, dynamic scheduling requires run-time detection and resolution of artificial deadlocks. It has been proved in [START_REF] Geilen | Requirements on the execution of Kahn process networks[END_REF] that an artificial deadlock cannot be avoided by only changing the scheduling and without increasing some channel capacities.

The dynamic scheduling strategy proposed by Parks [START_REF] Parks | Bounded scheduling of process networks[END_REF] executes the KPN with initially small channel capacities. If an artificial global deadlock occurs, then the scheduler increases the capacity of the smallest channel and continues. Hence, if the KPN is bounded, then its execution will require a bounded memory. Geilen and Basten [START_REF] Geilen | Requirements on the execution of Kahn process networks[END_REF] have noticed that the strategy of Parks is not complete because it deals only with global deadlocks. Indeed, it gives priority to non-terminating execution over bounded execution, and to bounded execution over complete execution. They proposed therefore a deadlock resolution algorithm, built upon the notion of chains of dependencies, that also handles artificial local deadlocks. This scheduling strategy is correct for effective KPNs where a produced token on an internal channel is ultimately consumed.

C Dynamic scheduling policies

Dynamic scheduling policies can be classified as data-driven policies (i.e. eager execution), or demand-driven policies (i.e. lazy execution), or a combination of both.

Demand-driven scheduling

The activation of a process is delayed until its output is needed by another process. Kahn and MacQueen described a demand-driven scheduling technique in [START_REF] Kahn | Coroutines and networks of parallel processes[END_REF] where the process responsible of sending the results to the environment is selected to drive the whole network. Upon an attempt to read from an empty channel, the consumer blocks and the producer process for that channel is activated. This latter will be suspended after producing the necessary data, and then the waiting consumer process will be again activated. In a technique called anticipation, the producer process may continue producing data on the channel in parallel with the consumer until it reaches the threshold of the channel called the anticipation coefficient.

Data-driven scheduling A process is activated as soon as sufficient data is available on its input ports. This policy satisfies the completeness criterion, since processes only block on reading from empty channels. The data-driven policy may lead to unbounded accumulation of tokens on internal channels. Pingali and Arvind proved that it is possible to transform a network so that a data-driven execution of the resulted network is equivalent to a demand-driven execution of the original one [START_REF] Pingali | Efficient demand-driven evaluation. part 1[END_REF][START_REF] Pingali | Efficient demand-driven evaluation. part 2[END_REF]. This implies that a demand-driven scheduling policy may or may not satisfy the boundedness criterion.

Dataflow process networks

A dataflow process network (DPN) is a graph where nodes are dataflow actors and edges are FIFO channels. An actor, when it fires, consumes finite number of input tokens and produces finite number of output tokens. A set of firing rules indicates when the actor is enabled to fire. This style of dataflow models, introduced by Dennis [START_REF] Dennis | First version of a data flow procedure language[END_REF], has influenced concurrent programming languages and computer architectures for several years.

As shown later, repeated firings of an actor form a particular type of Kahn process called dataflow process. It is very convenient to break down a process to a sequence of firings in order to enable efficient implementations and formal analyses. However, the relation between the Kahn's denotational semantics and the operational data-driven semantics of DPNs became clear only after the outstanding work of Lee and Parks [START_REF] Lee | The semantics of dataflow with firing[END_REF][START_REF] Parks | Bounded scheduling of process networks[END_REF][START_REF] Lee | Dataflow process networks[END_REF].

Mathematically speaking, a dataflow actor with m input and n output channels consists of a firing function f : A m -→ A n and a finite set R of firing rules. A firing rule is just an m-tuple that is "satisfied" if each sequence of the tuple is a prefix of the sequence of tokens accumulated in the corresponding input channel. In other words, it indicates what tokens must be available at the inputs for the actor to be enabled. The code of the firing function will be executed each time a rule is satisfied, and tokens will be consumed as specified by that rule. Clearly at most one firing rule should be satisfied at each time in order to have a deterministic behavior of the actor. Therefore, for all r, r ′ ∈ R, if r = r ′ , then r ⊔ r ′ must not exist.

A set of firing rules is said to be sequential if it can be implemented as a sequence of blocking read operations. Lee and Parks proposed in [START_REF] Lee | Dataflow process networks[END_REF] a simple algorithm to decide whether a set of firing rules is sequential or not. Sequential firing rules are a sufficient condition for a dataflow process to be continuous. Despite the fact that not every set of firing rules which satisfies the above mentioned condition about upper bounds is sequential, that condition is more restrictive than what is really necessary for a dataflow to be continuous. A weaker condition (commutative firing rules) is given in [START_REF] Lee | The semantics of dataflow with firing[END_REF] which states that if the upper bound r ⊔ r ′ exists, then the order in which these two rules are used does not matter; i.e. f (r).f (r ′ ) = f (r ′ ).f (r) and r ⊓ r ′ = ǫ m . Unlike sequential firing rules, commutative rules enable compositionalilty; in the sense that the composition of two actors with commutative firing rules is an actor with commutative firing rules.

Relation to KPNs

Each actor, with a function f and a set of firing rules R, is associated with a functional

F : [A m -→ A n ] -→ [A m -→ A n ] such that ∀g ∈ [A m -→ A n ] : ∀S ∈ A m : F (g)(S) = f (r).g(S ′ ) if ∃r ∈ R : S = r.S ′ ǫ m otherwise
As proved in [START_REF] Lee | The semantics of dataflow with firing[END_REF], F is a continuous and closed function on the CPO ([A m -→ A n ], ⊑) and has therefore a least fixed-point that can be computed iteratively by ∀S ∈ A m : g 0 (S) = ǫ n ( g 0 is trivially continuous) and

g n+1 = F (g n ). Clearly, if S = r 1 .r 2 . • • • , then g 0 (S) = ǫ n , g 1 (S) = f (r 1 ), g 2 (S) = f (r 1 )
.f (r 2 ), . . . In words, the dataflow process (i.e. the least fixed-point) is constructed by repeatedly firing the actor. This least fixed-point is continuous and it is therefore a Kahn process.

Specific dataflow graph models

Due to Turing-completeness of dataflow graphs, their boundedness and static scheduling are generally undecidable. A bunch of restricted models that trade off expressiveness for decidability have been developed over the past years. They can be classified into two main categories: static dataflow graphs [START_REF] Ha | Decidable dataflow models for signal processing: synchronous dataflow and its extensions[END_REF] and dynamic dataflow graphs [START_REF] Bhattacharyya | Dynamic dataflow graphs[END_REF].

A Static dataflow graphs

Static dataflow models restrict actors so that on each port and at each firing, they produce and consume a compile-time known number of tokens. These models are amenable for construction of static schedules (with finite descriptions) that execute the graphs in bounded memory.

The synchronous dataflow (SDF) model [START_REF] Lee | Synchronous data flow[END_REF] is widely used for embedded systems design, especially for digital signal processing systems. In SDF, the production (or consumption) rate of each port is constant; i.e. an actor produces (or consumes) a fixed number of tokens on each port. If all the rates in the graph are equal to 1, then the graph is said to be a homogeneous synchronous dataflow (HSDF) graph. HSDF graphs are equivalent to marked graphs [START_REF] Murata | Circuit theoretic analysis and synthesis of marked graphs[END_REF] while SDF graphs are equivalent to weighted marked graphs [START_REF] Teruel | On weighted Tsystems[END_REF]. Both marked graphs and weighted marked graphs are subclasses of Petri nets, whose literature provides many useful theoretical results. Computation graphs [START_REF] Karp | Properties of a model for parallel computations: Determinacy, termination, queueing[END_REF] are similar to SDF graphs; however, each channel is associated with a threshold that can be greater than its consumption rate. An actor can fire only if the number of accumulated tokens on each input channel exceeds its threshold. Cyclo-static dataflow (CSDF) model [START_REF] Blisen | Cycle-static dataflow[END_REF] is a generalization of SDF where the number of produced (or consumed) tokens on a port may vary from one firing to another in a cyclic manner.

The SDF model assumes that both the producer and the consumer of a channel manipulate the same data type. However, in multimedia applications, it is natural to use composite data types such as video frames so that, for example, a node may consume or produce only a fraction of the frame each time. In the fractional rate dataflow (FRDF) model [START_REF] Oh | Fractional rate dataflow model and efficient code synthesis for multimedia applications[END_REF], an actor can produce (or consume) a fractional number of tokens at each firing which leads generally to better buffering requirements compared to the equivalent SDF graph. The FRDF model gives a statistical interpretation of a fraction x y associated to a given port in case of atomic data types; i.e. the actor produces (or consumes) x tokens each y firings but without assuming any knowledge on the number of tokens produced (or consumed) each time. Therefore, the scheduling algorithm should consider the worst-case scenarios.

More varieties of the SDF model, that tailor the model for specific needs, can be found in the literature. In the scalable synchronous dataflow model [START_REF] Ritz | High level software synthesis for signal processing systems[END_REF], the number of produced (or consumed) tokens on a given port can be any integer multiple of the predefined fixed rate of that port. So, all rates of an actor will be scaled by a scale factor. The static analysis must determine the scale factor of each actor in a way that compromises between function call overheads and buffer sizes.

B Dynamic dataflow graphs

Some modern applications have production and consumption rates that can vary at run time in ways that are not statically predictable. Dynamic models provide the required expressive power, but at cost of giving up powerful static optimization techniques or guarantees on compile-time bounded scheduling.

Boolean dataflow (BDF) model [START_REF] Buck | Scheduling dynamic dataflow graphs with bounded memory using the token flow model[END_REF] is an extension of SDF that allows data-dependent production and consumption rates by adding two control actors called select and switch. The switch actor consumes one boolean token from its control input and one token from the data input, and then copies the data token to the first or second output port according to the value of the control token. The behavior of the select actor is dual to that of the switch actor; both of them combined may allow us to build if-then-else constructs and do-while loops. BDF model is Turing-complete [START_REF] Buck | Scheduling dynamic dataflow graphs with bounded memory using the token flow model[END_REF]; hence, the questions of boundedness and liveness are undecidable. Nevertheless, the static analysis is yet possible for many practical problems. A variant of the BDF model is the integer-controlled dataflow (IDF) model [START_REF] Buck | Static scheduling and code generation from dynamic dataflow graphs with integer-valued control systems[END_REF] in which we can model an actor that consumes an integer token and then produces a number of tokens equal to that integer.

Scenario aware dataflow (SADF) model [START_REF] Theelen | A scenario-aware data flow model for combined long-run average and worst-case performance analysis[END_REF][START_REF] Stuijk | Scenario-aware dataflow: modeling, analysis, and implementation of dynamic applications[END_REF] extends the SDF model with scenarios that capture different modes of operation and express hence the dynamism of modern streaming applications. Production and consumption rates and execution times of actors may vary from one scenario to another. The SADF model distinguishes data and control explicitly by using two kinds of actors: kernels for the data processing parts and detectors to handle dynamic transitions between scenarios. Furthermore, there are two kinds of channels: control channels which carry scenario-valued tokens and usual data channels. Detectors contain discrete-time Markov chains to capture occurrences of scenarios and allow hence for average-case performance analysis.

Parameterized synchronous dataflow (PSDF) [START_REF] Bhattacharya | Parameterized dataflow modeling of DSP systems[END_REF] and schedulable parametric dataflow (SPDF) [START_REF] Fradet | SPDF: a schedulable parametric dataflow MoC[END_REF] models are examples of parameterized dataflow which is a meta-modeling approach for integrating dynamic parameters (such as parametric rates) in models that have a well-defined concept of iteration (e.g. SDF and CSDF). SPDF extends SDF with parametric rates that may change dynamically and it is therefore necessary to statically check consistency and liveness for all possible values of the parameters. In addition to the classical analyses of SDF, we have also to check whether dynamic update of parameters is safe in terms of boundedness. This analysis is possible since parameters can be updated only at the boundaries of (local) iterations.

C Comparison of models

Dataflow models can be compared with each other using three features [START_REF] Stuijk | Predictable mapping of streaming applications on multiprocessors[END_REF]: expressiveness and succinctness, analyzability and implementation efficiency. These features can be illustrated by the following examples. BDF model is more expressive than the CSDF model since this latter does not allow modeling of data-dependent dynamic production and consumption rates. The CSDF, SDF, HSDF models have the same expressiveness; any behavior that can be modeled with one of them can be modeled with the two other models. Nevertheless, the resulted graphs have different sizes with CSDF graphs being the most succinct. Transformation of (C)SDF graphs into equivalent HSDF graphs use an unfolding process that replicates each actor possibly an exponential number of times [START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF][START_REF] Lee | Static scheduling of synchronous data flow programs for digital signal processing[END_REF][START_REF] Blisen | Cycle-static dataflow[END_REF]. A transformation of CSDF graphs into SDF graphs such that each CSDF actor is mapped to a single SDF actor was presented in [START_REF] Parks | A comparison of synchronous and cyclestatic dataflow[END_REF]; however, this transformation may create deadlocks, covers unnecessary computations, and exposes less parallelism.

HSDF model is more analyzable than the (C)SDF model in sense that existing analysis algorithms for HSDF graphs have lower complexities than the corresponding algorithms for (C)SDF graphs with the same number of nodes. Implementation efficiency concerns the complexity of the scheduling problem and the code size of the resulting schedules. For example, scheduling of computation graphs is more complex than scheduling of SDF graphs because of the threshold constraint on consumption.

Dataflow synchronous model

KPNs and Dataflow process networks are closely related, while dataflow synchronous models are quite different. There are a bunch of synchronous languages (e.g. SIG-NAL [START_REF] Guernic | POLYCHRONY for system design[END_REF], ESTEREL [START_REF] Berry | The foundations of Esterel[END_REF], LUSTRE [START_REF] Halbwachs | The synchronous dataflow programming language LUSTRE[END_REF], LUCID SYNCHRONE [START_REF] Caspi | Synchronous Kahn networks[END_REF]) dedicated to reactive systems design that rely on the same assumptions (the synchronous paradigm) [START_REF] Benveniste | From synchrony to asynchrony[END_REF][START_REF] Benveniste | Compositionality in dataflow synchronous languages: specification & distributed code generation[END_REF]:

1. Programs progress via an infinite sequence of reactions. The system is viewed through the chronology and simultaneity of the observed events, which constitute a logical time, rather than the chronometric view of the execution progress. The synchronous hypothesis therefore assumes that computations and communications are instantaneous. This hypothesis is satisfied as long as a reaction to an input event is fast enough to produce the output event before the acquisition of the next input events. The synchrony hypothesis simplifies the system design; however it implies that only bounded KPNs can be specified (by programming processes that act as bounded buffers).

2. Testing inputs for emptiness is allowed. Hence, decisions can be taken on the basis of the absence of some events. Synchronous programs can have therefore a nondeterministic behavior.

3. Parallel composition is given by taking the pairwise conjunction of associated reactions, whenever they are composable.

A Abstract clocks

The denotational semantics of both untimed models of computation (e.g. KPNs) and timed models (e.g. dataflow synchronous model) can be expressed in a single denotational framework ("meta-model"): the tagged signal model [START_REF] Lee | A framework for comparing models of computation[END_REF]. The main objectives of this model is to allow comparison of certain properties of several models of computation, and also to homogenize the terms used in different communities to mean sometimes significantly different things (e.g. "signal", "synchronous"). The basic idea of this framework is to couple streams (or sequences) with a tag system and consider hence signals instead of untimed streams. The tag system, when specifying a system, should not mark physical time but should instead reflect ordering introduced by causality. The tag system presented in this section is tailored to the dataflow synchronous model. Definition 1.1 (Tag system). A tag system is a complete partial order (T , ⊑). It provides a discrete time dimension that corresponds to logical instants according to which the presence and absence of events can be observed. Usual set operations and comparisons can be naturally applied on clocks. Relations between clocks can be deduced from the different operations on signals (e.g. merge, select). The relational synchronous language SIGNAL allows explicit manipulation of clocks. Table 1 Elementary relations can be combined to produce more sophisticated clock transformations. One important clock transformation is the affine transformation, described in [START_REF] Smarandache | Validation of mixed signalalpha real-time systems through affine calculus on clock synchronisation constraints[END_REF], and used extensively in this thesis. A subclass of affine relations between abstract clocks was used in [START_REF] Gamatié | Design of streaming applications on MPSoCs using abstract clocks[END_REF] to address time requirements of streaming applications on multiprocessor systems on chip. Definition 1.4 (Affine transformation). An affine transformation of parameters (n, ϕ, d) applied to the clock ŝ produces a clock r by inserting (n -1) instants between any two successive instants of ŝ, and then counting on this fictional set each d th instant, starting with the (ϕ + 1) th instant.

B Quasi-synchrony and N-synchronous

Two signals s 1 and s 2 are said to be synchronous if and only if ŝ1 = ŝ2 . Synchronous dataflow languages provide a type system, called clock calculus, that ensures that a signal can be assigned only to another signal with the same clock (i.e. buffer-less communication). This does not however mean that a signal cannot be delayed. Mitigation of this strong requirement has been the subject of some works motivated by the current practice in real-time systems development; especially real-time systems that consist of a set of periodic threads which communicate asynchronously.

Quasi-synchrony is a composition mechanism of periodic threads that tolerates small drifts between thread's release (i.e. activation) clocks [START_REF] Caspi | About the design of distributed control systems: the quasi-synchronous approach[END_REF]. If ŝ and r are the activation clocks of two periodic threads, then their quasi-synchronous composition is such that between two occurrences of ŝ there are at most two occurrences of r, and conversely, between two occurrences of r there are at most two occurrences of ŝ. This definition was refined in [START_REF] Halbwachs | Simulation and verification of asynchronous systems by means of a synchronous model[END_REF] to enable synchronous occurrences. If t 1 and t 2 are two successive tags in ŝ, then |{t ∈ r|t 1 ❁ t ⊑ t 2 }| ≤ 2; Conversely, if t 1 and t 2 are two successive tags in r, then |{t ∈ ŝ|t 1 ❁ t ⊑ t 2 }| ≤ 2. A stream between two quasi-synchronously composed threads can be no more considered neither as an instantaneous (buffer-less) communication nor as a bounded FIFO; but rather as a shared variable. Hence, some values are lost if the sender is faster than the receiver and some values are duplicated if the receiver is faster than the sender. This non-flow-preserving semantics was taken further in the Prelude compiler [START_REF] Pagetti | Multi-task implementation of multi-periodic synchronous programs[END_REF] as shown later.

In the N-synchronous paradigm [START_REF] Cohen | Nsynchronous Kahn networks: a relaxed model of synchrony for real-time systems[END_REF], two signals can be assigned to each other as long as a bounded communication is possible. Hence, the new synchronizability relation states that two clocks ŝ and r are synchronizable if and only if for all n ∈ N >0 , the n th tags of ŝ and r are at bounded distance. Formally, ∀t ′ ∈ ŝ : |{t ∈ ŝ|t ⊑ t ′ }| -|{t ∈ r|t ⊑ t ′ }| is bounded. This model allows to specify any bounded KPN. Unlike the quasi-synchronous approach, communications in this model are flow-preserving.

C From synchrony to asynchrony

Although the synchronous hypothesis states that reactions are instantaneous, causality dependencies dictate in which order signals are evaluated within a reaction. For instance, the presence of a signal must be decided before reading its value. A schizophrenic cycle is one in which the presence of a signal depends on its value. More dependencies can be deduced from elementary processes. For example, computing values of s 1 , . . . , s n must precede computing value of r = f (s 1 , . . . , s n ). Synchronous languages provide the necessary tools to check deadlock freedom; that is, there is no cycle in the dependencies graph.

Desynchronizing a signal to obtain an asynchronous communication consists in getting rid of the tags information and hence preserving only the stream. A synchronous process may take some decisions based on the absence of a signal; but it can no more test the emptiness of an input in an asynchronous implementation. The question that raises naturally is whether it is possible to resynchronize a desynchronized signal. An endochronous process [START_REF] Benveniste | From synchrony to asynchrony[END_REF] is a process that can incrementally infer the status (presence/absence) of all signals from already known and present signals. Therefore, an endochronous process should have a unique master clock so that all the other clocks are subsets of it. Endochrony is undecidable in the general case [START_REF] Benveniste | From synchrony to asynchrony[END_REF]. An endochronous pro-cess is equivalent to a dataflow process with sequential set of firing rules; and it is hence a Kahn process. Weak endochrony [START_REF] Potop-Butucaru | Concurrency in synchronous systems[END_REF] is a less restrictive condition than endochrony. A weakly endochronous process is equivalent to a dataflow process with commutative firing rules. Similarly to composition properties of dataflow actors, the composition of two endochronous processes is not in general an endochronous process; while the composition of two weakly endochronous processes results in a weakly endochronous process.

The compositional property of isochrony ensures that the synchronous composition of (endochronous) processes is equivalent to their asynchronous composition. It is an important property for designing globally asynchronous locally synchronous (GALS) architectures. Roughly speaking, a pair of processes is isochronous if every pair of their reactions which agree on present common signals also agree on all common signals.

D Lucy-n

Lucy-n [START_REF] Mandel | Lucy-n : a n-Synchronous Extension of Lustre[END_REF] is an extension of the synchronous language LUSTRE with an explicit buffer construct for programming networks of processes communicating through bounded buffers. The synchronizability relation is the one defined by the N-synchronous paradigm. Lucy-n provides a clock calculus (defined as an inference type system) which can compute the necessary buffer sizes using a linear approximation of boolean clocks. We illustrate the semantics of Lucy-n using a simple example (Listing 1.1). The clock of each signal is denoted by a binary sequence such that 1 represents presence and 0 represents absence. The clock calculus handles only ultimately periodic clocks which are denoted syntactically by u(v). The N-synchronous execution is presented in Table 1.2. Since the (+) operator is a stepwise operator, signals a and buffer(b) must have the same clock 1 ω on (0 1) ω . However, this program must be rejected because signal a and b are not synchronizable (as defined by the N-synchronous paradigm). Indeed, the difference between the n th tags of â and b are not at a bounded distance when n tends to infinity. So, the inserted buffer is unbounded. Real-time constraints: Real-time constraints represent environmental constraints and they are specified either on node inputs and outputs (e.g. periods, phases, deadlines) or on nodes (worst-case execution time). In Listing 1.2, signal x has a period of 10 and a first start time equals to zero. This implies that task ADD is a periodic task with a period equal to 10. The compiler checks the consistency of real-time constraints (e.g. inputs and outputs of a node have the same period) and earliest-deadline first schedulability of the specification.

Communication patterns: Rate transition operators (e.g. * , /) handle transition between nodes of different rates and hence enable the definition of user-provided communication patterns. For example, in Listing 1.2, flow a is under-sampled using operator /2; which implies that node ADD is twice as fast as node INC. As in quasi-synchrony, communication is non-flow-preserving; i.e. when the producer is faster than the consumer, an adapter is added allowing some produced tokens to not be buffered; and when the consumer is faster, an adapter is added to allow for reading the same value several times. Furthermore, communications are deterministic (i.e. not affected by the earliest-deadline first scheduling policy and preemption). To realize this objective some deadlines are adjusted to enforce some precedences between jobs.

Static analysis of (C|H)SDF graphs

The HSDF, SDF, and CSDF models have been used as the underlying models of several Digital Signal Processing (DSP) programming environments, since they combine good levels of analyzability and expressivity. Indeed, properties such as boundedness and liveness are decidable. Furthermore, static-periodic scheduling of (C|H)SDF graphs has been the subject of an enormous number of works that have addressed the problem with respect to different non-functional constraints: throughput, buffering, latency, code size, etc. The proposed analyses abstract from the actual values of data that are being communicated, and focus only on the non-functional properties such as the distribution of tokens over channels. This section presents some existing analyses; and it is by no means a complete in-depth survey.

Definition 1.5 (Static dataflow graph). A static dataflow graph is a directed graph G = (P, E) consisting of a finite set of actors P = {p 1 , . . . , p N } and a finite set of oneto-one edges (or channels) E. A channel e = (p i , p k , x, y) ∈ E connects the producer p i to the consumer p k such that the production (resp. consumption) rate is given by the infinite integer sequence x ∈ N ω (resp. y ∈ N ω ). For instance, the j th firing of actor p i (denoted by p i [j]) writes x(j) tokens on channel e.

(H|C)SDF graphs are specific cases of static dataflow graphs. Each rate function x is a constant sequence (i.e. x = a ω with a ∈ N >0 ) in the SDF model, a periodic sequence (i.e. x = v ω with v ∈ N * and v > 0) in the CSDF model, and equals to 1 (i.e. x = 1 ω ) in the HSDF model. Figure 1.1 shows a SDF graph, and its transformation into an equivalent HSDF graph, where a black dot on an edge represents an initial token in the channel.

into M ′ contains p i ). If θ(e 2 ) = 1, then the SDF graph is not live because [0 1 1] T p 3 -→ [2 1 0] T deadlock -→ .

A Consistency

If a dataflow graph is not consistent, then its execution requires unbounded channels or unbounded number of initial tokens to not deadlock. Only consistent graphs are of interest in this thesis. Consistency is a structural property that can be verified efficiently [START_REF] Battacharyya | Software synthesis from dataflow graphs[END_REF][START_REF] Lee | Synchronous data flow[END_REF][START_REF] Blisen | Cycle-static dataflow[END_REF]. A (C|H)SDF graph can be described by a

|E| × |P | topology matrix Γ such that ∀e j = (p i , p k , v ω 1 , v ω 2 ) : Γ j,i = v 1 |v 1 | , Γ j,k = -v 2 |v 2 |
, and Γ j,l = 0 for any other actor p l .

For a graph to be consistent, a positive non-null integer solution of the balance equation (Equation 1.1) must exist.

Γ r = 0 (1.1)
The minimal solution is called the repetition vector which determines the relative firing frequencies of actors. The repetition vector of the SDF graph in Figure 1.1 is equal to

[2 1 3] T .
The balance equation can be easily explained as follows. Let |σ| i be the number of firings of actor p i during a complete execution σ. The total number of produced tokens

on channel e = (p i , p k , v ω 1 , v ω 2 ) converges to v 1 |v 1 | |σ| i while the number of consumed tokens converges to v 2 |v 2 | |σ| k .
A necessary condition for e to be bounded is that

|σ| i |σ| k = v 2 |v 2 | |v 1 | v 1 = r(i) r(k)
Equation 1.1 ensures that cycles can satisfy this constraint. Any dataflow graph without undirected cycles is consistent.

B Graph iteration

An iteration is a sequence of actor firings that returns the graph into its initial marking. The firing sequence must contain k r(i) firings of each actor p i with k ∈ N >0 . Repeating the iteration infinitely results in a bounded and complete execution. For the reachability graph in Figure 1.2, the periodic sequence (p 2 p 3 p 3 p 3 p 1 p 1 ) ω is such a bounded execution. Not all bounded executions should be periodic. Indeed, the language recognized by the reachability graph in Figure 1.2 (considered as a Büchi automaton) is not periodic.

The balance equation is a necessary but not sufficient condition for the existence of an iteration. In fact, an iteration that returns the graph to its initial marking may not exist. That depends essentially on the initial marking. If the graph is live and consistent, then an iteration always exists [START_REF] Ghamarian | Liveness and boundedness of synchronous dataflow graphs[END_REF]. One simple solution to test the existence of an iteration is through simulated execution that consists in constructing the reachability graph [START_REF] Lee | Synchronous data flow[END_REF]. A second solution is to check that all maximal strongly connected components are deadlock-free [START_REF] Ghamarian | Liveness and boundedness of synchronous dataflow graphs[END_REF]. The third solution consists in checking that the equivalent HSDF graph of any directed cycle in the CSDF graph is live [START_REF] Blisen | Cycle-static dataflow[END_REF]. A necessary and sufficient condition for a single-rate (i.e. HSDF) graph to be live is that every directed cycle in it contains at least one initial token.

A sufficient and necessary condition for a cycle to be deadlock-free was presented for computation graphs in [START_REF] Karp | Properties of a model for parallel computations: Determinacy, termination, queueing[END_REF], and adapted for SDF graphs in [START_REF] Murthy | Scheduling techniques for synchronous and multidimentional synchronous dataflow[END_REF]

Γ x ≤ B
where Γ is the topology matrix of the cycle and B is the vector such that B(i) = b iθ(e i ) -1. Assume that there is a non-negative integer solution x 0 . After firing each actor p i as many times as indicated by x 0 (i), the number of tokens in channel e i will be less or equal to θ(e i ) + B(i) = b i -1. This is a deadlocked state.

In the periodic schedule (p 2 p 3 p 3 p 3 p 1 p 1 ) ω , three instances of actor p 3 are enabled at the same time. Therefore, if there are enough processing units, the three firings can be executed in parallel. This behavior is called auto-concurrency. To constrain the auto-concurrency of an actor p such that at most b firings of actor p can execute in parallel, we need to add a single-rate self-loop e = (p, p, 1 ω , 1 ω ) such that θ(e) = b. In Figure 1.1, auto-concurrency of actors p 1 and p 3 is disabled in the HSDF graph.

As described for KPNs, to constrain the size of a channel e = (p i , p k , x, y) to be less than or equal to b, we may add a feedback channel e ′ = (p k , p i , y, x) such that θ(e) + θ(e ′ ) = b. This way, any bounded graph can be transformed to a strongly connected graph.

A static-order schedule [START_REF] Murthy | Scheduling techniques for synchronous and multidimentional synchronous dataflow[END_REF] is an infinite sequence of actor firings such that actors in the sequence are fired one after one without overlapping. If the firing sequence is periodic, then the schedule is called a static-periodic schedule (or a cyclic executive).

Timing analysis

In a timed dataflow graph, each actor p i is associated with a (constant or periodic) worst-case execution time sequence η i ∈ N ω such that η i (j) is the worst-case execution time of firing p i [j]. As shown in Figure 1.1, worst-case execution times are denoted inside the nodes. When it is needed, a single worst-case execution time of actor p i is taken as

C i = max j η i (j).
One important operational semantics, especially to analyze timing properties, is the self-timed execution [START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF] which can be described formally in terms of a labeled transition system as proposed in [START_REF] Stuijk | Predictable mapping of streaming applications on multiprocessors[END_REF][START_REF] Ghamarian | Throughput analysis of synchronous data flow graphs[END_REF]. Definition 1.6 (Self-timed execution). An actor is enabled if there are enough tokens on its input channels. In a self-timed execution, an actor fires as soon as it is enabled. Figure 1.3 depicts the self-timed execution of the SDF example. At time 10, one instance of p 2 ends leading to channel state [0 0 3] T and hence three instances of actor p 3 start their executions. As illustrated in Figure 1.3 and proved in [START_REF] Ghamarian | Throughput analysis of synchronous data flow graphs[END_REF], the state-space of the self-timed execution of a consistent and strongly connected SDF graph consists of a transient phase followed by a periodic phase.

Self-timed boundedness does not coincide with the general notion of (strict) boundedness [START_REF] Ghamarian | Liveness and boundedness of synchronous dataflow graphs[END_REF] since self-timed executions are a subset of all the possible executions. All self-timed bounded graphs are bounded but not necessarily strictly bounded; and not all bounded graphs are self-timed bounded.

A Throughput analysis

One of the most primordial performance metrics of DSP and real-time multimedia applications is throughput. The throughput of an actor p in an execution σ is defined

Design and Verification

as the average number of firings of p in σ per unit of time; and it is denoted by Θ(p, σ). The maximum throughput of an actor p is obtained by the self-timed execution; and it is denoted simply by Θ(p). The self-timed throughput of an actor in a consistent and strongly connected CSDF graph is bounded; However, if an actor is always enabled, then its self-timed throughput tends to infinity. The self-timed throughput of a consistent and strongly connected graph G is defined as Θ(G) = Θ(p i ) r(i) for an arbitrary p i ∈ P . Throughput analysis has been proposed in the literature either as a (symbolic) state-space exploration [START_REF] Ghamarian | Throughput analysis of synchronous data flow graphs[END_REF][START_REF] Ghamarian | Liveness and boundedness of synchronous dataflow graphs[END_REF] or as a maximum cycle mean analysis [START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF]. In the first approach, the self-timed throughput is computed from the periodic phase of the selftimed execution constructed by a simulated execution. In the second approach, and as proved in [START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF], the self-timed throughput of the graph is equal to 1 over the maximum cycle mean (MCM) of the equivalent HSDF graph. The MCM of a HSDF graph G, assuming that η i is a constant sequence for all p i ∈ P , is defined as

MCM(G) = max cycle C∈G      p i ∈P C i e∈C θ(e)     
Efficient algorithms for computing MCM have been proposed in the literature [START_REF] Karp | A characterization of the minimum cycle mean in a digraph[END_REF][START_REF] Dasdan | Experimental analysis of the fastest optimum cycle ratio and mean algorithms[END_REF]. However, transforming a CSDF graph into a HSDF graph can result in an exponential number of actors compared with the original graph. Because of this, and as illustrated by experimental evaluations [START_REF] Ghamarian | Throughput analysis of synchronous data flow graphs[END_REF], state-space exploration approach outperforms the MCM-based approach.

Reduction techniques [START_REF] Geilen | Reduction techniques for synchronous dataflow graphs[END_REF] may help to obtain smaller and hence more analyzable HSDF graphs. One proposed technique is to abstract a (H)SDF graph G with a smaller one G ′ where actors with identical firing rates are ordered and represented as a single actor. Authors proved that, following their transformation rules, the resulted graph G ′ will have a conservative throughput; i.e. Θ(G ′ ) ≤ Θ(G). A second technique was a new transformation algorithm of SDF graphs into HSDF graphs that produces not necessarily an equivalent image but only a conservative one. This technique relies on a symbolic state-space exploration (a Max-Plus model) limited to the phase and a period of the self-timed execution. The resulted graph is at most quadratic in the number of initial tokens in the original graph.

As shown in [START_REF] Ghamarian | Throughput analysis of synchronous data flow graphs[END_REF][START_REF] De Groote | Max-plus algebraic throughput analysis of synchronous dataflow graphs[END_REF], the state-space exploration can be characterized by a Max-Plus algebra [START_REF] Baccelli | Synchronization and linearity: an algebra for discrete event systems[END_REF]. Let t i [j] be the start time of the j th firing of actor p i . In Max-Plus algebra, t i [j] is expressed in terms of the start times of some preceding firings by means of two operators: the maximum ⊕ (used in the role of addition) and the ordinary addition ⊗ (used in the role of multiplication). For the HSDF example (Figure 1

.1(b)), t 1,1 [j] = (t 1,2 [j -1] ⊕ 10) ⊕ (t 3,1 [j] ⊗ 20) ⊕ (t 3,2 [j] ⊗ 20).
The max-plus time system of a SDF graph can be constructed without transforming the graph into an HSDF graph (see [START_REF] De Groote | Max-plus algebraic throughput analysis of synchronous dataflow graphs[END_REF] for details). The set of sum-of-products equations can be encoded as a matrix equation t j = A t j-1

Vector t j describes the start times of the j th firings of all actors; i.e. ∀p i :

t j (i) = t i [j].
If t 0 encodes the initial state, then t j = A j t 0 describes the progress of the self-timed execution over time. The eigenvalue λ (i.e. the solution of equation A t = λ ⊗ t ) equals the MCM of the graph; and thus the throughput of the graph is equal to 1 λ . A parametric throughput analysis of SDF graphs is presented in [START_REF] Ghamarian | Parametric throughput analysis of synchronous data flow graphs[END_REF] where actors' execution times can be parameters. The throughput is hence computed as function of the parameters. Recalculation of throughput is then simply an evaluation of this function for specific parameter values. This parametric analysis could be useful at design time to avoid recalculation of the throughput for each different configuration.

B Throughput in multiprocessor scheduling

The self-timed execution, under which a maximal throughput can be obtained, assumes that there is an unlimited number of processing units. Multiprocessor scheduling of dataflow graphs assumes a fixed number of processing units. It can be either dynamic or static [START_REF] Lee | Scheduling trategies for multiprocessor real-time DSP[END_REF][START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF]. The partitioned static-order scheduling problem of dataflow graphs consists in statically (and permanently) mapping actors onto a fixed number of processors {A 1 , . . . , A M } (the allocation step), constructing a static-order schedule of each partition A i (the scheduling step), and determining exactly when each actor fires such that all data precedence constraints are met (across processors). This problem has been extensively studied in the two past decades from multiple angles of view. Throughput maximization was one of the most important optimization criteria. Existing solutions either transform the graph into a HSDF graph [START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF][START_REF] Sriram | Determining the order of processor transactions in statically scheduled multiprocessors[END_REF][START_REF] Moreira | Multiprocessor resource allocation for hard-real-time streaming with a dynamic job-mix[END_REF] or compute mapping and scheduling directly on (C)SDF graphs [START_REF] Stuikj | Multiprocessor resource allocation for throughput-constrained synchronous dataflow graphs[END_REF][START_REF] Bonfietti | Throughput constraint for synchronous data flow graphs[END_REF].

The achieved throughput depends on both allocation and scheduling. In most approaches the two steps are performed separately as a bin-packing heuristic due to the NP-hardness of the scheduling problem. Firstly, the actors are ordered according to some criterion. In [START_REF] Stuikj | Multiprocessor resource allocation for throughput-constrained synchronous dataflow graphs[END_REF], actors are ordered according to their impact on the throughput of the graph. As described before, the throughput of the graph is limited by its critical path. To avoid graph transformation and MCM analysis, authors proposed an approximate cost function to estimate the criticality of an actor p i .

cost(p i ) = max

Cycle C|p i ∈C

p k ∈C r(k) . avg(η k ) e∈C θ(e)/ẽ
avg(η k ) is the average execution time of actor p k on different processing units. For a channel e = (p, q, x, v ω ), value ẽ is equal to v |v| . After ordering the actors, the second step in the heuristic consists in binding actors, one after another, to processors according to some objective function. In [START_REF] Stuikj | Multiprocessor resource allocation for throughput-constrained synchronous dataflow graphs[END_REF][START_REF] Moreira | Multiprocessor resource allocation for hard-real-time streaming with a dynamic job-mix[END_REF], the objective was to balance the load of partitions. The load of a partition is estimated by the processor, memory, and connection utilizations. Actors are then assigned to partitions with a first fit or best fit strategy to achieve the desired objective.

C Retiming technique

Besides the graph topology and execution times, the initial delay distribution may limit the throughput. Retiming is a graph transformation technique for performance optimization (e.g. throughput maximization, minimizing memory usage, decreasing power consumption, etc.) that redistributes the delays and does not affect neither the topology nor the functionality of the graph [START_REF] Liveris | Retiming for synchronous data flow graphs[END_REF][START_REF] Zhu | Static rate-optimal scheduling of multirate DSP algorithms via retiming and unfolding[END_REF][START_REF] Zhu | Efficient retiming of multirate DSP algorithms[END_REF][START_REF] Zivojnovic | Optimizing DSP programs using multirate retiming transformation[END_REF][START_REF] O'neil | Retiming synchronous data-flow graphs to reduce execution time[END_REF][START_REF] Leiserson | Retiming synchronous circuitry[END_REF].

Figure 1.4(a) shows the SDF example with a different initial delay distribution (θ(e 1 ) = 4, θ(e 2 ) = 0, and θ(e 3 ) = 2). We impose that during each period of the selftimed execution, every actor p i fires only r(i) times (we can model this constraint by adding a fictional actor as illustrated in Figure 1.4(a)). As can be deduced from the self-timed execution (Figure 1.4(c)), the self-timed throughput is equal to 1 60 . After retiming the graph (θ(e 1 ) = 0, θ(e 2 ) = 2, and θ(e 3 ) = 1), the new self-timed throughput is equal to Let G be a consistent and live SDF graph and z : P -→ Z be a transformation vector such that the new retimed graph is obtained by firing each actor p i in the original graph z(i) times. Hence, for very channel e = (p i , p k , v ω 1 , v ω 2 ), the new number of initial tokens is θ ′ (e) = θ(e) + v 1 z(i)v 2 z(k). The retiming vector in the previous example was [2 0 1] T . A retiming is legal if it results in nonnegative delay distribution. The retimed graph will be then bounded and live. Most solutions search for an optimal legal retiming or a feasible one that satisfies some throughput constraints.

D Latency analysis

Another useful performance metric of interactive concurrent real-time applications is latency. Latency was defined in [START_REF] Sriram | Embedded multiprocessors: scheduling and synchronization[END_REF] for HSDF graphs and consistently generalized in [START_REF] Ghamarian | Latency minimization for synchronous data flow graphs[END_REF] to SDF graphs. It is measured for two actors p i and p k that are usually considered as the input and output of the system. To measure the latency, two fictional actors p 0 and p N +1 will be added to the graph such that in each iteration of the graph (according to the repetition vector) these two actors fire only once (i.e. r(0) = r(N + 1) = 1). The fictional actors have null execution times (i.e. η 0 = η N +1 = 0 ω ) in order to not affect the timing analysis. Two channels are added to the graph: e = (p 0 , p i , r(i) ω , 1 ω ) and e ′ = (p k , p N +1 , 1 ω , r(k) ω ) with θ(e) = θ(e ′ ) = 0. The κ(j) th firing of p N +1 is the firing that consumes some tokens whose construction involves the reading of some tokens produced by the j th firing of actor p 0 . Hence, the latency of actors p i and p k in an execution σ is given as

L σ i,k = max j∈N >0 {t N +1 [κ(j)] -t 0 [j]} where t i [j] is the start time of firing p i [j].
The minimal latency is obtained by the self-timed execution. However, due to resource constraints, the self-timed execution could not be possible. The worst minimal achievable latency is obtained for a single processor.

Memory analysis

Memory analysis concerns the minimization of both code size and channel sizes. Memory constraints are strong non-functional requirements since the amount of on-chip memory in embedded systems is severely limited due to several constraints (e.g. cost, power consumption, speed penalties, etc.).

A Code size minimization

Automatic code generation is an essential feature of any dataflow-based design environment. One widely used code generation strategy in single-processor scheduling is called threading which inlines the code of actors in a static-periodic schedule. One objective of such strategy is to minimize the resulted code size by using loops as efficient as possible.

For the schedule (p 2 p 3 p 3 p 3 p 1 p 1 ) ω of the SDF example, the generated code is shown in Listing 1.3.

Listing 1.3: Software synthesis from the SDF example.

while(true) do{ code of p2 for(i=0;i<3;i++){ code of p3 } for(i=0;i<2;i++){ code of p1 } } As shown in the reachability graph of the SDF example, there is an infinite number of static-periodic schedules that may have different code sizes. Periodic schedules that can be described with a regular expression in which each actor appears only once, and hence have a minimal size, are called single appearance schedules [START_REF] Bhattacharyya | Compiling dataflow programs for digital signal processing[END_REF][START_REF] Bhattacharyya | Synthesis of embedded software from synchronous dataflow specifications[END_REF]. The previous example is a single appearance schedule that can be described with (p 2 (p 3 ) 3 (p 1 ) 2 ) ω . As has been proved, every consistent acyclic SDF graph has at least one single appearance schedule. More results can be found in [START_REF] Bhattacharyya | Looped schedules for dataflow descriptions of multirate signal processing algorithms[END_REF][START_REF] Battacharyya | Software synthesis from dataflow graphs[END_REF][START_REF] Bhattacharyya | Generating compact code from dataflow specifications of multirate signal processing algorithms[END_REF]. For instance, a SDF graph has a single appearance schedule if and only if each strongly connected component has a single appearance schedule. Furthermore, a consistent strongly connected SDF graph has a single appearance schedule if and only if all its strongly connected subgraphs are loosely interdependent. As an illustration, the SDF example is loosely interdependent because it can be partitioned into two subsets A = {p 2 } and B = {p 1 , p 3 } such that actors in subset A can fire, as many times as indicated by the repetition vector, before any firing of actors in subset B. If the delay distribution is such that ∀i : θ(e i ) = 1, then the SDF example is not loosely interdependent; a single appearance schedule does not hence exist. Since a graph may have multiple single appearance schedules, selecting the one with the least buffering requirements was the choice of most solutions [START_REF] Murthy | Joint minimization of code and data for synchronous dataflow programs[END_REF][START_REF] Oh | Memory optimal single appearance schedule with dynamic loop count for synchronous dataflow graphs[END_REF].

B Buffer minimization

Minimizing buffer storage capacity has been the subject of several heuristics and exact approaches in the last two decades. It consists in finding the smallest buffering requirements that allow for a complete execution. The buffer minimization problem is known to be NP-complete [START_REF] Battacharyya | Software synthesis from dataflow graphs[END_REF][START_REF] Murthy | Scheduling techniques for synchronous and multidimentional synchronous dataflow[END_REF] by reduction of the Feedback arc set problem to buffer minimization in HSDF graphs.

If channels are implemented as separated storage spaces (i.e. empty space in one channel cannot be used to store tokens of other channels), then the buffer minimization problem consists in finding a schedule that minimizes e∈E ̥(e) max t {θ t (e)} where θ t (e) is the number of tokens in channel e at time t and ̥(e) is the size of a token (deduced from the data type). From the reachability graph of the SDF example and assuming that all tokens in the graph have the same size, the periodic schedule (p 3 p 2 p 3 p 1 p 3 p 1 ) ω results in the smallest buffer size distribution [4 2 3] T . This distribution is indeed minimal because the lower bound of the size of a channel e = (p i , p k , a ω , b ω ) in a SDF graph that can be achieved by any valid schedule is given in [START_REF] Murthy | Scheduling techniques for synchronous and multidimentional synchronous dataflow[END_REF]

by a + b -gcd(a, b) + θ(e) mod gcd(a, b) if 0 ≤ θ(e) ≤ a + b -gcd(a, b)
, and by θ(e) otherwise. This first variation of the buffer minimization problem is considered, for instance, in [START_REF] Lui | An efficient technique for analysis of minimal buffer requirements of synchronous dataflow graphs with model checking[END_REF][START_REF] Gu | Static scheduling and software synthesis for dataflow graphs with symbolic model-checking[END_REF][START_REF] Cubric | Minimal memory schedules for dataflow networks[END_REF]1].

If memory is shared between buffers (i.e. all buffers share a single storage space), then the buffer minimization problem consists in finding the schedule that minimizes max t { e∈E ̥(e)θ t (e)}. Unlike the previous variation, this latter approach, considered in [START_REF] Murthy | Shared memory implementations of synchronous dataflow specifications[END_REF], must take into account the lifetime of tokens. Hybrid methods may combine the two variations as proposed in [START_REF] Oh | Memory-optimized software synthesis from dataflow program graphs with large size data samples[END_REF][START_REF] Geilen | Minimizing buffer requirements of synchronous dataflow graphs with model checking[END_REF]. In case the smallest buffer size distribution is not unique, scheduling algorithms choose either the distribution with the highest throughput or the one with the smallest code size.

Another variation of the buffer minimization problem is to minimize the buffering requirements while satisfying a throughput constraint [START_REF] Wiggers | Efficient computation of buffer capacities for multi-rate real-time systems with back-pressure[END_REF][START_REF] Wiggers | Efficient computation of buffer capacities for cyclo-static dataflow graphs[END_REF][START_REF] Benazouz | A new approach for minimizing buffer capacities with throughput constraint for embedded system design[END_REF]. Indeed, the schedule with minimal buffer sizes may have a throughput that does not satisfy timing constraints. Figure 1.5 shows, for each total amount of buffering requirements, the buffer size distribution that gives the highest self-timed throughput. For example, if the total storage space is constrained to be at most 10, then there are two buffer size distributions ([5 2 3] T and [4 2 4] T ) which achieve the best self-timed throughput (0.014). Since the SDF example is strictly bounded, the maximal throughput that can be achieved with a bounded storage distribution is the one computed by the MCM analysis. The set of all trade-offs between the distribution size and the throughput is called the Pareto space of throughput and storage trade-offs. A technique that compute either the exact or the approximate Pareto space of (C)SDF graphs was presented in [START_REF] Stuikj | Throughput-buffering trade-off exploration for cyclo-static and synchronous dataflow graphs[END_REF][START_REF] Stuijk | Exploring trade-offs in buffer requirements and throughput constraints for synchronous dataflow graphs[END_REF].

Storage distribution size

Real-time scheduling

The inflexibility and difficult maintainability of systems scheduled by cyclic executives (i.e. static-order schedules) led to the development of new real-time scheduling theories such as priority-driven scheduling theory. Much effort has been devoted to identify models of systems, such as the periodic task system model of Lui and Layland [START_REF] Liu | Scheduling algorithms for multiprogramming in a hard-real-time environment[END_REF], from the requirements encountered in the development of real-time systems. Besides models, many theoretical results have been established to predict before the costly implementation phase whether the system will meet its timing requirements even in the worst-case scenarios.

Current models are much mature and general [START_REF] Sha | Real time scheduling theory: a historical perspective[END_REF][START_REF] Davis | A survey of hard real-time scheduling for multiprocessor systems[END_REF][START_REF] Buttazo | Hard real-time computing systems: predictable scheduling algorithms and applications[END_REF][START_REF] Fidge | Real-time scheduling theory[END_REF]; they consist of periodic, sporadic, and aperiodic tasks (i.e. threads) with implicit deadlines (deadlines equal to periods), constrained deadlines (deadlines less than or equal to periods), or arbitrary deadlines. More requirements are considered such as jitters, resource access protocols, precedence constraints, etc. However, some models are well understood than others. For instance, aperiodic tasks are less predictable than periodic and sporadic tasks. In this section, we will consider a restricted but yet expressive task model that corresponds to our needs for a priority-driven scheduling of dataflow graphs.

System models and terminology

A real-time system comprises a set of N tasks (a task set) P = {p 1 , p 2 , . . . , p N }, each task consists of an infinite or finite sequence of jobs (invocations, activations, or requests). The j th job of task p i is denoted by p i [j]. A job executes in a sequential fashion and does not self-suspend. In addition, auto-concurrency is not allowed and tasks are independent and do not share any resources (except the processors of course) unless it is stated otherwise. A run-time scheduler (dispatcher or operating system) controls which job is executing at a given moment on a given processor.

Timing constraints are of a particular interest in real-time computing. In the presented model of computation, timing constraints are expressed in terms of deadlines. If R i [j] is the release (or arrival) time of job p i [j] and d i is the relative deadline of task p i , then job p i [j] meets its timing constraint if its execution completes before the absolute deadline

D i [j] = R i [j] + d i .
As we mentioned before, deadlines can be either hard or soft.

Scheduling theory generally assumes three kinds of tasks, characterized by the arrival pattern of their jobs.

• Periodic tasks. Jobs of a periodic task p i arrive at fixed intervals; i.e. ∀j ∈ N >0 : R i [j +1] = R i [j]+π i . The constant π i is called the period of the task. This arrival pattern is thus time-driven. A periodic task p i is characterized by a worst-case execution time C i , a hard deadline d i , and a first release time (called phase or offset)

r i = R i [1].
• Aperiodic tasks. Jobs of an aperiodic task arrive randomly, usually in response to some external triggering event. This arrival pattern is thus event-driven. Besides having unknown interarrival time of requests, aperiodic tasks have unknown (or extremely large) worst-case execution times. Due to this unpredictability, aperiodic tasks can have only soft deadlines.

• Sporadic tasks. A sporadic task p i has a fixed minimum interarrival time

π i ; i.e. ∀j ∈ N >0 : R i [j + 1] ≥ R i [j] + π i .
The worst-case behavior is usually considered when analyzing sporadic tasks. Hence, they can be considered just as periodic tasks.

A periodic task set, whose all tasks are periodic, can be classified either as synchronous or asynchronous. A task set is synchronous if there is some point in time at which all tasks arrive simultaneously (i.e. ∃t : ∀p i ∈ P : ∃j ∈ N >0 : R i [j] = t); and asynchronous otherwise. Furthermore, it can be classified as an implicit task set (∀p i ∈ P : d i = π i ), as a constrained task set (∀p i ∈ P : d i ≤ π i ) , or as an arbitrary task set (∀p i ∈ P :

d i ≶ π i ).
A task set is also characterized by its utilization U =

p i ∈P U i with U i = C i π i , its density µ = p i ∈P µ i with µ i = C i min{d i ,π i }
, and its hyperperiod H = lcm{π i |p i ∈ P }. A task set is said to be feasible w.r.t. a given system if there is a scheduling algorithm under which all the possible sequences of jobs that may be generated by the task set are scheduled on that system without missing any deadline. A scheduling algorithm is said to be optimal w.r.t. a system and a task model if it can schedule any feasible task set that conforms to the task model.

A task set is said to be schedulable according to a given scheduling algorithm if all its tasks do never miss their deadlines under that algorithm. If all the task sets that are qualified as schedulable by a schedulability test w.r.t. a scheduling algorithm are in fact schedulable, then the schedulability test is said to be sufficient. If all the task sets that are deemed unschedulable by the test are in fact unschedulable, then the test is referred to as necessary. An exact schedulability test is one that is sufficient and necessary.

For implicit-deadline periodic task sets, the utilization bound (UB) U A of a scheduling algorithm A is defined as the minimum utilization of any task set that is only just Aschedulable; i.e. any task set with U ≤ U A is A-schedulable.

A Uniprocessor scheduling algorithms

The scheduling algorithm selects, at each decision instant, a single job among all the active jobs which are waiting for the processor in order to start or continue their executions. If there is no active job, the processor is said to be idle. Most of scheduling algorithms do not idle the processor unless there is no active jobs; they are called work-conserving algorithms. One of the most important class of dynamic scheduling algorithms is the class of priority-driven scheduling policies. In priority-driven scheduling, each job p i [j] is assigned a priority ω i [j] ∈ N >0 according to some policy with 1 being the highest priority. At each decision instant, the scheduler chooses the active job with highest priority to execute.

Based on the set of instants at which a scheduler must select an active job, algorithms can be classified as preemptive, nonpreemptive, or cooperative.

• Preemptive. Tasks can be preempted by a higher priority task at any time. Hence, schedule decisions are taken when jobs complete, or when jobs arrive.

• Nonpreemptive. Once a task starts executing, it cannot be preempted. Hence, schedule decisions are taken when jobs complete, or when one or more new jobs arrive while the processor is idle.

• Cooperative. Tasks can only be preempted at specific points within their execution.

In the sequel, all the presented algorithms are fully-preemptive. Based on the priority assignment strategy, scheduling algorithms can be furthermore classified as fixedpriority or dynamic-priority.

Fixed-priority scheduling In FP scheduling, all jobs of a task p i have the same fixed priority w i . Priorities are assigned to tasks at compile-time and do not change once the application starts executing. Priorities can be assigned arbitrarily by the designer, or according to some priority assignment policy. Two well-known priority assignment policies are the Rate Monotonic (RM) policy [START_REF] Liu | Scheduling algorithms for multiprogramming in a hard-real-time environment[END_REF][START_REF] Briand | Meeting deadlines in hard real-time systems : the rate monotonic approach[END_REF] and the Deadline Monotonic (DM) policy [START_REF] Leung | On the complexity of fixed-priority scheduling of periodic, real-time tasks[END_REF]. In RM policy, tasks with shorter periods are associated with higher priorities; while in DM policy, tasks with shorter deadlines are assigned higher priorities. Clearly, for an implicit-deadline task set, the DM policy reduces to the RM policy.

For synchronous constrained periodic task sets, the DM policy is proven to be optimal [START_REF] Liu | Scheduling algorithms for multiprogramming in a hard-real-time environment[END_REF][START_REF] Leung | On the complexity of fixed-priority scheduling of periodic, real-time tasks[END_REF] among all FP assignments. The complexity of ordering tasks according to DM policy is equal to O(N log 2 N ). The DM policy is however not optimal for asynchronous task sets [START_REF] Leung | On the complexity of fixed-priority scheduling of periodic, real-time tasks[END_REF]. The optimal priority assignment policy for asynchronous constrained periodic task sets was proposed in [4] and it has a complexity of O(E(N 2 + N )/2) where E represents the (non-polynomial) complexity of the schedulability test.

Dynamic-priority scheduling

In dynamic-priority scheduling, algorithms determine the priorities of each task at run-time. Two well-known methods of dynamic priority assignment are the Earliest Deadline First (EDF) policy [START_REF] Liu | Scheduling algorithms for multiprogramming in a hard-real-time environment[END_REF] and the Least Laxity First (LLF) policy [START_REF] Mok | Fundamental design problems of distributed systems for the hard real-time environment[END_REF]. In EDF policy, the job with the earliest absolute deadline among all active jobs is given the highest priority; while in LLF policy, the job with the smallest laxity among all active jobs is given the highest priority. The laxity of a job is the difference between its upcoming deadline and its (estimated) remaining computation time. Both EDF and LLF are proved to be optimal; however LLF has more context switching overhead than EDF. For this reason, most of the proposed theoretical results concern the EDF policy.

B Multiprocessor scheduling algorithms

Multiprocessor scheduling is a much more difficult problem than uniprocessor scheduling and only few of the results obtained for a single processor can be directly generalized to the multiple processor case. Multiprocessor systems can be classified into three categories [START_REF] Davis | A survey of hard real-time scheduling for multiprocessor systems[END_REF]:

• Homogeneous. The system comprises M identical processors. A task has hence the same rate of execution on all processors. The presented algorithms in this section are tailored to this architecture unless it is stated otherwise.

• Uniform. Processors may have different speeds. Hence, a processor of speed 2 will execute all tasks at exactly twice the rate of a processor of speed 1.

• Heterogeneous. Processors are different. Some tasks may not be able to execute on some processors. Hence, the rate of execution of a task depends both on the processor and the task.

Besides the priority assignment problem described for uniprocessor scheduling, multiprocessor scheduling has to solve an allocation problem: on which processor a task should execute at each instant. As a result of preemption, a task may migrate from one processor to another. Based on migration, scheduling algorithms can be classified as:

• Partitioned. Each task is permanently allocated to a processor and no migration is permitted. Partitioned algorithms are hence not work-conserving; a processor can be idle while some active tasks are waiting for another processor.

• Global. A single job can migrate to and execute on different processors.

The current state of the art favors the partitioned scheduling over the global one for the following advantages of partitioned scheduling: (1) There is no penalty in terms of migration cost. (2) A task that overruns its time budget can only affect other tasks on the same processor. (3) Once an allocation of tasks has been achieved, well-mature scheduling techniques for uniprocessor systems can be used. The main drawback of partitioned scheduling is that the allocation problem is analogous to the bin packing problem which is known to be NP-hard. As stated for the multiprocessor static scheduling of dataflow graphs, most of solutions use some bin packing heuristics such as first fit, next fit, best fit, and worst fit. Besides this reason, the recent advancement in multiprocessor technology that reduces the migration penalties has rekindled the interest in global scheduling.

EDF schedulability analysis

This section reviews some existing EDF schedulability tests that will be used in this thesis. In the sequel, we will focus more on periodic task sets with implicit or constrained deadlines. One of the outstanding results about EDF it is its optimality for uniprocessor systems. Unfortunately, EDF scheduling is not optimal for multiprocessor systems.

A Uniprocessor scheduling

Liu and Layland [START_REF] Liu | Scheduling algorithms for multiprogramming in a hard-real-time environment[END_REF] proved that an implicit-deadline periodic task set is schedulable if and only if

U ≤ 1 (1.2)
The UB of the EDF policy U EDF is hence equal to 1. This is an exact test that has a complexity of O(N ). For arbitrary periodic task sets, the previous test is only a necessary test; while µ ≤ 1 is only a sufficient condition [START_REF] Lui | Real-time systems[END_REF]. Devi [START_REF] Devi | An improved schedulability test for uniprocessor periodic task systems[END_REF] proposed a sufficient schedulability test of arbitrary periodic task sets. Assuming that the task set {p 1 , . . . , p N } is arranged in order of non-decreasing relative deadlines, the task set is EDF-schedulable if

∀1 ≤ k ≤ N : k i=1 U i + 1 d k k i=1 π i -min{π i , d i } π i .C i ≤ 1 (1.3)
This test is better than the density condition, but has a complexity of O(N log N ) because it requires sorted task sets. An improved sufficient test that has a complexity of O(N 2 ) was presented in [START_REF] Masrur | Improvements in polynomial-time feasibility testing for EDF[END_REF]. Exact schedulability analysis of constrained periodic task sets is known to be Co-NP-hard [START_REF] Eisenbrand | EDF-schedulability of synchronous periodic task systems is coNP-hard[END_REF]. In [START_REF] Leung | A note on preemptive scheduling of periodic, real-time tasks[END_REF], it was noted that a periodic task set is schedulable if and only if all absolute deadlines in the interval [0, L] are met where L = max

p i ∈P {r i } + 2H (recall that H is the hyperperiod).
The upper bound L is called a feasibility bound. This exact test has however an exponential complexity.

A pseudo-polynomial-time algorithm based on the processor demand function has been proposed for constrained periodic task systems. The processor demand function for a task p i is a function on time interval [t 1 , t 2 ] that gives the amount of computation needed by all jobs of p i that have both their arrival time and their deadlines within the interval

[t 1 , t 2 ]; i.e. h i (t 1 , t 2 ) = R i [j]≥t 1 ∧D i [j]≤t 2 C i . The processor demand of the entire task system is hence equal to h(t 1 , t 2 ) = p i ∈P h i (t 1 , t 2 ). A task set is EDF-schedulable if and only if ∀t 1 , t 2 : h(t 1 , t 2 ) ≤ t 2 -t 1 .
Let us take h(t) to be the maximum processor demand over a contiguous interval of length t, hence h i (t), for synchronous task sets, is given as [START_REF] Baruah | Feasibility problems for recurring tasks on one processor[END_REF][START_REF] Baruah | Preemptively scheduling hard-realtime sporadic tasks on one processor[END_REF]). A synchronous arbitrary periodic task set is EDF-schedulable if and only if U ≤ 1 and ∀t < L : h(t) ≤ t where L = max{d 1 , . . . , d N , max

h i (t) = max{0, 1 + t -d i π i } (1.4) Theorem 1.1 ([
p i ∈P {π i -d i } U 1-U }.
This schedulability test is only sufficient for asynchronous task sets. A better feasibility bound for constrained systems was proposed in [START_REF] Ripoll | Improvement in feasibility testing for realtime tasks[END_REF] as

L = p i ∈P (π i -d i )U i 1 -U (1.5)
Another feasibility bound is the length of the synchronous busy period [START_REF] Ripoll | Improvement in feasibility testing for realtime tasks[END_REF]. The busy period starts when all tasks are released simultaneously at their maximum rate, and ends by the first processor idle item. The length of the busy period can be computed by the following recurrence.

w 0 = p i ∈P C i w m+1 = p i ∈P w m π i C i (1.6)
When the recurrence stops (i.e. w m+1 = w m ), then L = w m . The processor demand test (h(t) ≤ t) needs to be checked only at the absolute deadlines in the interval [0, L] since the processor demand does not change from one point t 1 to another point t 2 unless there is at least one absolute deadline between the two points. This testing set can be however very large. The Quick convergence Processor-demand Analysis (QPA) was proposed in [START_REF] Zhang | Schedulability analysis for real-time systems with EDF scheduling[END_REF][START_REF] Zhang | improvement to quick processor-demand analysis for EDF-scheduled real-time systems[END_REF] in order to reduce the testing set. Instead of checking all deadlines in the increasing order, the proposed algorithm starts from the last deadline in the testing set and moves backward, skipping many intermediate deadlines thanks to the following lemma, where d, d ′ , d m , and d * denote some absolute deadlines.

Algorithm 1: QPA algorithm t = d m ; while h(t) ≤ t ∧ h(t) > min{d} do if h(t) < t then t = h(t); else t = max{d|d < t};
if h(t) ≤ min{d} then the task set is schedulable; else the task set is not schedulable; [START_REF] Zhang | improvement to quick processor-demand analysis for EDF-scheduled real-time systems[END_REF]). For an unschedulable task set, if

Lemma 1.1 ([
h(d m ) ≤ d m , then d * < h(d * ) ≤ d ′ , where d m = max{d| d ≤ L}, d * = max{d|0 < d < L∧h(d) > d}, and d ′ = min{d|d > d * }. From Lemma 1.1, it is easy to deduce that ∀t ∈ [h(d * ), L] : h(t) ≤ t.
Based on this result, Listing 1 represents the QPA algorithm (from [START_REF] Zhang | Schedulability analysis for real-time systems with EDF scheduling[END_REF]).

B Multiprocessor scheduling

Regardless of the scheduling algorithm, an implicit-deadline periodic task set is feasible on M processors if and only if U ≤ M and ∀p i ∈ P :

U i ≤ 1 [98]. A constrained periodic task set is feasible only if max t { h(t)
t } ≤ M [START_REF] Baruah | The partitioned multiprocessor scheduling of sporadic task systems[END_REF]. For partitioned EDF scheduling, several heuristic allocation algorithms have been proposed. Let (V j ) j=1..M be the set of M initially empty partitions (V j consists of all the tasks allocated to the j th processor) and let U j = p i ∈V j U i be the utilization of partition V j . For an implicit-deadline task set and using a first fit allocation strategy, each task p i (tasks are ordered by decreasing utilization) is assigned to the first processor V j with enough capacity (i.e. {p i } ∪ V j is EDF-schedulable on the j th processor; hence U i + U j ≤ 1). It has been shown in [START_REF] López | Utilization bounds for EDF scheduling on real-time multiprocessor systems[END_REF] that for any reasonable allocation algorithm the UB of the scheduling algorithm is bounded by

M -(M -1)U * ≤ U EDF ≤ 1 U * M + 1 1 U * + 1 (1.7)
where U * = max

p i ∈P {U i }.
EDF with a best fit allocation strategy can achieve the highest UB.

As for uniprocessor systems, the processor demand approach is usually used for partitioned EDF scheduling of constrained task sets. Such a technique has been proposed in [START_REF] Baruah | The partitioned multiprocessor scheduling of deadlineconstrained sporadic task systems[END_REF]. Firstly tasks are arranged in non-decreasing order of their relative deadlines (i.e. a DM ordering). Task p i is assigned to the first partition V j that satisfies

d i - p k ∈V j h * k (d i ) ≥ C i (1.8)
Where h * i (t) is an upper bound of the processor demand h i (t). Simply,

h * i (t) = C i + U i (t -d i ) if t ≥ d i ,
and 0 otherwise. This scheduling heuristic has a polynomial-time complexity.

Concerning global EDF scheduling of implicit-deadline periodic task sets, the UB

U EDF is equal to M -(M -1)U * [88]. A constrained task set is schedulable if µ ≤ M -(M -1)µ * where µ * = max p i ∈P {µ i }.
A theoretical and experimental comparison between global EDF schedulability tests can be found in [START_REF] Bertogna | Tests for global EDF schedulability analysis[END_REF]. One particular test, that will be used in this thesis, is the one based on the forced-forward demand bound function.

Theorem 1.2 ([25, 11]). A constrained periodic task set is schedulable if ∃γ : µ * ≤ γ < M -U M -1 -ǫ (with an arbitrary small ǫ) such that ∀t ≤ L : h(t, γ) ≤ t where L = p i ∈P (π i -d i )U i M -(M -1)γ-U and h(t, γ) = ffdbf(t,γ)
M -(M -1)γ . We have that ffdbf (t, γ) =

p i ∈P ffdbf i (t, γ)
is the forced-forward demand bound function; and we have that:

z i = (t mod π i ) and ffdbf i (t, γ) = t π i C i +    C i if z i ≥ d i C i -(d i -z i )γ if d i > z i ≥ d i -C i γ 0 otherwise
It is sufficient to check the condition h(t, γ) ≤ t only at absolute deadlines in the interval [0, L]. Furthermore, the QPA technique can be used to reduce the testing set. Listing 2 represents the QPA-FFDBF algorithm proposed in [START_REF] Bertogna | Tests for global EDF schedulability analysis[END_REF].

Algorithm 2: QPA-FFDBF algorithm γ = µ * ; while γ < M -U M -1 do t = L; while min{d} < h(t, γ) ≤ t do t = min{h(t, γ), max{d|d < t}};
if h(t, γ) ≤ min{d} then return the task set is schedulable ; γ = γ + ǫ; return the task set is unschedulable; An experimental comparison of partitioned and global EDF scheduling techniques can be found in [START_REF] Baker | A comparison of global and partitioned EDF schedulability tests for multiprocessors[END_REF].

C EDF with precedence constraints

In many hard-real time systems, communication among tasks should be deterministic. One approach to achieve this goal is to model communication requirements as precedence constraints. Let J 1 and J 2 be two jobs such that each job J i has an absolute deadline d i , a release time r i , and worst-case execution time C i . A precedence constraint J 1 → J 2 implies that J 2 starts executing only after J 1 ends. An algorithm was proposed in [START_REF] Chetto | Dynamic scheduling of real-time tasks under precedence constraints[END_REF] that solves this problem (for uniprocessor systems) by transforming dependent jobs (i.e. adjusting their release times and deadlines) into new independent jobs such that EDF scheduling of the new set of jobs satisfies the precedence constraints.

Since J 2 cannot start before the completion of J 1 , it is safe to change its release time to be r 2 = max{r 2 , r 1 + C 1 }. Note that if there is a precedence constraint J 3 → J 1 , then r 1 must be adjusted before computing the new r 2 . The second step in the algorithm is to adjust the deadlines. Since J 2 must start executing at most at d 2 -C 2 (otherwise it misses its deadline), it is safe to adjust the deadline of J 1 to be

d 1 = min{d 1 , d 2 -C 2 }.
This way, the new J 2 will not preempt the new J 1 .

This transformation algorithm can be implemented in O(n). It also ensures that if the new job set is EDF-schedulable, then the original set under precedence constraints is also EDF-schedulable.

Fixed-priority schedulability analysis

As with EDF policy, we will consider both uniprocessor and multiprocessor FP scheduling. We will assume that each task can have a distinguished priority.

A Uniprocessor scheduling

An implicit-deadline periodic task set is RM-schedulable if

U ≤ U RM = N ( N √ 2 -1) [127]
. This is only a sufficient schedulability test. The UB depends on the number of tasks in the system and we have that lim N →∞ U RM = ln 2. A less pessimistic sufficient test was presented in [START_REF] Bini | A hyperbolic bound for the rate monotonic algorithm[END_REF] as

N i=1 (U i + 1) ≤ 2. For constrained task sets µ ≤ U RM is a sufficient DM schedulability test.
The exact schedulability test of synchronous constrained periodic task sets, regardless of the priority assignment policy, is based on the notion of worst-case response times [3,[START_REF] Joseph | Finding response times in a real-time system[END_REF]. A task set is schedulable if and only if the worst-case response time R i of each task p i is less than or equal to its deadline; i.e. ∀p i ∈ P : R i ≤ d i . The worst-case response time R i is the solution of the following recurrence.

R 0 i = C i R m+1 i = C i + w k <w i R m i π k C k (1.9)
The response time analysis (RTA) has a pseudo-polynomial complexity. Further improvement can be achieved by reducing the number of iterations required to solve the recurrence equation [START_REF] Lu | A faster exact schedulability analysis for fixed-priority scheduling[END_REF][START_REF] Davis | Efficient exact schedulability tests for fixed priority real-time systems[END_REF]. Efficient (polynomial time) computation of approximate response times can be desirable especially for online admission tests. Assume that R i is bounded by

R l i ≤ R i ≤ R u i , then if ∀p i ∈ P : R u i ≤ d i ,
then the task set is schedulable. Dually, if ∃p i ∈ P : R l i > d i , then the task set is unschedulable. As noticed in [START_REF] Sjödin | Improved response-time analysis calculations[END_REF], we have that x ≤ ⌈x⌉ < x + 1. Thus,

R l i = C i 1- w k <w i U k and R u i = C i + w k <w i C k 1- w k <w i U k . A better
upper bound is proposed in [START_REF] Bini | A response-time bound in fixed-priority scheduling with arbitrary deadlines[END_REF] as

R u i = C i + w k <w i C k (1 -U k ) 1 - w k <w i U k (1.10)

B Multiprocessor scheduling

The UB of any FP partitioning algorithm of implicit-deadline periodic task sets is upper bounded by M +1 M +1 √ 2+1 [START_REF] Oh | Utilization bounds for N-processor rate monotonic scheduling with static processor assignment[END_REF]. An allocation strategy, that has a UB equal to

(M -2)(1 -U * ) + 1 -ln 2,
was proposed in [START_REF] Liebeherr | New strategies for assigning real-time tasks to multiprocessor systems[END_REF]. It attempts to allocate tasks with harmonic periods (i.e. periods that are close to harmonics of each other) to the same processor. Tasks on each processor are then RM-scheduled. In a first fit strategy, a task p i (tasks ordered according to their RM priorities) is assigned to the first partition V j that satisfies [START_REF] Liebeherr | New strategies for assigning real-time tasks to multiprocessor systems[END_REF]. A partitioned DM scheduling algorithm of constrained periodic task sets is proposed in [START_REF] Fisher | The partitioned scheduling of sporadic tasks according to static-priorities[END_REF]. It orders tasks according to their DM priorities, and then assigns each task p i to the first partition V j that satisfies d i -

U i + U j ≤ U RM . The UB of such strategy is equal to (M -1)( √ 2 -1) + (N -M + 1)( N -M +1 √ 2 -1)
p k ∈V j (C k + U k d i ) ≥ C i . Notice that this approximate condition is not just more than R u i ≤ d i with R u i = C i + p k ∈V j C k 1- p k ∈V j
U k . However, we have shown that there is a better upper bound. When a task is assigned to a partition, the worst-case response times of the already assigned tasks do not change because they have higher priorities than the new task.

The UB of any global fixed-priority scheduling algorithm of implicit-deadline task sets, where priorities are defined as a scale-invariant function of tasks periods and worstcase execution times, is upper bounded by

( √ 2 -1)M . The UB of global RM algorithm is equal to M 2 (1 -U * ) + U * [27]
. Furthermore, any implicit-deadline task set with [2]. A sufficient response time analysis for global FP scheduling of constrained periodic task sets has been proposed in [START_REF] Bertogna | Response-time analysis for globally scheduled symmetric multiprocessor platforms[END_REF]. A task set is schedulable if ∀p i ∈ P : R i ≤ d i where R i is an upper bound on the response time of task p i computed by the following recurrence.

U * ≤ M 3M -2 and U ≤ M 2 3M -1 is global RM-schedulable
R i = C i + 1 M w k <w i I k (R i ) (1.11)
Where I k (R i ) is an upper bound on the interference due to task p k within the worst-case response time of p i and which is computed as follows.

I k (R i ) = min{R i -C i + 1, N k C k + min{C k , R i + d k -C k -N k π k }} (1.12) N k = R i + d k -C k π k (1.13)
More global FP schedulability tests can be found in [START_REF] Davis | A survey of hard real-time scheduling for multiprocessor systems[END_REF].

C Aperiodic servers

In this section, we will consider uniprocessor FP scheduling of systems that consist of a set of hard periodic tasks P and a set of soft aperiodic tasks P ′ . Scheduling aperiodic tasks based on their priorities may cause some lower priority hard tasks to miss their deadlines. One simple solution to prevent soft aperiodic tasks from interfering with hard periodic tasks is to execute them as background tasks; i.e. they execute only when there are no ready periodic jobs. However, this solution generally leads to long response time of aperiodic tasks. In the past decades, many techniques based on aperiodic servers have been devised to improve the average response time of soft aperiodic tasks; examples of such techniques are: polling servers [START_REF] Lehoczky | Enhanced aperiodic responsiveness in hard real-time environments[END_REF], deferrable servers [START_REF] Strosnider | The deferrable server algorithm for enhanced aperiodic responsiveness in hard real-time environments[END_REF], sporadic servers [START_REF] Sprunt | Aperiodic task scheduling for hard-real-time systems[END_REF], priority exchange servers [START_REF] Sprunt | Exploiting unused periodic time for aperiodic service using the extended priority exchange algorithm[END_REF], etc. An aperiodic job executes as the capacity of its server is not exhausted, then it waits for the next replenishment of the server capacity according to its replenishment period and strategy. Assume that the system contains one server p s with a capacity C s and a replenishment period π s . The server has generally the highest priority. One important property of polling, deferrable, and sporadic servers is that they can be considered just as sporadic tasks (sometimes with jitters) in the response time analysis. Sporadic servers are often considered the best because they achieve a higher processor utilization and can be considered in the schedulability analysis just like sporadic tasks [START_REF] Sprunt | Aperiodic task scheduling for hard-real-time systems[END_REF]. Bernat and Burns have shown that there is no big difference between the performance of a deferrable server and a sporadic one [START_REF] Bernat | New results on fixed priority aperiodic servers[END_REF]. They have also shown that a deferrable server can be also considered in the schedulability analysis as a sporadic task with a jitter. Hence, the worst-case response time of a periodic task can be computed as

R i = C i + w k <w i R i π k C k + (1 + R i -C s π s )C s (1.14)
Parameters of servers that minimize the average response time are generally obtained by simulation. Some selection criteria have been proposed in [START_REF] Bernat | New results on fixed priority aperiodic servers[END_REF]. If the system contains multiple servers, then a capacity sharing protocol like the one described in [START_REF] Bernat | Multiple servers and capacity sharing for implementing flexible scheduling[END_REF] may increase the responsiveness of aperiodic tasks.

Symbolic schedulability analysis

Designing real-time systems is a very complicated task due to the large number of parameters to be considered by the designer such as: task priorities, deadlines, phases, etc. Parametric analysis is a powerful tool to explore the space of design parameters and find hence the optimal values or prune non-feasible solutions from the design space. Symbolic (or parametric) schedulability analysis consists in finding the schedulability region; i.e. the set of values of parameters for which the system is schedulable when using a specific scheduling policy. Optimization objectives, such as maximizing the processor utilization, can be further considered. Few works, compared to the standard schedulability analysis, have addressed this problem and they target mainly FP scheduling for single processor systems.

In [START_REF] Bini | Schedulability analysis of periodic fixed priority systems[END_REF], symbolic FP schedulability analysis of constrained periodic task sets is considered. Periods, deadlines, and priorities are assumed to have known values; while worst-case execution times are considered as free variables. The proposed technique computes the C-space such that the system is FP schedulable at each point (C 1 , . . . , C N ) in that space. The C-space is constructed by deducing linear constraints on C i using Lehoczky schedulability test [START_REF] Lehoczky | The rate monotonic scheduling algorithm: exact characterization and average case behavior[END_REF]. A synchronous task set is schedulable if and only if

i=1...N t∈S i w k ≤w i t π k C k ≤ t (1.15)
where

S i = w k ≤w i {rπ k |r = 1 . . . π i π k }.
The schedulability region is therefore the union of some convex regions; hence the performance optimization problem can be solved using convex optimization techniques.

Both periods and execution times are considered as parameters in the sensitivity analysis proposed in [START_REF] Bini | Sensitivity analysis for fixed-priority realtime systems[END_REF][START_REF] Bini | The design domain of real-time systems[END_REF]. Assuming a FP scheduling policy with known priorities, the proposed analysis computes either the C-space (execution times are the only free variables) or the f -space (periods are the only free variables). Construction of the f -space is very important in control systems domain, where control tasks are known and their activation rates needed to be computed. For a given unschedulable task set, the sensitivity analysis computes the minimal modifications on either periods or execution times that bring the system into the schedulability region. The f -space is constructed by deducing constraints on π i using the schedulability test provided in [START_REF] Seto | Task period selection and schedulability in real-time systems[END_REF][START_REF] Bini | Optimal task rate selection in fixed priority systems[END_REF]. Assuming that tasks are ordered according to their priorities (i.e. ∀p i : w i = i), a task p i in a synchronous implicit-deadline periodic task set is FP-schedulable if and only if ∃n 1 , . . . , n i-1 ∈ N >0 such that

C i + j<i n j C j ≤ π i ∧ ∀k < i : (n k -1)π k ≤ C i + j<i n j C j ≤ n k π k (1.16)
The schedulability region of each task p i is the union of parallelepipeds, each one resulting from a different selection of tuple (n 1 , . . . , n i-1 ). The schedulability region of the task set is hence the intersection of the schedulability regions of all tasks. Given a cost function F that provides a measure of the application performance, authors proposed an algorithm that searches for the periods that achieve the highest performance. However, the function F (x) must be convex and ∀i : ∂F ∂π i ≤ 0; i.e. an increase of any task's rate results in an improvement of the application performance. The algorithm starts by computing an admissible solution, then enumerating, using a branch and bound approach, all the vertices in a direction indicated by the gradient of the cost function. Examples of cost functions are: maximization of the utilization U , minimization of the energy given by α i e -β i π i , etc. The previous approach was extended in [START_REF] Sun | Parametric schedulability analysis of fixed priority real-time distributed systems[END_REF] for task sets with jitters and deadlines as free parameters. In [START_REF] Goossens | Performance optimization for hard real-time fixed priority tasks[END_REF], a method was provided to find the optimal priority assignment (i.e. priorities are the only free variables) given the cost function and all the timing characteristics.

Symbolic model checking of parametric timed automata (PTA) has been recently used to perform symbolic schedulability analysis [START_REF] Cimatti | Symbolic computation of schedulability regions using parametric timed automata[END_REF][START_REF] Le | Timed-automata based schedulability analysis for distributed firm real-time systems: a case study[END_REF][START_REF] Sun | Parametric schedulability analysis of fixed priority real-time distributed systems[END_REF][START_REF] Ramadian | Parametric real-time system feasibility analysis using parametric timed automata[END_REF][START_REF] Fribourg | Robustness analysis for scheduling problems using the Inverse Method[END_REF]. PTA extend timed automata with parameters that can be used in guards and invariants. The basic idea of this approach is to model the schedulability problem using PTA, and then using existing model checking tools to compute the schedulability region. Thanks to the expressivity of the PTA model, it is possible to perform parametric analysis on a large class of constraints. However, this expressivity comes at the price of a huge complexity.

Real-time scheduling of dataflow graphs

Using real-time scheduling policies to implement dataflow graphs has been the subject of only few works. Unlike in cyclic executives (i.e. static-periodic schedules), each actor is mapped to a periodic real-time task; hence the schedule is strictly periodic (as opposite to static-periodic). One advantage of this scheduling approach is that existing real-time scheduling theories can be used to decide the schedulability of a dataflow specification on a given architecture.

In [START_REF] Parks | Non-preemptive real-time scheduling of dataflow systems[END_REF], a system is described as a set of independent periodic tasks (with userprovided periods) that may communicate through sample-and-hold mechanisms that do not require synchronization. The periodic task set is scheduled according to a RM policy. Each task is modeled as a SDF graph where each actor is called a subtask. Subtasks within a task are executed according to a generated static-periodic schedule where a subtask cannot be preempted. Non-preemptive scheduling is known to be NP-hard in the strong sense even for single processor systems [START_REF] Jeffay | On non-preemptive scheduling of periodic and sporadic tasks[END_REF]. To handle nonpreemption, authors have considered the processor as a shared resource and then used existing analysis for priority inheritance protocols.

Real-time scheduling of acyclic computation graphs (with a chain topology) was studied in [START_REF] Goddard | Analyzing the real-time properties of a dataflow execution paradigm using a synthetic aperture radar application[END_REF]. The author did not however use a periodic task model but he has used the Rate-Based Execution (RBE) model [START_REF] Jeffay | A rate-based execution abstraction for multimedia computing[END_REF] where each task p i has four parameters (x i , y i , d i , C i ) with x i is the number of execution of p i in an interval of length y i . Jobs are executed using a preemptive EDF scheduling policy. The schedulability analysis ensures that any job p i [j] released at time r i [j] will finish before its absolute deadline D i [j] given as

D i [j] = r i [j] + d i if 1 ≤ j ≤ x i max{r i [j] + d i , D i [j -x i ] + y i } if j > x i
The task set is schedulable if and only if ∀l > 0, l ≥

p i ∈P max{0, l-d i +y i y i x i C i }. So,
each actor in the computation graph is mapped to a task; and a task is activated only when the number of accumulated tokens in a channel exceeds its threshold (i.e. a datadriven execution). The author assumes that both the parameter y of the first actor in the chain and the relative deadlines are user provided. Hence, parameters x and y of all the actors can be deduced using the repetition vector. The author also proposed an analysis to compute the size of buffers.

The scheduling approach proposed in [START_REF] Bamakhrama | Hard-real-time scheduling of data-dependent tasks in embedded streaming applications[END_REF]10] is closely related to our work. In [START_REF] Bamakhrama | Hard-real-time scheduling of data-dependent tasks in embedded streaming applications[END_REF], authors have used the implicit-deadline periodic task model to implement acyclic weakly connected CSDF graphs. Firstly, periods are expressed in terms of the period of one actor using the repetition vector; i.e. r(i)p i = r(j)p j . Then, the minimum period p min i of each actor p i is computed (assuming unlimited processing units) as follows.

p min i = H r(i)     max p k ∈P C k r(k) H    
such that H = lcm{ r(1), . . . , r(N )} (1.17)

Secondly, the earliest start times of actors are computed according to the initial tokens in the channels. Knowing all the timing parameters and assuming unlimited resources, it is easy to compute the minimum buffer sizes. The last step in this approach consists in using the utilization bound of any multiprocessor scheduling algorithm (i.e. using the test µ ≤ M ) to compute the necessary number of processors. Authors have shown that this approach gives the self-time throughput of a class of graphs called matched input output rates graphs. They are graphs satisfying max

p k ∈P C k r(k) mod H = 0.
In [10], authors showed that the implicit-deadline task model does not give the minimum latency (i.e. a self-timed latency) for a class of graphs called unbalanced graphs. A balanced graph must satisfy ∀p i , p k : r(i)C i = r(k)C k . Authors proposed a technique that constrains the deadlines to obtain a better latency.

Real-time calculus

Real-time calculus (RTC) [START_REF] Thiele | Real-time calculus for scheduling hard real-time systems[END_REF][START_REF] Chakraborty | A general framework for analyzing properties in platfrom-based embedded system designs[END_REF] is a specialization of network calculus [START_REF] Chang | Performance guarantees in communication networks[END_REF] to the domain of real-time and embedded systems. RTC is used for system-level performance analysis of stream processing systems with timing constraints. In RTC, event streams and services offered by resources are modeled in a coherent way. For a given stream s, the number of arrived events in each time interval is lower bounded and upper bounded by two right-continuous, non-negative, subadditive functions s l and s u , respectively

; i.e. if s[t 1 , t 2 ) is the number of arrived events in interval [t 1 , t 2 ), then ∀t 1 < t 2 : s l (t 2 -t 1 ) ≤ s[t 1 , t 2 ) ≤ s u (t 2 -t 1
). Hence, s l (t) and s u (t) can be considered as the minimum and maximum number of events arriving within any interval of length t, respectively. A periodic event (e.g. release of a periodic task) of period π can be bounded by two staircase functions of step width equal to π and height equal to 1. Similar representations can be given to other event classes; e.g. sporadic events, periodic events with jitters, etc. Similar to lower and upper arrival curves of event streams, a resource r can be described by lower and upper service curves r l and r u , respectively. If r[t 1 , t 2 ) denotes the number of processing or communication units available from the resource over the time interval

[t 1 , t 2 ), then ∀t 1 < t 2 : r l (t 2 -t 1 ) ≤ r[t 1 , t 2 ) ≤ r u (t 2 -t 1 )
. Service curves of a processor can be represented as lines. More complicated resources (e.g. time division multiplex bus) can be considered in this framework.

Given the arrival curves of an event stream arriving at a resource, and the service curves offered by that resource, it is possible to compute the timing properties of the resulted stream and remaining resource capacity, as well as the maximum backlog and delay experienced by the stream. If s is the resulted stream, then we have that

sl (t) = min{ inf 0≤t 1 ≤t {sup t 2 ≥0 {s l (t 1 + t 2 ) -r u (t 2 )} + r l (t -t 1 )}, r l (t)} (1.18) su (t) = min{sup t 2 ≥0 { inf 0≤t 1 ≤t 2 +t {s u (t 1 ) + r u (t 2 + t -t 1 )} -r l (t 2 )}, r u (t)} (1.19)
Furthermore, if r is the remaining service, then we have that

rl (t) = sup 0≤t 1 ≤t {r l (t 1 ) -s u (t 1 )} ru (t) = max{ inf t 1 ≥t {r u (t 1 ) -s l (t 1 )}, 0} (1.20)
The resulted stream can be processed by another resource and so on. When multiple event enter a single resource, this latter is shared between streams according to a given scheduling policy (e.g. fixed-priority, EDF, TDMA). Thus, arrival curves of the resulted streams depend on what scheduling policy is used.

Conclusion

Through this section, we have presented a bunch of MOCs that are being used in realtime embedded system design. Three kinds of MOCs are presented: dataflow models, periodic real-time task models, and RTC. Dataflow models offer a simple design framework that guarantees functional determinism. The periodic task model offers theories that ensure temporal predictability. RTC offers a general framework for approximate performance analysis of embedded systems. Through a combination of all these models, this thesis presents a new real-time scheduling approach of dataflow graphs. This chapter describes how to construct abstract priority-driven schedules of dataflow specifications which respect the Kahn principle and hence guarantee functional determinism. An abstract schedule consists only of physical-time independent constraints called activation relations; and it is constructed in a machine-independent manner. Indeed, we do not consider neither the implementation code of the firing functions nor their worst-case execution times. Therefore, the presented scheduling method requires only an untimed dataflow graph and a real-time scheduling policy.

The optimization problem addressed in this chapter is memory usage minimization. Since each actor is implemented as a separated thread, code size is no longer an issue. Buffering requirements minimization is hence the only optimization problem to consider. Most of existing buffer minimization techniques (mostly in static-periodic scheduling of (C)SDF graphs) are machine-dependent. Though (theoretically speaking) time-dependent techniques are more accurate, the smallest change in execution times (either by changing the target architecture or the implementation code) requires the schedule reconstruction.

We firstly describe what is a consistent and valid abstract schedule by using only a very simple mathematical concept: sequences. Then, we show how to construct (using integer linear programming) a specific class of abstract schedules called affine schedules with respect to EDF and fixed-priority scheduling policies.

Priority-driven operational semantics

In a data-driven semantics, an actor is enabled whenever there are enough tokens on its input ports. If channels are bounded, then an actor is enabled only if there are enough empty spaces on its output channels. The scheduler must maintain a list of enabled actors and chooses among them which actors to fire depending on the available resources.

In a clock-triggered semantics, an actor is enabled (or triggered) according to its activation clock. Hence, the list of enabled actors can be constructed much easily in a clock-triggered scheduling compared with a data-driven scheduling. Let G = (P, E) be a static-dataflow graph (see Definition 1.5, p. 26) that consists of N actors. An activation clock is defined as follows.

Definition 2.1 (Activation clock). Let (T , ⊑) be a tag system. An activation (release or dispatch) clock of an actor p i is a total function pi : C → N with C a chain in T such that pi (t) indicates the number of released jobs of actor p i at tag t.

Example 2.1 (Self-timed example). Consider the self-timed execution in Figure 1.3 (p. 29). The tag system is (N, ≤); i.e. the system has a global discrete clock. Since the self-timed execution consists of a transient and a periodic phase, activation clocks can be described using ultimately periodic integer sequences. So, p1 = 0 30 (2 0 39 ) ω , p2 = (1 0 39 ) ω , and p3 = 1 0 9 (3 0 39 ) ω .

Let t 1 and t 2 be two tags in the chain C such that: (i) at least one job of p i is released at tag t 1 (i.e. pi (t 1 ) > 0); and (ii) t 2 is the first successor of t 1 at which a job of p i is released (i.e. t 2 = min{t|t > t 1 ∧ pi (t) > 0}). In this thesis, we will assume that "all jobs of p i released at tag t 1 complete their execution by tag t 2 ". Consequently, we will not consider task sets with deadlines greater than periods.

In a priority-driven operational semantics, each actor p i is associated with an infinite integer sequence ω i ∈ N ω such that ω i (j) is the priority of the j th job of p i (denoted by p i [j]). We assume that 1 is the highest priority. At each instant t, the scheduler chooses among all the enabled jobs the job with the highest priority. Preemption may occur if a job with a higher priority than the jobs being executed is enabled. In RM scheduling, each priority sequence is a constant infinite sequence. In EDF scheduling of periodic task sets, priorities of jobs depend on deadlines and phases of actors; priority sequences are hence ultimately periodic. A simple procedure to compute priority sequences in EDF scheduling of periodic task sets (we assume that there is no dynamic admission of new tasks) is to order jobs in a hyperperiod by their deadlines and then assign priority 1 to the job with the earliest deadline, and so on. Priority sequences can model fixed task priority scheduling (e.g. RM), fixed job priority scheduling (e.g. EDF), but not dynamic job priority scheduling. For example, in Least Laxity First (LLF) scheduling, a single job may have different priorities at different moments.

If several jobs of an actor p i are released at the same tag, then we assume that "the released jobs read their required data and write their results on a given channel in the same order of activation"; i.e. job p i [j] cannot write any token on a given channel before p i [j -1] writes all its results on that channel; and p i [j] cannot read any token from a given channel before p i [j -1] reads all its needed data from that channel. This is a requirement for a functionally deterministic execution of the dataflow graph. In the self-timed example, jobs p 3 [2], p 3 [3], and p 3 [4] execute in parallel with each other. Since the execution time of a job may depend on the data being processed, these three jobs write their results in a non-deterministic order. Recall that if an actor contains some local state, then auto-concurrency must be disabled (by adding self-loops) to ensure proper state update.

In most of dataflow models, actors are assumed to read tokens before performing any computation and then write the results at the end. In our model of computation, we get rid of this constraint in order to give the programmer total freedom on how to write the implementation code of firing functions.

In Kahn semantics of dataflow graphs, an actor blocks if it attempts to read from an empty channel. If channels are bounded, an actor also blocks if it attempts to write on a full channel. In our priority-driven operational semantics, an overflow exception occurs when an actor attempts to write to a full channel; while an underflow exception occurs when an actor attempts to read from an empty channel.

Activation-related schedules

An abstract schedule consists of a set of timeless (i.e. abstract) scheduling constraints called activation relations. This section presents the necessary conditions that must be satisfied in order to have a consistent (i.e. no causality problems) and valid (i.e. overflow/underflow-free communications) schedule.

Activation relations

Let pi , pk : C → N be two activation clocks defined on the same set of tags. An activation relation is a concise abstract representation of the two clocks on the set {t|p i (t) > 0 ∨ pk (t) > 0} ⊆ C; i.e., instants at which neither actors are released are neglected. This is a time abstraction that keeps only the relative positioning of activations. As illustrated in Figure 2.1, the duration between releases (i.e. the original timing) does not matter. Hence, only the precedence relations between releases are preserved. Definition 2.2 (Activation relation). Two actors p i and p k are said to be activationrelated if and only if the relative positioning of all their releases can be entirely defined; that is, ∀j, j ′ ∈ N >0 : job p i [j] is released before, after, or at the same time with job

p k [j ′ ].
An activation relation can be described by two integer sequences s i,k and s k,i such that s i,k (j) indicates the number of releases of actor p i at the j th tag in the set {t|p i (t) > 0 ∨ pk (t) > 0}. Hence, ∀j ∈ N >0 : s i,k (j) + s k,i (j) > 0. We say then that p i and p k are [s i,k , s k,i ]-activation-related (denoted by p i

[s i,k ,s k,i ]
-→ p k ); or equivalently p k and p i are [s k,i , s i,k ]-activation-related.

Example 2.2. In the self-timed example, we have that p 1

[(0 2) ω ,(1 0) ω ] -→ p 2 [(1 0) ω ,1(3 0) ω ] -→ p 3 [1(3 0) ω ,0(0 2) ω ] -→ p 1 .
Since we are interested only in fair and complete executions of live dataflow graphs, we impose the following property.

Property 2.1 (Activation relation). If [s i,k , s k,i ] is an activation relation, then (i) s i,k , s k,i ∈ N ω .
(ii) ∀j ∈ N >0 : s i,k (j), s k,i (j) and ⊕s i,k (j) -⊕s k,i (j) are bounded.

Hence, if p i and p k are activation-related, then both actors will fire infinitely often (liveness) and between every two releases of an actor there is a finite number of releases of the other actor (fairness). If auto-concurrency is disabled, then we have that s i,k , s k,i ∈ B ω . Definition 2.3 (Strict predecessors and successors). sprd i,k : N >0 → N is an integer function such that p k [sprd i,k (j)] is the last job of p k which is released strictly before p i [j]. Similarly, ssuc i,k : N >0 → N is an integer function such that p k [ssuc i,k (j)] is the first job of p k which is released strictly after p i [j]. Both sprd and ssuc are monotone functions.

We have that job p i [j] is released at the tag number s -1 i,k (j) in the set {t|p i (t) > 0 ∨ pk (t) > 0}. All jobs of p k released before that tag are strict predecessors of p i [j]. Therefore, sprd i,k (j) = ⊕s k,i (s -1 i,k (j) -1). Similarly, the first strict successor of p i [j] is the first job of p k released at a tag greater than s -1 i,k (j). Therefore, ssuc i,k (j) = ⊕s k,i (s -1 i,k (j)) + 1. By convention, we take sprd i,k (0) = 0 and ssuc i,k (0) = 1.

Definition 2.4 (Predecessors and successors). prd i,k : N >0 → N is an integer function such that p k [prd i,k (j)] is the last job of p k which is released before or simultaneously

with p i [j]. Similarly, suc i,k : N >0 → N is an integer function such that p k [suc i,k (j)]
is the first job of p k which is released after or simultaneously with p i [j]. Both prd and suc are monotone functions.

We have that

prd i,k (j) = ⊕s k,i (s -1 i,k (j)) suc i,k (j) = ⊕s k,i (s -1 i,k (j) -1) + 1 Let lsim i,k (j) = ⊕s i,k (s -1 i,k (j)). So, p i [lsim i,k (j)]
is the last job of p i which is released simultaneously with p i [j] according to the activation relation

[s i,k , s k,i ]. Dually, if fsim i,k (j) = ⊕s i,k (s -1 i,k (j) -1) + 1, then p i [fsim i,k (j)]
is the first job of p i which is released simultaneously with p i [j] according to the activation relation

[s i,k , s k,i ].
Example 2.3. In the self-timed example, we have that ∀j : sprd 1,2 (j) = j 2 , ssuc 1,3 (j) = 3 j 2 + 2, and lsim 1,2 (j) = 2 j 2 .

Lemma 2.1. ∀j ∈ N >0 : prd i,k (j) < j ′ ⇔ prd i,k (j) < fsim k,i (j ′ ) and suc i,k (j) > j ′ ⇔ suc i,k (j) > lsim k,i (j ′ ).

Definition 2.5 (Synchronous relation). Jobs p i [j] and p k [j ′ ] are synchronous (i.e. released at the same time) if and only if sprd i,k (j) < j ′ < ssuc i,k (j).

If p i [j] is released strictly before p k [j ′ ], then we denote that by p i [j] < p k [j ′ ].
If both jobs are synchronous, we denote that by p i [j] = p k [j ′ ]. Knowing functions sprd i,k and ssuc i,k is not enough to construct the relative positioning of releases of p i and p k unless s i,k , s k,i ∈ B ω (i.e. auto-concurrency is disabled). In the self-timed example, we have that sprd 2,1 (j) = 2(j -1) and ssuc 2,1 (j) = 2j -1, but, it is not possible to know only from these two functions that ∀j ∈ N >0 :

p 1 [2j -1] = p 1 [2j].
This means that is possible to deduce sprd i,k and ssuc i,k from [s i,k , s k,i ] but not vice versa.

Property 2.2. The synchronous relation is an equivalence relation; i.e. it is reflexive, symmetric, and transitive. Recall that each activation relation can be reversed. Hence, each edge can be traversed in both directions. By convention, an undirected edge is annotated by an activation relation

Consistency

[s i,k , s k,i ] such that i < k.
A walk in a graph G = (P, E) is an alternating sequence p 1

e 1 -→ p 2 • • • em -→ p m+1
of vertices and directed edges in P and E respectively so that ∀i : e i = (p i , p i+1 ). A walk is called closed if p 1 = p m+1 . A path is a walk with no vertex and no edge repeated. A cycle (or simple cycle) is a closed path (i.e. the only repeated vertices are the first and the last ones). For every walk ψ, we denote by ψ -1 the inverse walk that starts at the last vertex of ψ and ends at the first vertex.

Let ψ = p 1 [s 1,2 ,s 2,1 ] -→ p 2 -→ • • • [s m-1,m ,s m,m-1 ] -→
p m be a walk in the graph of activation relations. Functions sprd ψ and ssuc ψ are the extensions of sprd and ssuc using transitivity relation on walk ψ; i.e. ∀j ∈ N >0 :

sprd ψ (j) = (sprd m-1,m • • • • • sprd 2,3 • sprd 1,2 )(j) and ssuc ψ (j) = (ssuc m-1,m • • • • • ssuc 2,3 • ssuc 1,2 )(j). If Ψ i,k
is the set of all walks from p i to p k in G r , then we put sprd i→k (j) = max ψ∈Ψ i,k {sprd ψ (j)} and ssuc i→k (j) = min

ψ∈Ψ i,k {ssuc ψ (j)}.
So, for instance, p k [sprd i→k (j)] is the last job of p k known from the activation relations that it is released strictly before p i [j]. Similarly, we define functions prd i→k and suc i→k .

Example 2.4. In the self-timed example, we have that prd 1,2 (j) = j 2 , prd 2,3 (j) = 3j -2, and prd 1,3 (j

) = 3 j 2 + 1; hence, prd 1,2,3 (j) = 3 j 2 -2 < prd 1,3 (j)
.

Suppose that we have

P = {p 1 , p 2 , p 3 } and R = {p 1 [1 ω ,1 ω ] -→ p 2 , p 2 [1 ω ,1 ω ] -→ p 3 , p 3 [1 ω ,2 ω ] -→ p 1 }. The set
p i , if [s i,k , s k,i ] and [s i,k ′ , s k ′ ,i ] are two activation relations in R, then ∀j ∈ N >0 : fsim i,k (j) = fsim i,k ′ (j) and lsim i,k (j) = lsim i,k ′ (j).
Property 2.3 means that all activation relations agree on which jobs of a given actor are synchronous with each other. In the sequel, we will suppose that this trivial necessary condition is satisfied. Hence, for sake of conciseness, fsim i (j) and lsim i (j) denote fsim i,k (j) and lsim i,k (j) (∀k = i), respectively. When auto-concurrency is disabled, Property 2.3 is obviously satisfied since ∀p i , p k ∈ P : ∀j : fsim i,k (j) = lsim i,k (j) = j.

Proposition 2.1 (Consistency of a closed walk). A closed walk

ψ = p 1 → p 2 → • • • → p m → p 1 in the graph of activation relations is consistent if and only if ∀j ∈ N >0 : prd ψ (j) = lsim 1 (j) ∧ suc ψ (j) = fsim 1 (j) if ψ[j] is true prd ψ (j) < fsim 1 (j) ∧ suc ψ (j) > lsim 1 (j) otherwise (2.1)
where ψ[j] is true if and only if

p 1 [j] = p 2 [suc 1,2 (j)] = p 3 [suc 1,2,3 (j)] = • • • = p m [suc 1,2,...,m (j)]
Proposition 2.1 ensures that there is no causality problems in the abstract schedule. Causality problems can occur only when there are cycles in the graph of activation relations. We have that prd ψ (j) is the last job of p 1 known (according to the closed walk ψ) to be released before or simultaneously with job p 1 [j]. So, if ψ[j] is true, then prd ψ (j) must be equal to the last job of p 1 released simultaneously with p 1 [j] (i.e. lsim 1 (j)). If ψ[j] is false, then prd ψ (j) must be less than j; but according to Lemma 2.1, we have prd ψ (j) < fsim 1 (j). A similar argument holds for suc ψ (j).

Example 2.5 (Consistency). Let P = {p 1 , p 2 , p 3 } and the closed walk

ψ = p 1 [3(2 1 0) ω ,0(3 0 2) ω ] -→ p 2 [0(3 0 2 0) ω ,2(1 2 0 1) ω ] -→ p 3 [s 3,1 ,s 1,3 ]
-→ p 1 . The first and second activation relations are depicted in Figure 2.2(a). We use Proposition 2.1 to deduce the possible activation relations between p 3 and p 1 such that ψ is consistent.

Let s ′ denotes the sequence s where zeros are neglected. To satisfy Property 2.3, we must have s ′ 1,3 = 3(2 1) ω and s ′ 3,1 = 2(1 2 1) ω . Using Equation 2.1, we have the following constraints.

prd ψ (1) = prd ψ (2) = prd ψ (3) = 0 suc ψ (1) = suc ψ (2) = prd ψ (3) > 1 prd ψ (4) = prd ψ (5) = 5 (ψ[5] is true) suc ψ (4) = suc ψ (5) = 4 prd ψ (6) < 6 suc ψ (6) > 6 prd ψ (7) = prd ψ (8) = 8 suc ψ (7) = suc ψ (8) = 7 . . . . . .
p 3 [2(1 2 1) ω ,3(2 1 0) ω ] -→ p 1 (illustrated in Figure 2.2(c)). Lemma 2.2. Let ψ 1 = p 1 → p 2 → p 3 → • • • → p 1 and ψ 2 = p 2 → p 3 → • • • → p 1 → p 2 be two closed walks in G r . If Equation 2.1 holds (only) for walk ψ 1 , then ∀j ∈ N >0 : ψ 2 [prd 1,2 (j)] is false =⇒ prd 1,2 (prd ψ 1 (j)) < prd 1,2 (j)
.

Proof:

Let us consider all the three possible cases (illustrated in Figure 2.3).

Figure 2.3(a):

If ψ 1 [j] is true, then prd ψ 1 (j) = lsim 1 (j). Hence, prd 1,2 (prd ψ 1 (j)) = prd 1,2 (lsim 1 (j)) = prd 1,2 (j). Figure 2.3(b): If ψ 1 [j] is false and ψ 2 [prd 1,2 (j)] is true, then prd 1,2 (prd ψ 1 (j)) = prd 1,2 (j).
In both cases, ψ 2 [prd 1,2 (j)] is false. Suppose that prd 1,2 (prd ψ 1 (j)) ≥ prd 1,2 (j). Since ψ 1 [j]
is false, we have that prd ψ 1 (j) < fsim 1 (j); and hence prd 1,2 (prd ψ 1 (j)) = prd 1,2 (j). This implies that prd ψ 1 (prd

ψ 1 (j)) = prd ψ 1 (j); hence, ψ 1 [prd ψ 1 (j)] is true. But ψ 1 [prd ψ 1 (j)
] cannot be true, otherwise ψ 2 [prd 1,2 (j)] will also be true. Contradiction.

(a) (b) (c) (d) Figure 2.3: Illustration of Lemma 2.2.
In a similar way, we can prove that if

ψ 2 [suc 1,2 (j)] is false, then suc 1,2 (suc ψ 1 (j)) > suc 1,2 (j). Proposition 2.2. If Equation 2.1 holds for the closed walk ψ 1 = p 1 → p 2 → • • • → p i → p i+1 → • • • → p m → p 1 , then it holds for any closed walk ψ i = p i → p i+1 → • • • → p i-1 → p i for i = 1, m.

Proof:

We prove that if Equation 2.1 holds for ψ 1 , then it holds for ψ 2 ; and so it holds for ψ 3 and so on. We first have to prove the first part; i.e.

∀j ′ ∈ N >0 : prd ψ 2 (j ′ ) = lsim 2 (j ′ ) if ψ 2 [j ′ ] is true prd ψ 2 (j ′ ) < fsim 2 (j ′ ) otherwise
We have that prd

ψ 2 (j ′ ) = prd 1,2 • prd m,1 • • • • • prd 2,3 (j ′ ).
We consider two cases:

1) If ∃j ∈ N >0 : j ′ ∈ [fsim 2 (prd 1,2 (j)), prd 1,2 (j)], then prd 2,3 (j ′ ) = prd 2,3 • prd 1,2 (j)
and hence prd ψ 2 (j ′ ) = prd 1,2 (prd ψ 1 (j)). As in the proof of Lemma 2.2, we have three possibilities.

• ψ 1 [j] is true: In this case, ψ 2 [j ′ ] is also true. So, prd ψ 2 (j ′ ) = prd 1,2 (prd ψ 1 (j)) = prd 1,2 (lsim 1 (j)) = lsim 2 (j ′ ). • ψ 1 [j] is false and ψ 2 [j ′ ] is true: In this case, prd 1,2 (prd ψ 1 (j)) = prd 1,2 (j). Hence, prd ψ 2 (j ′ ) = prd 1,2 (j) = lsim 2 (j ′ ).
• ψ 2 [j ′ ] is false: According to Lemma 2.2, we have that prd 1,2 (prd ψ 1 (j)) < prd 1,2 (j).

Hence, prd ψ 2 (j ′ ) < prd 1,2 (j). So, according to Lemma 2.1,

prd ψ 2 (j ′ ) < fsim 2 (prd 1,2 (j)) = fsim 2 (j ′ ). 2) If ∃j ∈ N >0 : j ′ ∈ [fsim 2 (prd 1,2 (j)), prd 1,2 (j)], then ψ 2 [j ′
] cannot be true. Let us take j such that j = suc 2,1 (j ′ ). There are two possibilities, as illustrated in Figure 2.4.

• ψ 1 [j] is true: In this case, prd 2,...,1 (j ′ ) < j. Therefore, prd ψ 2 (j ′ ) = prd 1,2 (prd 2,...,1 (j ′ )) < fsim 2 (j ′ ) (otherwise j = suc 2,1 (j ′ )).

• ψ 1 [j] is false: In this case, prd ψ 1 (j) < fsim 1 (j). Suppose that prd 1,2 (prd ψ 1 (j)) ≥ fsim 2 (j ′ ). As illustrated in Figure 2.4(b), suc 2,1 (j ′ ) = prd ψ 1 (j) < fsim 1 (j). This contradicts the hypothesis that j = suc 2,1 (j ′ ). Hence, prd 1,2 (prd ψ 1 (j)) < fsim 2 (j ′ ). Since, prd 2,...,1 (j ′ ) ≤ prd ψ 1 (j) (due to monotonicity of prd), we have that prd ψ 2 (j ′ ) = prd 1,2 (prd 2,...,1 (j ′ )) < fsim 2 (j ′ ). Similarly, we can prove that

∀j ′ ∈ N >0 : suc ψ (j ′ ) = fsim 2 (j ′ ) if ψ[j ′ ] is true suc ψ (j ′ ) > lsim 2 (j ′ ) otherwise Proposition 2.3. If Equation 2.1 holds for the closed walk ψ = p 1 → p 2 → • • • → p m → p 1 , then it holds for walk ψ ′ = p m → p m-1 → • • • → p 1 → p m .
Proof: Firstly, we prove that

∀j ′ ∈ N >0 : prd ψ ′ (j ′ ) = lsim m (j ′ ) if ψ ′ [j ′ ] is true prd ψ ′ (j ′ ) < fsim m (j ′ ) otherwise
There are two cases:

1) ψ ′ [j ′ ] is true: As illustrated in Figure 2.5(a), if j = prd m,m-1,...,1 (j ′ ), then ψ[j] is also true. Hence, prd ψ ′ (j ′ ) = prd 1,m (j) = lsim m (j ′ ).
2) ψ ′ [j ′ ] is false: Let j = prd m,m-1,...,1 (j ′ ). we have that suc 1,...,m (j) ≤ fsim m (j ′ ) and hence suc ψ (j) ≤ suc m,1 (j). Suppose that prd ψ ′ (j ′ ) ≥ fsim m (j ′ ) (i.e. the walk ψ ′ is inconsistent). Hence, prd 1,m (j) ≥ fsim m (j ′ ). This implies that suc m,1 (j ′ ) ≤ fsim 1 (j). So, we have that suc ψ (j) ≤ suc m,1 (j ′ ) ≤ fsim 1 (j) ≤ lsim 1 (j). This contradicts the hypothesis that Equation 2.1 holds for walk ψ.

Similarly, we can prove that Proof:

∀j ′ ∈ N >0 : suc ψ ′ (j ′ ) = fsim m (j ′ ) if ψ ′ [j ′ ] is true suc ψ ′ (j ′ ) > lsim m (j ′ ) otherwise (a) (b)
Let ψ = p 1 → . . . → p 1 .
Suppose that p i appears more than once in ψ. Hence, ψ can be decomposed as p 1 → . . . → p i-1 → ψ ′ → p i+1 → . . . → p 1 such that ψ ′ is the walk from the first occurrence of p i to the last one. Let us put ψ ′′ = p 1 → . . . → p i → . . . → p 1 (i.e. ψ ′′ is obtained by removing the sub-walk ψ ′ from ψ). We suppose that ψ ′ and ψ ′′ are simple cycles, otherwise we have to further decompose them. We have that ∀j ∈ N >0 : prd ψ (j) = prd i,i+1,...,1 (prd ψ ′ (prd 1,...,i-1,i (j))).

• ψ[j] is true: trivially, ψ ′ [prd 1,...,i-1,i (j)] and ψ ′′ [j] are true. So, prd ψ ′ (prd 1,...,i-1,i (j)) = prd 1,...,i-1,i (j). Hence, prd ψ (j) = prd i,i+1,...,1 (prd 1,...,i-1,i (j)) = prd ψ ′′ (j) = lsim 1 (j).

• ψ[j] is false: In this case, ψ ′′ [j] and ψ ′ [prd 1,...,i-1,i (j)] cannot be both true. In case ψ ′ [prd 1,...,i-1,i (j)] is true, we have that prd ψ (j) = prd i,i+1,...,1 (prd ψ ′ (prd 1,...,i-1,i (j))) = prd i,i+1,...,1 (prd 1,...,i-1,i (j)) = prd ψ ′′ (j) < fsim 1 (j). In case ψ ′′ [j] is true, we have that prd ψ (j) = prd i,i+1,...,1 (prd ψ ′ (prd 1,...,i-1,i (j))) < prd i,i+1,...,1 (fsim i (prd 1,...,i-1,i (j))) = lsim 1 (j). The third case (i.e. when both ψ ′ [prd 1,...,i-1,i (j)] and ψ ′′ [j] are false) is straightforward.

Similarly, we can prove the second part of Equation 2.1.

Some simple cycles can also be expressed as the symmetric difference of some other simple cycles. For instance, in Figure 2.6, we have that

p 1 → p 2 → p 3 → p 4 → p 1 ⊎p 2 → p 5 → p 4 → p 3 → p 2 = p 1 → p 2 → p 5 → p 4 → p 1 .
Question 1 Let ψ, ψ ′ , ψ ′′ be three simple cycles such that ψ = ψ ′ ⊎ ψ ′′ . If ψ ′ and ψ ′′ are consistent, does this imply that ψ is also consistent? Example 2.6 (Counterexample-Q1). In the general case, the answer to question 1 is no. The graph in Figure 2.6 is a counterexample where Question 2 Let ψ, ψ ′ , ψ ′′ be three simple cycles such that ψ = ψ ′ ⊎ ψ ′′ . If ψ is consistent, does this imply that ψ ′ and ψ ′′ are also consistent?

ψ ′ = p 1 [(0 1 1) ω ,(1 0 0) ω ] -→ p 2 [(0 1) ω ,(1 0) ω ] -→ p 3 [(0 1 0) ω ,(1 0 1) ω ] -→ p 4 [(1 0 0 1) ω ,(0 1 1 0) ω ] -→ p 1 and ψ ′′ = p 2 [(0 1) ω ,( 1
0) ω ] -→ p 5 [(0 0 1) ω ,(1 1 0) ω ] -→ p 4 [(1 0 1) ω ,(0 1 0) ω ] -→ p 3 [(1 0) ω ,( 0
Example 2.7 (Counterexample-Q2). In the general case, the answer to question 2 is no. In Example 2.6, if we put p 4

[(1 0 1) ω ,(0 1 0) ω ] -→ p 5 and p 3 [(0 0 1) ω ,(1 1 0) ω ]
-→ p 4 , then Equation 2.1 holds for cycle ψ but not for ψ ′ . Proposition 2.5 (Consistency of an abstract schedule). An abstract schedule is consistent if and only if every undirected cycle in the graph of activation relations is consistent.

Proof:

Let Ψ i,i be the set of all closed walks from p i to itself in G r . If Equation 2.1 holds for each walk in Ψ i,i , then we will have that

∀j ∈ N >0 : prd i→i (j) = lsim i (j) ∧ suc i→i (j) = fsim i (j) if ∃ψ ∈ Ψ i,i : ψ[j] is true prd i→i (j) < fsim i (j) ∧ suc i→i (j) > lsim i (j) otherwise
Hence, there will be no causality problems in the schedule. According to Proposition 2.4 and the previous counterexamples, it is enough to check only the consistency of all the simple cycles. According to propositions 2.2 and 2.3, it is enough to check only the consistency of one cycle per undirected cycle in graph G r .

Consistency of ultimately periodic schedules

Definition 2.7 (Ultimately periodic schedules). An activation relation [s i,k , s k,i ] is ultimately periodic if s i,k and s k,i are ultimately periodic sequences. An abstract schedule is ultimately periodic if all its activation relations are ultimately periodic.

Hence, we can put

s i,k = u i,k v ω i,k and s k,i = u k,i v ω k,i such that |u i,k | = |u k,i | and |v i,k | = |v k,i |. Example 2.2 is an ultimately periodic abstract schedule. Proposition 2.6. A closed walk ψ = p 1 → p 2 → • • • → p m → p 1 in an ultimately periodic schedule is consistent only if m i=1 v i,k = m i=1 v k,i (2.2)
Where k = i mod m + 1 and v is the sum of elements of the finite integer sequence v.

Proof:

If Equation 2.1 holds for ψ, then we have that ∀j ∈ N >0 : prd ψ (j) ≤ j and suc ψ (j) ≥ j. Let k 1 be the maximum integer for which u 1,2 + k 1 v 1,2 < fsim 1 (j). As illustrated in Figure 2.8, k 1 is the number of instances of the positioning pattern before the instance that contains the j th activation of p 1 . Since [s 1,2 , s 2,1 ] is an ultimately periodic activation relation, we have that prd 1,2 (j) ≥ j 1 = u 2,1 + k 1 v 2,1 . Continuing the same process, k 2 is the maximum integer for which u 2,3 + k 2 v 2,3 < fsim 2 (j 1 ) and so prd 2,3 (j 1 ) ≥

j 2 = u 3,2 + k 2 v 3,2 . Hence, j m = u 1,m + k m v 1,m ≤ prd m,1 (j m-1 ) ≤ j.
We denote by c any non important constant. We have that

k 1 = 1 v 1,2 j + c, k 2 = v 2,1 v 1,2 v 2,3 j+c, . . . , k m = v 2,1 ... v m,m-1 v 1,2 ... v m,1
j+c. Let us denote by ψ the product of v i,k of all the activation relations on a walk ψ. So, prd ψ (j) ≤ j implies that ψ -1 ψ j + c ≤ j. When j tends to infinity, the previous inequality has a solution only if ψ -1 ≤ ψ .

Similarly and using the second part of Equation 2.1, we have that ψ -1 ψ j + c ≥ j. Thus, Property 2.4. Let ψ, ψ ′ , and ψ ′′ be three simple cycles such that ψ = ψ ′ ⊎ ψ ′′ . If Equation 2.8 holds for ψ ′ and ψ ′′ , then it holds for ψ.

ψ -1 ≥ ψ .

Proof:

We prove the case where the set of edges in ψ ′ that have opposites in ψ ′′ forms a contiguous path; however, the presented argument also holds for the general case. Let ψ * = ψ ′ ∩ψ ′′ be such a contiguous path. Hence, we can put ψ ′ = ψ 1 +ψ * , ψ ′′ = ψ 2 +ψ -1 * , and ψ = ψ 1 + ψ 2 . Since Equation 2.8 holds for ψ ′ and ψ ′′ , we have that

ψ 1 . ψ * = ψ -1 1 . ψ -1 * and ψ 2 . ψ -1 * = ψ -1 2 . ψ * . Hence, ψ 1 . ψ 2 = ψ -1 1 . ψ -1 2 .

Overflow analysis

An overflow exception occurs when an actor attempts to write to a full channel. Let e = (p i , p k , x, y) be a channel between the producer p i and the consumer p k . The overflow analysis ensures that the (over-approximated) number of accumulated tokens in channel e does not exceed its size δ(e) for every execution of the dataflow graph. The (over-approximated) number of accumulated tokens can be computed as follows.

• The number of produced tokens by job p i [j] is equal to x(j).

• The number of produced tokens before p i [j] writes any token is equal to ⊕x(j -1) since we assume that the scheduling policy ensures, even with auto-concurrency, that jobs of the producer write tokens in the same order of their activation. The number of produced tokens until and including the j th job of p i is hence equal to ⊕x(j). If j = lsim i (j) (which is always the case if auto-concurrency is disabled), then ⊕x(j

) = ⊕(x ⊗ s i,k )(s -1 i,k (j)) = ⊕x(⊕s i,k (s -1 i,k (j))).
Definition 2.8 (Complete before). cbef i,k : N >0 → N is an integer function such that p k [cbef i,k (j)] is the last job of p k which certainly reads all its needed tokens from channel e before p i [j] writes any token on that channel. So, cbef i,k is a monotone function.

• The (under-approximated) number of consumed tokens before p i [j] writes any token on channel e is equal to ⊕y(cbef i,k (j)) since we assume that the scheduling policy ensures, even with auto-concurrency, that jobs of the consumer consume tokens in the same order of their activation.

If cbef i,k (j) = lsim k (cbef i,k (j)), then ⊕y(cbef i,k (j)) = ⊕(y ⊗ s k,i )(s -1 k,i (cbef i,k (j))) = ⊕y(⊕s k,i (s -1 k,i (cbef i,k (j)))
). Function cbef i,k depends essentially on the scheduling policy, the physical timing parameters, and the implementation code of the firing functions. Since the abstract schedule consists of a set of timeless constraints, function cbef i,k could be only a safe approximation that does not consider neither the timing nor the implementation code.

Example 2.8. Let us take e 2 = (p 1 , p 2 , 1 ω , 2 ω ) of the self-timed example (Figure 1.1, p. 26). We have that cbef 1,2 (j) = sprd 1,2 (j) = j 2 . Since actor p 2 does not preempt actor p 1 or execute in parallel with it, function cbef 1,2 , as defined before, is accurate. Similarly, ∀j ≥ 2 : cbef 2,3 (j) = sprd 2,3 (j) gives the accurate values. However, since job p 2 [1] executes in parallel with job p 3 [1], it is not safe to say that p 3 [1] reads the required data before p 2 [1] writes its results unless we assume that an actor reads tokens at the beginning of firings and writes results at the end. A safe approximation for the overflow analysis is one that over-approximates the number of accumulated tokens in channels, hence cbef 2,3 (1) = 0.

The (over-approximated) number of accumulated tokens on channel e when job p i [j] writes all its results can be given as X(j) = θ(e) + ⊕x(j) -⊕y(cbef i,k (j))

If the over-approximated number of accumulated tokens in the channel does not exceed the size of the channel δ(e) for all j ∈ N >0 , then overflow exceptions will not occur at run-time. Hence, the overflow analysis can be formulated as follows. ∀j ∈ N >0 : θ(e) + ⊕x(j) -⊕y(cbef i,k (j)) ≤ δ(e)

(2.3)

If ∀j ∈ N >0 : cbef i,k (j) = cbef i,k (lsim i (j)), then Equation 2.3 can be checked only for points where j = lsim i (j) since the maximum numbers of accumulated tokens happen at these points.

Example 2.9. In the self-timed example and for e = (p 1 , p 2 , 1 ω , 2 ω ), we have that s 2,1 ∈ B ω and cbef 1,2 (j) = cbef 1,2 (lsim 1 (j)). Thus, Equation 2.3 can be written as ∀j ∈ N >0 : θ(e) + ⊕x(lsim 1 (j)) -⊕y(cbef 1,2 (j)) ≤ δ(e)

We have that ∀j ∈ N >0 :

⊕x(j) = j; ⊕y(j) = 2j; cbef 1,2 (j) = j 2 ; lsim 1 (j) = 2 j 2 So, X(j) = θ(e) + 2 j 2 -2 j 2 = θ(e)
For θ(e) = 2, the overflow equation can be written as

∀j ∈ N >0 : δ(e) ≥ 2
The minimum safe size of channel e is hence equal to 2 (which is equal to the size obtained by the symbolic execution).

Boundedness

Channel e can be implemented as a bounded buffer if there are bounded constants θ(e) and δ(e) (with θ(e) ≤ δ(e)) that satisfy the overflow equation. From Equation 2.3, we have that ⊕y(cbef i,k (j)) ≥ ⊕x(j) + θ(e)δ(e). Since ⊕y is a monotone function, we have that cbef i,k (j) ≥ y -1 (⊕x(j) + θ(e)δ(e))

According to the second property of an activation relation (Property 2.1), there must be a finite number of firings of the consumer between every two firings of the producer. Hence, function cbef i,k should satisfy

∀j ∈ N >0 : cbef i,k (j) -cbef i,k (j -1) is bounded (2.5)
Example 2.10 (SDF graphs). Let e = (p 1 , p 2 , a ω , b ω ) be a channel in a SDF graph where a, b ∈ N >0 . We have that ⊕x(j) = aj, ⊕y(j) = bj, and y -1 (j) = j b . So, cbef 1,2 (j) ≥ a b j + θ(e)-δ(e) b . For instance, if the activation relation and the scheduling policy ensure that cbef 1,2 (j) = max{0, a b j + θ(e)-δ(e) b },

then cbef i,k (j) -cbef i,k (j -1)
is upper bounded by a b .

Underflow analysis

The underflow analysis is dual to the overflow analysis. An underflow exception occurs when an actor attempts to read from en empty channel. The underflow analysis ensures that the (under-approximated) number of accumulated tokens is always greater than or equal to zero for every execution of the dataflow graph. The (under-approximated) number of accumulated tokens can be computed as follows.

• The number of consumed tokens by job p k [j] is equal to y(j).

• The number of consumed tokens before p k [j] reads any token is equal to ⊕y(j -1).

The number of consumed tokens until and including the j th job of p k is hence equal to ⊕y(j). If j = lsim k (j), then ⊕y(j) = ⊕(y ⊗ s k,i (s -1 k,i (j)) = ⊕y(⊕s k,i (s -1 k,i (j))). • The (under-approximated) number of produced tokens before p k [j] reads any token on channel e is equal to ⊕x(cbef k,i (j)). Function cbef k,i : N >0 → N is a monotone integer function such that p i [cbef k,i (j)] is the last job of p i which certainly writes all its results on channel e before p k [j] reads any token from that channel.

If cbef k,i (j) = lsim i (cbef k,i (j)), then ⊕x(cbef k,i (j)) = ⊕(x ⊗ s i,k )(s -1 i,k (cbef k,i (j))) = ⊕x(⊕s i,k (s -1 i,k (cbef k,i (j)))
). If the under-approximated number of accumulated tokens in the channel is greater than or equal to zero for all j ∈ N >0 , then underflow exceptions will not occur at run time. Hence, the underflow analysis can be formulated as follows. ∀j ∈ N >0 : θ(e) + ⊕x(cbef k,i (j)) -⊕y(j) ≥ 0

(2.6)

Example 2.11. Let us take channel e = (p 2 , p 3 , 3 ω , 1 ω ) of the self-timed example. We have that ∀j ≥ 2 : cbef 3,2 (j) = sprd 3,2 (j) = j-1

3

. Since it is not safe to say that p 2 [1] writes its results before p 3 [1] reads any token, we must take cbef 3,2 (1) = 0. We have that s 2,3 ∈ B ω and cbef 3,2 (j) = cbef 3,2 (lsim 3 (j)). Thus, Equation 2.6 can be written as ∀j ∈ N >0 : Y (j) = θ(e) + ⊕x(cbef 3,2 (j)) -⊕y(lsim 3 (j)) ≥ 0

We have that ⊕x(j) = 3j; ⊕y(j) = j; lsim 3 (j) = 3 j-1

3 + 1; cbef 3,2 (j) = j-1 3 So, Y (j) = θ(e) + 3 j -1 3 -(3 j -1 3 + 1) = θ(e) -1
The underflow equation can be written as

∀j ∈ N >0 : θ(e) -1 ≥ 0
The minimum number of initial tokens on the channel that excludes underflow exceptions is hence equal to 1.

Boundedness

Channel e can be implemented as a bounded buffer if there is a bounded constant θ(e) that satisfies the underflow equation. From Equation 2.6, we have that ⊕x(cbef k,i (j)) ≥ ⊕y(j)θ(e). Since ⊕x is a monotone function, we have that

cbef k,i (j) ≥ x -1 (⊕y(j) -θ(e)) (2.7)
According to Property 2.1, there must be a finite number of firings of the producer between every two firings of the consumer. Hence, function cbef k,i should satisfy

∀j ∈ N >0 : cbef k,i (j) -cbef k,i (j -1) is bounded (2.8)
Since cbef k,i (cbef i,k (j)) < j, there is no activation relation that satisfies both the overflow and the underflow analyses if ∃j :

x -1 (⊕y(y -1 (⊕x(j) + θ(e)δ(e)))θ(e)) ≥ j

A similar condition can be deduced using cbef i,k (cbef k,i (j)) < j.

Example 2.12. Let e = (p 1 , p 2 , x, 2 ω ) be a channel such that x is equal to the Fibonacci word. The Fibonacci word is an aperiodic infinite binary sequence and cannot hence modeled in the (C)SDF model. If s 0 = 0, s 1 = 0 1, and s n = s n-1 .s n-2 , then the Fibonacci word is the limit s ∞ .

If Φ = 1+ √ 5 2
is the golden ratio, then we have that x(j) = 2 + ⌊jΦ⌋ -⌊(j + 1)Φ⌋, y -1 (j) = j 2 , x -1 (j) = ⌊jΦ 2 ⌋, and ⊕x(j) = 2j +1-⌊(j +1)Φ⌋. According to Equations 2.4 and 2.7, we must have cbef 2,1 (j) ≥ ⌊(2jθ(e))Φ 2 ⌋ (2.9) cbef 1,2 (j) ≥ 2j + 1 -⌊(j + 1)Φ⌋ + θ(e)δ(e) 2 (2.10)

A possible schedule of the two actors that could satisfy the previous equations is presented in Listing 2.1. For this schedule, cbef 1,2 (j) = j 2Φ 2 and cbef 2,1 (j) = ⌊2Φ 2 j⌋. Equation 2.9 is satisfied if θ(e) ≥ 0. For θ(e) = 0, Equation 2.10 is satisfied if δ(e) ≥ 2. Hence, δ(e) = 2 is the minimum buffer size when θ(e) = 0.

Listing 2.1: A bounded and complete schedule of Example 2.12 . j=1; k=0; while(true) do{ for(i=k+1;i ≤ ⌊2Φ 2 j⌋ ;i++){ k++; code of p1 } code of p2 j++; }

Affine schedules

In real-time scheduling of dataflow graphs, a dataflow graph is represented as a periodic task set where each actor is mapped to a periodic task with scheduling parameters (period, phase, deadline, priority, etc). Tasks cannot self-suspend and auto-concurrency is disabled. A periodic task set can be abstracted by a specific class of activation-related schedules, called affine (or strictly periodic) schedules.

Affine relations

Affine transformations of abstract clocks were introduced in [START_REF] Smarandache | Validation of mixed signalalpha real-time systems through affine calculus on clock synchronisation constraints[END_REF] (Definition 1.4, p. 22). In this section, we will approach them differently using ultimately periodic binary sequences. Activation clocks pi and pk are (n, ϕ, d)-affine-related, with n, d ∈ N >0 and ϕ ∈ Z, if in case ϕ is positive (resp. negative), clock pi is obtained by counting each n th instant on a referential abstract clock ĉ starting from the first (resp. (-ϕ + 1) th ) instant; while clock pk is obtained by counting each d th instant on ĉ starting from the (ϕ + 1) th (resp. first) instant. Hence, we have ∀j ∈ N >0 (j denotes the j th tag in ĉ) Proof : We have that ∀j ∈ N >0 : pi (j + nd gcd{n,d} ) = pi (j) and pk (j + nd gcd{n,d} ) = pk (j). Therefore, there is a positioning pattern that repeats infinitely, as depicted in In the sequel, ϕ is supposed to be positive (unless it is stated otherwise). When ϕ is negative, it is sufficient to reverse the affine relation and then obtain the desired property. gcd{n,d} have an infinite number of solutions. If the first synchronization occurs at (j 1 , j ′ 1 ), then the l th synchronization occurs at (j 1 + (l-1)d gcd{n,d} , j ′ 1 + (l-1)n gcd{n,d} ). Hence, there is exactly one synchronization per positioning pattern instance. (ii) gcd{n, d} |ϕ: Equation njdj ′ = ϕ + nd has no solution.

pi (j) = 1 if ∃t ∈ N : j = nt + max{1, -ϕ + 1} 0 otherwise and pk (j) = 1 if ∃t ∈ N : j = nt + max{1, ϕ + 1} 0 otherwise
Since we are not interested in tags where both clocks are absent, we define an affine relation as an ultimately periodic activation relation

[s i,k = u i v ω i , s k,i = u k v ω k ].
We have that (assuming that ϕ is positive)

• |u i | = |u k | = ϕ n ; ∀j ≤ |u i | : u i (j) = 1 and u k (j) = 0. • According to Property 2.7, |v i | = |v k | = n + d gcd{n, d} - 1 if gcd{n, d}|ϕ 0 otherwise • v i = d gcd{n,d} and v k = n gcd{n,d} .
Example 2.13. For the affine relation in Figure 2.9, we have that s i,k = 0(1 0 1 1 1 0 1) ω and s k,i = 1(0 1 0 1 0 1 0) ω .

We have also that sprd i,k (j) = max{0, n(j-1)-ϕ d }, prd i,k (j) = max{0, n(j-1)-ϕ d + 1}, ssuc i,k (j) = prd i,k (j) + 1, and suc i,k (j) = sprd i,k (j) + 1. To obtain sprd k,i , prd k,i , ssuc k,i , and suc k,i , we need just to reverse the affine relation. Let ξ(j) be the number of synchronizations until and including p i [j], and p i [j 1 ] be the first job of p i synchronized with a job of p k . So, we have that s -1 i,k (j) = j + prd i,k (j)ξ(j) and ξ(j) = 0 if gcd{n, d} |ϕ max{0, (j-j 1 ) gcd{n,d} d + 1} otherwise

Canonical form

An infinite number of affine transformations can result in the same activation relation. For instance, (n, ϕ, d) and (cn, cϕ, cd) (where c is an integer constant) result in the same activation relation. A canonical form is therefore proposed in [START_REF] Smarandache | A canonical form for affine relations in SIG-NAL[END_REF]. Let g = gcd{n, d}. So,

(i) g|ϕ: (n, ϕ, d) ≡ ( n g , ϕ g , d g ). (ii) g |ϕ: (n, ϕ, d) ≡ (2 n g , 2 ϕ g + 1, 2 d g ).
The first case is obvious; the second case needs a proof. We present here a much simpler proof than the one presented in [START_REF] Smarandache | A canonical form for affine relations in SIG-NAL[END_REF].

Proof: Let (n, ϕ, d) ≡ (n ′ , ϕ ′ , d ′ ) with n ′ = mn g and d ′ = md g . We need to find the minimum integers m (m ≥ 1) and ϕ ′ such that both affine transformations result in the same activation relation; hence in the same sprd i,k and ssuc i,k .

sprd i,k (j) = n ′ (j-1)-ϕ ′ d ′ = n(j-1)-ϕ d + ϕ d -gϕ ′ md .
The two affine transformations are equivalent only if n(j-1)-ϕ d = n(j-1)-ϕ d + ϕ d -gϕ ′ md . Let d 0 ≥ 1 and d 1 ≥ 1 be the minimum integers such that d|n(j -1)ϕd 0 and d|n(j -1)ϕ + d 1 , respectively. Note that d 0 and d 1 are greater or equal to 1 because the affine relation does not contain any synchronous activations (since g |ϕ). Hence, we must have -d 0 < ϕ -g m ϕ ′ ≤ d 1 . Following the same process with ssuc i,k , we should have the constraint

-d 0 ≤ ϕ-g m ϕ ′ < d 1 . Therefore, ϕ-d 1 g < ϕ ′
m < ϕ+d 0 g . So, we must have

Consistency

An affine schedule consists of a set of affine relations. Let G r be the graph of affine relations.

Proposition 2.7. A closed walk p 1

(n 1 ,ϕ 1 ,d 1 ) -→ p 2 → • • • → p m (nm,ϕm,dm) -→ p 1 is consistent only if m i=1 n i = m i=1 d i (2.

11)

Proof: Since an affine schedule is also an ultimately periodic schedule, a closed walk in G r is consistent only if Proposition 2.8 is satisfied; i.e.

m i=1 v i,k = m i=1 v k,i with k = i mod m + 1. But, v i,k = d i gcd{n i ,d i } and v k,i = n i gcd{n i ,d i } . Proposition 2.8. A closed walk p 1 (n 1 ,ϕ 1 ,d 1 ) -→ p 2 → • • • → p m (nm,ϕm,dm) -→ p 1 is consistent if Equation 2.11 is satisfied and m i=1 ( i-1 j=1 d j )( m j=i+1 n j )ϕ i = 0 (2.12) Proof: Let us put X m = m i=1 n i , Y m = m i=1 d i , and Z m = m i=1 ( i-1 j=1 d j )( m j=i+1 n j )ϕ i . We have two cases. (i) ψ[j] is true: In this case, prd 1,2 (j) = X 1 j-Z 1 Y 1 -X 1 Y 1 + 1, prd 1,2,3 (j) = X 2 j-Z 2 Y 2 -X 2 Y 2 + 1, etc. Since X m = Y m , we have that prd ψ (j) = j -Zm
Ym . According to Proposition 2.1, prd ψ (j) = j; hence Z m = 0. Similar process can be done for suc ψ . (ii) ψ[j] is false: Since prd ψ (j) < j -Zm Ym < suc ψ (j), condition Z m = 0 is a sufficient condition for consistency. -→ p 1 , then according to Equations 2.11 and 2.12 we have that 4n 3 = 5d 3 and 4n 3 = 3ϕ 3 . So, (n 3 , ϕ 3 , d 3 ) ≡ (15k, 20k, 12k) for k ≥ 1. Since gcd{15k, 12k} |20k, the canonical form is (10, 13, 8). However, Equation 2.12 does not hold when (n 3 , ϕ 3 , d 3 ) = (10,[START_REF] Baruah | The partitioned multiprocessor scheduling of deadlineconstrained sporadic task systems[END_REF][START_REF] Baker | A comparison of global and partitioned EDF schedulability tests for multiprocessors[END_REF]. The affine schedule is also consistent when (n 3 , ϕ 3 , d 3 ) = (10,[START_REF] Baruah | Implementation of speedup-optimal global EDF schedulability test[END_REF][START_REF] Baker | A comparison of global and partitioned EDF schedulability tests for multiprocessors[END_REF], as illustrated in Figure 2.10. Equation 2.12 does not also hold in this case. All the affine transformations that are equivalent with (10,[START_REF] Baruah | Implementation of speedup-optimal global EDF schedulability test[END_REF][START_REF] Baker | A comparison of global and partitioned EDF schedulability tests for multiprocessors[END_REF] can be written as (5k, ϕ, 4k) with 5k < ϕ < 6k. All these affine transformations cannot satisfy Equation 2.12. Property 2.8. Equation 2.12 is a necessary condition if the following equation system admits a solution.

Γ x = ϕ (2.13)

where ϕ(i) = ϕ i , and for every affine relation p i

(n i ,ϕ i ,d i )
-→ p k with k = (i mod m) + 1, we have that Γ i,i = n i and Γ i,k = -d i .

Proof: Firstly, if Equation 2.13 admits a solution, then it admits an infinite number of solutions since det

(Γ) = X m -Y m = 0. If x is a solution, then ∀i = 1, m : n i x(i) - d i x(k) = ϕ i such that k = (i mod m) + 1. Hence, prd i,k ( x(i) + 1) = suc i,k ( x(i) + 1) = x(k) + 1. So, p i [ x(i) + 1] = p k [ x(k) + 1]. Thus, ψ[ x(1) + 1] is true.
According to the proof of Proposition 2.8, Z m must be equal to zero.

In real-time scheduling of dataflow graphs, we need to have a global referential clock. Therefore, Proposition 2.8 must hold for every simple cycle in the graph of affine relations.

Proposition 2.9. Let ψ, ψ ′ , ψ ′′ be three simple cycles such that ψ = ψ ′ ⊎ ψ ′′ and ψ ′ ∪ ψ ′′ forms a continuous path. If Proposition 2.8 holds for ψ ′ and ψ ′′ , then it holds for ψ.

Proof: According to Property 2.4 and since an affine schedule is also an ultimately periodic schedule, we have that Equation 2.11 holds for cycle ψ. Since the set of edges in ψ ′ that have opposites in ψ ′′ forms a contiguous path, we can put

ψ ′ = ψ 1 + ψ * , ψ ′′ = ψ 2 + ψ -1
* , and ψ = ψ 1 + ψ 2 . To ease the notations, we illustrate the proof for Equation 2.12 on an example. Let ψ * = p 2 (n,ϕ,d)

-→ p 3 (n ′ ,ϕ ′ ,d ′ ) -→ p 4 , ψ 1 = p 4 (n 4 ,ϕ 4 ,d 4 ) -→ p 1 (n 1 ,ϕ 1 ,d 1 ) -→ p 2 ,
and

ψ 2 = p 2 (n 2 ,ϕ 2 ,d 2 )
-→ p 5

(n 5 ,ϕ 5 ,d 5 )

-→ p 4 . So, we have that

Z ψ ′ = n 1 ϕ 4 nn ′ + d 4 ϕ 1 nn ′ + d 4 d 1 ϕn ′ + d 4 d 1 ϕ ′ d = 0 and Z ψ ′′ = n 5 ϕ 2 d ′ d+d 2 ϕ 5 d ′ d-d 2 d 5 ϕ ′ d-d 2 d 5 ϕn ′ = 0.
We then eliminate common terms: 2.11 on cycle ψ ′ ), we obtain

d 2 d 5 Z ψ ′ + d 4 d 1 Z ψ ′′ = n 5 d 4 d 1 ϕ 2 dd ′ + d 2 d 4 d 1 ϕ 5 dd ′ + n 1 d 2 d 5 ϕ 4 nn ′ + d 4 d 2 d 5 ϕ 1 nn ′ = 0. Using nn ′ dd ′ = d 4 d 1 n 4 n 1 (Equation
d 2 d 5 Z ψ ′ +d 4 d 1 Z ψ ′′ dd ′ = Z ψ = 0. Generally, if X ψ
is the product of parameters n of affine relations on walk ψ and Y ψ is the product of parameters d of affine relations on walk ψ, then

Y ψ 1 Z ψ ′′ + Y ψ 2 Z ψ ′ = Y ψ * Z ψ
Proposition 2.10 (Consistency of affine schedules). An affine schedule is consistent if Equations 2.11 and 2.12 hold for every fundamental cycle in the graph of affine relations.

A fundamental cycle is an undirected cycle that is obtained when adding an edge to the spanning tree (or the spanning forest if G r is not connected) of the graph of affine relations. There is a one-to-one correspondence between fundamental cycles and edges not in the spanning tree. if G r = (P, R) is connected, then there are |R| -N + 1 fundamental cycles. Fundamental cycles form a basis for the cycle space; i.e. any undirected cycle in the graph can be expressed as the symmetric difference of some fundamental cycles. According to Proposition 2.9, we need to check consistency of only cycles in a cycle basis. Finding a cycle basis is a well-known problem in graph theory [START_REF] Kavitha | Cycle bases in graphs characterization, algorithms, complexity, and applications[END_REF] that can be solved in polynomial time. Finding the minimum cycle basis (i.e. the total number of edges in the cycle basis is minimum) could be interesting to reduce the length of constraints (i.e. Equation 2.12).

Fixed-priority schedules

In FP scheduling, each actor p i has a constant priority sequence ω i = (w i ) ω . We assume that each actor can have a distinguished priority. At each instant of the execution, a FP scheduler chooses the task with the highest priority among all activated tasks to execute on a given processor. In case of partitioned scheduling, each actor is permanently allocated to processor number ν i ; while in global scheduling, a job can migrate from one processor to another. We will show in the next chapter how to compute the scheduling parameters w i and ν i of each actor. In this section, we present how to compute a FP abstract schedule using Linear Integer Programming (ILP). The abstract schedule consists of an affine relation between every two adjacent (i.e. communicating) actors. The abstract schedule should exclude overflow and underflow exceptions.

A Overflow analysis

Let e = (p i , p k , x, y) be a channel between the (n, ϕ, d)-affine-related actors p i and p k . The affine relation is under the canonical form. Firstly, we need to compute function cbef i,k that corresponds to a FP scheduling policy without considering the physical timing. Figures 2.11 illustrates for all possible cases which last job of p k certainly reads all its needed tokens from channel e before p i [j] writes any token on that channel. Let j ′ = prd i,k (j) and j ′′ = cbef i,k (j).

(i) Partitioned scheduling:

a. w i < w k , ν i = ν k , and p i [j] = p k [j ′ ]: When job p i [j] is released, it may be possible that p k [j ′ ]
has not yet finished reading from channel e. In this case, p i [j] preempts p k [j ′ ] because p i has the highest priority and both jobs are allocated to the same processor. Thus, we are only certain that p k [j ′ -1] has already finished. A safe approximation is hence to put cbef i,k (j) = prd i,k (j) -1.

b. w i < w k , ν i = ν k , and p i [j] = p k [j ′ ]: jobs p i [j] and p k [j ′ ] are released simultaneously to execute on the same processor. Thus, p i [j] will execute first because it has the highest priority. Hence, cbef i,k (j) = prd i,k (j) -1.

c. w i < w k , ν i = ν k , and p i [j] = p k [j ′ ]: As in case (a), cbef i,k (j) = prd i,k (j) -1. d. w i < w k , ν i = ν k , and p i [j] = p k [j ′ ]: As in case (b), cbef i,k (j) = prd i,k (j) -1.
e. w i > w k , ν i = ν k , and p i [j] = p k [j ′ ]: Since p k [j ′ ] has a higher priority than p i [j] and p k [j ′ ] is released first, we are certain that p k [j ′ ] ends before p i [j] starts writing any token. Hence, cbef i,k (j) = prd i,k (j).

f. w i > w k , ν i = ν k , and p i [j] = p k [j ′ ]: As in the previous case, cbef i,k (j) = prd i,k (j).

g. w i > w k , ν i = ν k , and To sum up, it is certain that the last job of p k released before or simultaneously with p i [j], completes reading from channel e before p i [j] starts writing on e only if p k has a higher priority than p i and both actors are allocated to the same processor. Therefore,

p i [j] = p k [j ′ ]: Though p k [j ′ ]
i,k (j) = prd i,k (j) -1. h. w i > w k , ν i = ν k , and p i [j] = p k [j ′ ]: p i [j] can execute in parallel with p k [j ′ ]. Thus, cbef i,k (j) = prd i,k (j) -1.
cbef i,k (j) = max{0, prd i,k (j) -1} if w i < w k ∨ ν i = ν k prd i,k (j) otherwise
(ii) Global scheduling: It is possible that there are enough resources to execute p i [j] and p k [j ′ ] in parallel with each other. Hence, a safe approximation is to take cbef i,k (j) = max{0, prd i,k (j) -1}.

Channel e is overflow-free if Equation 2.3 is satisfied. Unfortunately, that equation is not a linear constraint. Similarly to real-time calculus, we approximate the number of accumulated tokens by upper and lower bound curves. However, the curves are timeindependent. If ⊕x u is the upper bound curve of ⊕x, ⊕y l is the lower bound curve of ⊕y, and cbef l i,k is the lower bound curve of cbef i,k , then the over-approximated number of accumulated tokens is given as X u (j) = θ(e) + ⊕x u (j) -⊕y l (cbef l i,k (j))

In order to compute cbef l i,k , we need to compute the lower bound of n(j-1)-ϕ d which could be taken as the linear bound n d j -ϕ+n+d-1 d

. Since an actor produces or consumes a finite number of tokens at each firing, the cumulative function of a rate function x can be linearly bounded. Suppose that we have ∀j ∈ N : ⊕x l (j) = a x j +λ l x ≤ ⊕x(j) ≤ ⊕x u (j) = a x j + λ u

x with a x ∈ Q >0 . If cbef i,k (j) = prd i,k (j) -1, then we obtain

X u (j) = (a x -a y n d )j + θ(e) + λ u x -λ l y + a y ϕ + n + d -1 d
The number of accumulated tokens is bounded only if a xa y n d = 0. Thus, the boundedness criterion is

n d = a x a y (2.14)
Since n and d can be deduced from the boundedness criterion, the overflow equation can be written as a simple linear constraint

θ(e) -δ(e) + a y d ϕ ≤ λ l y -λ u x -a y n + d -1 d (2.15)
where ϕ is the free integer variable. The size of the channel and the number of its initial tokens can be either predefined or free variables. If cbef i,k (j) = prd i,k (j), we obtain the following linear constraint.

θ(e) -δ(e) + a y d ϕ ≤ λ l y -λ u x -a y n -1 d (2.16)

B Underflow analysis

The underflow analysis is dual to the overflow analysis. We first need to compute function cbef k,i that corresponds to a FP scheduling policy without considering the physical timing. Figure 2.12 illustrates for some possible cases which last job of p i certainly writes all its results on channel e before p k [j] reads any token from that channel.

Figure 2.12: Function cbef k,i : partitioned fixed-priority scheduling.

In partitioned scheduling, cbef k,i (j) = prd k,i (j) if w i < w k and ν i = ν k (cases (a) and (b)); and cbef k,i (j) = prd k,i (j) -1 otherwise. In global scheduling, cbef k,i (j) = prd k,i (j) -1 (cases (c) and (d)). The number of accumulated token in channel e can be under-approximated as Y l (j) = θ(e) + ⊕x l (cbef l k,i (j)) -⊕y u (j) . Hence,

If cbef k,i (j) = prd k,i (j) -1, then cbef k,i (
Y l (j) = (a x d n -a y )j + θ(e) + λ l x -λ u y + a x ϕ -n -d + 1 n
But, a x d na y = 0 (the boundedness criterion). Therefore, the underflow equation can be written as the following linear constraint.

θ(e) + a y d ϕ ≥ λ u y -λ l x + a y n + d -1 d (2.17)
When cbef k,i (j) = prd k,i (j), the linear underflow constraint is given as.

θ(e) + a y d ϕ ≥ λ u y -λ l x + a y d -1 d (2.18)
If we combine the overflow equation with the underflow equation, then we can compute an approximate size of the channel as illustrated in Table 2.1 where λ = (λ u y + λ u x ) -(λ l y + λ l x ). These approximate sizes are useful when computing the scheduling parameters. For instance, the gain in storage space that comes from switching the priorities of two actors allocated to the same processor is approximatively equal to a y | d-n n |.

ν i = ν k ν i = ν k w i < w k λ + a y n+2d-2 d λ + a y 2n+2d-2 d w i > w k λ + a y 2n+d-2 d λ + a y 2n+2d-2 d
Table 2.1: Approximate buffer sizes in fixed-priority scheduling.

C Algorithm

If the graph of affine relations is acyclic, then every affine relation can be computed independently of the other relations. Parameters n and d can be deduced from the boundedness criterion; while parameter ϕ is computed (using an enumerative solution or the approximate overflow and underflow equations) so that the total sum of sizes of the channels between p i and p k is minimized.

When the graph of affine relations is cyclic, consistency of the schedule must be considered. Firstly, we use Equation 2.14 to deduce parameters n and d of every affine relation, then Equation 2.11 is applied on every fundamental cycle in G r . To compute the parameters ϕ, we construct an integer linear program by applying overflow and underflow linear constraints on channels; and Equation 2.12 on fundamental cycles. The objective function of the linear program is to minimize the buffering requirements. From the overflow and underflow equations, we can notice that lim The number of initial tokens in channels could be insufficient and an underflow-free affine schedule does not hence exist. It is also possible to not find an underflow-free schedule because of the conservative approximation made in the overflow and underflow analyses. One option is to not specify the numbers of initial tokens and so let the scheduling tool compute the appropriate values. Sizes obtained by the solution of the linear program are a safe approximation of the actual sizes. Therefore, they may be recomputed after obtaining the affine relations. The minimum number of initial tokens is given by θ(e) = | min{0, min j {⊕x(cbef k,i (j)) -⊕y(j)}}| and the minimum size of the channel is given by δ(e) = max j {θ(e) + ⊕x(j) -⊕y(cbef i,k (j))}.

As shown in the previous chapter, retiming techniques can be used to redistribute the initial tokens in order to improve the throughput. If the production and consumption rates are constant, then retiming can be easily expressed as linear constraints. If e = (p i , p k , a ω , b ω ) and z is the retiming vector, then we have to add the linear constraint θ(e) = θ ′ (e) + a z(i)b z(k) where θ ′ (e) is the user-provided number of initial tokens in the channel.

EDF schedules

In EDF scheduling, the job with the earliest absolute deadline has the highest priority. If two jobs p i [j] and p k [j ′ ] have the same absolute deadlines, then the job which is released first gets the highest priority. However, if the two jobs are synchronous, then we use the actors' ID to break the tie. In this section, we show how to compute the affine schedule when the dataflow graph is modeled as an implicit periodic task set. We also show the impact of the totally ordered communication strategy on the buffering requirements.

A Implicit task model

Each job p[j] has an absolute deadline that has the same tag as the next release p[j + 1]. Let e = (p i , p k , x, y) be a channel between two (n, ϕ, d)-affine-related actors. Regarding the overflow analysis, we need to compute function cbef i,k that corresponds to the EDF scheduling of implicit task sets. Figures 2.13 illustrates for some possible cases which last job of p k certainly reads all its needed tokens from channel e before p i [j] writes any token on that channel. Let j ′ = prd i,k (j) and j ′′ = cbef i,k (j).

(i) Partitioned scheduling (ν i = ν k ): a,b. p i [j] = p k [j ′ ] and p k [j ′ + 1] ≤ p i [j + 1]: According to the EDF policy, p k [j ′ ] has a higher priority than p i [j]. Since p k [j ′ ] is released before p i [j]
and the two actors are allocated to the same processor, p k [j ′ ] will end before p i [j] starts executing. Hence, cbef i,k (j) = prd i,k (j).

c. p i [j] = p k [j ′ ] and p i [j + 1] < p k [j ′ + 1]: job p k [j ′
] is released first; but it can be preempted by p i [j] since this latter has the highest priority. Hence, it is safe to take cbef i,k (j) = prd i,k (j) -1.

d. p i [j] = p k [j ′ ] and p k [j ′ + 1] < p i [j + 1]: p k [j ′ ] has a higher priority than p i [j]. Therefore, cbef i,k (j) = prd i,k (j). e. p i [j] = p k [j ′ ] and p i [j + 1] = p k [j ′ + 1]:
To break the tie, we need to look at the actors' ID. If ID(p k ) < ID(p i ), then cbef i,k (j) = prd i,k (j); else cbef i,k (j) = prd i,k (j) -1. (ii) Partitioned scheduling (ν i = ν k ) or global scheduling: In these cases, priorities do not guarantee any precedences between jobs as shown in the FP scheduling. For instance, in Figure 2.13, case (a), jobs p k [j ′ ] and p i [j] can execute in parallel with each other. So, for all possible cases, we have that cbef i,k (j) = prd i,k (j) -1.

f. p i [j] = p k [j ′ ] and p i [j + 1] < p k [j ′ + 1]: job p i [j] has a higher priority than p k [j ′ ]. Hence, cbef i,k (j) = prd i,k (j) -1. (a) (b) (c) (d) (e) (f)
The underflow analysis is dual to the overflow analysis. For instance, if

p k [j] = p i [j ′ ], ν i = ν k , and p k [j + 1] < p i [j ′ + 1], then cbef k,i (j) = prd k,i (j) -1.
The overflow and underflow linear equations can be computed as in the FP scheduling. Similarly, we can deduce the approximate gain that comes from allocating two actors to the same processor.

B Totally ordered communication

Consider the case when the producer p i and the consumer p k are all allocated to the same processor. As illustrated in Figure 2.13 case (c), worst-case overflow and underflow scenarios are considered when there is a potential preemption. Besides reducing the context switching overhead, eliminating preemptions will definitely result in a more accurate analysis and hence less buffering requirements.

The totally ordered communication strategy between p i and p k is defined as follows.

If p i [j] is released before p k [j ′ ], then p i [j] executes entirely before p k [j ′ ]. Similarly, if p k [j ′ ] is released before p i [j], then p k [j ′ ] executes entirely before p i [j].
In the next chapter, we will describe how to implement this communication strategy without using lock-based synchronization mechanisms.

For the overflow analysis, we will have cbef i,k (j) = prd i,k (j) in cases (a,b,c,d) of Figure 2.13 and cbef i,k (j) = prd i,k (j) -1 in case (f). We need to look at actors' ID to break the tie in case (e). The difference between the implicit task model and the totally ordered communication strategy lies in case (c); i.e. when d-n gcd{n,d} ≥ 2. In this case, the linear overflow and underflow equations are

λ u y -λ l x + a y d -1 d ≤ θ(e) + a y d ϕ ≤ δ(e) + λ l y -λ u x -a y n d
Compared to the implicit task model, the approximate gain on buffering requirements is hence equal to a y d-1 d . Similarly, if n-d gcd{n,d} ≥ 2, then the consumer may preempt the producer. The approximate gain that comes from the totally ordered communication will be equal to a x n-1 n .

One important question about the totally ordered communication strategy is whether imposing scheduling precedences may create deadlocked cycles. The answer is no because we enforce a scheduling precedence from p i to p k only when n-d gcd{n,d} ≥ 2. This property cannot be satisfied by all relations on a cycle.

Specific cases

In this section, we refine our technique for ultimately cyclo-static dataflow graphs. We also extend the approach to consider multichannels, shared storage space, synchronous semantics, etc.

Ultimately cyclo-static dataflow graphs

Definition 2.9 (UCSDF graph). An ultimately cyclo-static dataflow (UCSDF) graph is a static dataflow graph where production and consumption rates are ultimately periodic.

, x = u 1 v ω 1 , y = u 2 v ω 2 )
). This graph can be modeled as a (C)SDF graph only if there are two finite integers j 1 ≥ |u 1 | and j 2 ≥ |u 2 | such that θ(e) + ⊕x(j 1 ) -⊕y(j 2 ) = 0. For example, if x = 3 0(2 1) ω , y = 3(2 0 1) ω , and θ(e) = 2, then j 1 = 2 and j 2 = 2. This way the graph can be partitioned into two disjoint (C)SDF graphs: a deadlocked graph and a live one, as illustrated in Figure 2.15. Note that actor p 1 [1] will fire only once (and hence corresponds to the first job of actor p 1 ) because of the non-consistent self loop. There are some problems in this transformation method: (1) The resulted graph is non-consistent, which hinders the use of analysis tools for (C)SDF graphs. (2) We cannot disable auto-concurrency because this requires to add edges from the deadlocked subgraph into the live one and hence turns this latter into a deadlocked graph. (3) The UCSDF graph in Figure 2.14 cannot be transformed because it is not possible to find three finite integers j 1 ≥ 1, j 2 ≥ 2, and j 3 ≥ 1 that bring the marking to [0 0 0] T .

If Γ denotes the reachability graph in Figure 1.2 (p. 27), then the reachability graph of the UCSDF example (Figure 2.14) is

  0 0 0   p 2 -→   0 0 3   p 3 -→   1 0 1   p 3 -→   3 0 0   p 1 -→   0 4 0   p 2 -→ Γ
Therefore, there are an infinite number of live and bounded static schedules for the UCSDF example. All these schedules start with the prefix p 2 p 3 p 3 p 1 p 2 . Unlike in reachability graphs of (C)SDF graphs, it is possible that the initial marking of an UCSDF graph is not a home marking (i.e. there is no firing sequence that brings the graph to its initial state).

Affine scheduling

Let x = uv ω be an ultimately periodic rate function. So, ⊕x is a function that increases by v every |v| steps. Therefore, the cumulative function can be linearly bounded by a x j + λ l x ≤ ⊕x ≤ a x j + λ u x where a x = v |v| , λ l x = min

If e = (p i , p k , x = u 1 v ω 1 , y = u 2 v ω 2
) is a channel between p i and p k , then the affine relation between the two actors must satisfy the boundedness criterion

n d = a x a y = v 1 |v 1 | |v 2 | v 2
Question: Is there an affine schedule among all the possible static schedules of the UCSDF example? Firstly, it is worth recalling that the positioning pattern in an affine relation always consists of -→ p 1 . Let us consider the static schedule p 2 p 3 p 3 p 1 p 2 (p 2 p 3 p 3 p 1 p 3 p 1 ) ω . By projecting this schedule on each pair of the actors, we obtain the activation relations in Figure 2.17. Assuming an EDF scheduling policy with a totally ordered communication strategy on a single processor, we have to find the affine relations that give the same order of firings as in the static schedule. So, the activation relation between p 1 and p 3 corresponds to the affine relation p 1 (6,-7,4) -→ p 3 . However, there is no affine relation (by enumerating values of ϕ 1 ) that can give the same order of firings as in Figure 2.17.(a) because of the prefix. Therefore and for the same reason, there is no underflow-free affine schedule for the chosen scheduling policy. This is why it is better to let the scheduling tool compute the appropriate numbers of initial tokens.

Multichannels

Let e = (p i , p k , p l , x, y, z) be a channel that relates two producers p i and p k (allocated to the same processor) to one consumer p l . We impose a totally ordered communication strategy between producers; i.e. a job of a producer cannot preempt a job of the other producer. This way, if the affine relation between p i and p k is predefined or if all the possible values of the affine relation result in the same order of firings of the producers, then the producers write tokens on channel e in a deterministic way. We have hence a deterministic merge operator.

Like with simple channels, the number of accumulated tokens must be always smaller than or equal to the size of the channel and greater than or equal to zero. The overflow analysis can be written as

∀j ∈ N >0 : θ(e) + ⊕x(j) + ⊕y(cbef i,k (j)) -⊕z(cbef i,l (j)) ≤ δ(e) ∀j ∈ N >0 : θ(e) + ⊕x(cbef k,i (j)) + ⊕y(j) -⊕z(cbef k,l (j)) ≤ δ(e)
The number of accumulated tokens can be linearly over-approximated by considering ⊕x u , ⊕y u , ⊕z l , cbef u i,k , cbef u k,i , cbef l i,l , and cbef l k,l . Dually, the underflow analysis can be written as ∀j ∈ N >0 : θ(e) + ⊕x(cbef l,i (j)) + ⊕y(cbef l,k (j)) -⊕z(j) ≥ 0

The number of accumulated tokens can be linearly under-approximated by considering ⊕x l , ⊕y l , ⊕z u , cbef l l,i , and

cbef l l,k . If p i (n 1 ,ϕ 1 ,d 1 ) -→ p k (n 2 ,ϕ 2 ,d 2 ) -→ p l (n 3 ,ϕ 3 ,d 3 )
-→ p i , then the boundedness criterion will be

a z = a x n 3 d 3 + a y d 2
n 2 Similar analysis can be performed on channels with two consumers and one producer. This construct represents the deterministic select operator.

Example 2.15. Figure 2.18.(a) represents an UCSDF graph with a simple channel e 1 and a multichannel e 2 = (p 1 , p 2 , p 3 , x, y, z). We would like to find a consistent EDF schedule with a totally ordered communication between p 1 and p 2 (i.e. no preemption). Since θ(e 1 ) = 2 and δ(e 1 ) = 4, all the possible affine relations between p 1 and p 2 that prevent overflow and underflow exceptions over channel e 1 are of the form (4, ϕ 1 , 6) such that ϕ 1 ∈ {0, 1}. Both the affine relations give the same order of firings of p 1 and p 2 which is (p 1 p 2 p 1 p 2 p 1 ) ω . Therefore p 1 and p 2 write into the multichannel in a deterministic manner (i.e. functional determinism is guaranteed). Let s 1 = (1 0 1 0 1) ω (resp. s 2 = s1 = (0 1 0 1 0) ω ) denote the instants at which p 1 (resp. p 2 ) fires. Channel e 2 can be splitted into two simple channels e 2,1 and e 2,2 whose consumer is actor p 3 , as illustrated in Figure 2.18.(b). The consumption rate of e 2,1 is z 1 ; while the consumption rate of e 2,2 is z 2 . So, ∀j ∈ N >0 : z(j) = z 1 (j) + z 2 (j). Let x j be the total number of produced tokens by p 1 among the first j commonly produced tokens. So, x j can easily be obtained from the sequence (x ⊗ s 1 ) + (y ⊗ s 2 ). Hence, we have that z 1 (j) = x ⊕z(j) -⊕z 1 (j -1). In this example, z 1 and z 2 are ultimately periodic sequences such that the length of their periods is equal to 18. Once we have a graph that consists only of simple channels, we can apply the affine relation synthesis described in Section 2.3. Nevertheless, we prefer to use the overflow and underflow analyses described in this section to handle multichannels because (1) the length of rate functions grows exponentially when we split multichannels as illustrated in the previous example, and (2) the computation of z 1 and z 2 depends on the number of initial tokens in the multichannel. So, if we would like to let θ(e 2 ) as a free variable, then z 1 and z 2 cannot be computed.

Shared storage space

So far, we have only supposed that channels are implemented as separated storage spaces. Let G = ({p 1 , p 2 }, {e 1 = (p 1 , p 2 , (0 3 0) ω , (3 0 0) ω ), e 2 = (p 1 , p 2 , (0 0 3) ω , (0 0 3) ω )}) be a CSDF graph where θ(e 1 ) = θ(e 2 ) = 0. One possible affine relation between p 1 and p 2 that results in the minimum buffering requirements when using EDF scheduling is (2, 3, 2). Figure 2.19 shows the number of accumulated tokens in e 1 and e 2 and the sum of them after each firing of p 1 and p 2 according to the affine relation and the scheduling policy. From that picture, we have that δ(e 1 ) = 3 and δ(e 2 ) = 3. So, when the channels are implemented as separated buffers, the buffering requirements are equal to 6. But, we clearly notice that the sum of accumulated tokens in both channels at each instant of the execution is less or equal to 3. Hence, by implementing the two channels as a shared storage buffer, we can reduce the buffering requirements to 3. Let e 1 = (p 1 , p 2 , x 1 , y 1 ) and e 2 = (p 3 , p 4 , x 2 , y 2 ) be two channels in the dataflow graph. Without loss of generality, we suppose that they have the same data type. We would like to implement them as a single shared buffer b. The number of initial tokens in the shared buffer is θ(b) = θ(e 1 ) + θ(e 2 ); while its size is δ(b) ≤ δ(e 1 ) + δ(e 2 ). Firstly, to ensure functional determinism, we need to devise a read and write mechanism so that each consumer pulls from the shared buffer only tokens written by its corresponding producer. One simple solution is to tag produced tokens by the ID of the producer.

The underflow analysis does not change; i.e. we must always have that ∀j ∈ N >0 : θ(e 1 ) + ⊕x 1 (cbef 2,1 (j)) -⊕y 1 (j) ≥ 0 ∀j ∈ N >0 : θ(e 2 ) + ⊕x 2 (cbef 4,3 (j)) -⊕y 2 (j) ≥ 0 However, the overflow equations for the two channels must be combined together. Let crbef i,k : N >0 -→ N be an integer function such that p k [crbef i,k (j)] is the last job of p k that could write some of its results on channel e 2 before or at the same time at which p i [j] finishes writing its results on channel e 1 . The overflow analysis can be written as

∀j ∈ N >0 : θ(b) + ⊕x 1 (j) + ⊕x 2 (crbef 1,3 (j)) -⊕y 1 (cbef 1,2 (j)) -⊕y 2 (cbef 1,4 (j)) ≤ δ(b) ∀j ∈ N >0 : θ(b) + ⊕x 1 (crbef 3,1 (j)) + ⊕x 2 (j) -⊕y 1 (cbef 3,2 (j)) -⊕y 2 (cbef 3,4 (j)) ≤ δ(b)
In the previous example, we have that crbef 1,1 (j) = j and cbef 1,2 (j) = prd 1,2 (j) = max{0, j -2}. Hence, the overflow equation is

∀j ∈ N >0 : θ(b) + ⊕x 1 (j) + ⊕x 2 (j) -⊕y 1 (prd 1,2 (j)) -⊕y 2 (prd 1,2 (j)) ≤ δ(b)

FRStream

In the same spirit of Lucy-n, we propose a simple synchronous language called FRStream (FR from Firing Related) by expressing the synchronous semantics in our prioritydriven semantics. In the synchronous paradigm, computations and communications are instantaneous and scheduling precedences inside each reaction are deduced from the flow in the program. We can tailor the priority-driven semantics to express such paradigm as follows. Let [s i,k , s k,i ] be an activation relation between actors p i and p k . If

p i [j] < p k [j ′ ], then p i [j] executes entirely before p k [j ′ ]
because an actor takes zero time to fire. This is similar to the totally ordered communication strategy in EDF scheduling policy. The main difference lies when p i [j] and p k [j ′ ] are synchronous. Suppose that there is a channel from p i to p k . In a synchronous language such as SIGNAL, there will be a scheduling precedence between p i [j] to p k [j ′ ] because p k [j ′ ] will use the value produced by p i [j] at the same instant (i.e. zero delay communication). In our case, it is possible that p k [j ′ ] will not use any value produced by p i [j] because of the buffering mechanism. Therefore, we add a scheduling precedence only if results of p i [j] are required by p k [j ′ ]. Regarding auto-concurrency, if p i [j] = p i [j ′ ] with j ′ > j, then we add a scheduling precedence between p i [j] and p i [j ′ ].

A Language constructs

The main constructs of our language are streams, actors, activation relations, and processes. Syntactically, an infinite sequence uv ω is denoted by u(v) * ; while a finite sequence uv n is denoted by u(v)n.

1) Streams: Every variable in the program is a stream. So, integer x init 0(1)2; means that x is a stream of integers that initially contains values 0, 1, and 1. Let s be an ultimately periodic integer sequence such that ∀j ∈ N >0 : s(j) > 0. During the j th firing of actor p, expression x[s] at the right hand of an assignment denotes the s(j) th token consumed by p[j] from stream x. Similarly, expression x[s] at the left hand of an assignment denotes the s(j) th token produced by p[j] on stream x. When s = i ω with i ∈ N >0 , we use notation x[i] instead of x[(i) * ]. At each firing, a value can be read many times but can be only defined once (i.e. single assignment).

2) Actors: An actor is a deterministic program such that each pair of its sub-actors is (1, 0, 1)-affine-related. All arithmetic and logic operators are actors. For instance, plus(1 2,0 3)=1 5. Listing 2.2 represents an actor p 1 that has an input stream x and output stream y. As in SIGNAL, symbol "|" denotes synchronous composition. So, the two sub-actors (the copy and plus actors) are synchronous and have a data-dependency (stream z). However, they can run in no particular order because z is never empty. Note that though there is no assignment to y [1] the default value will be produced at each firing since we cannot produce the second token without producing the first one. Thus, both the production and consumption rates of p 1 are equal to 2 ω . Table 2.2 represents a synchronous execution of actor p 1 . Listing 2.3 represents the code of an actor that has two states s 1 and s 2 . A different firing function is executed in each state. When p 2 is in state s 1 , it switches to state s 2 after one firing; and then it returns back to state s 1 after one firing. Only ultimately periodic state automata are allowed. The production rate of stream y is equal to (0 2) ω ; while the consumption rate of stream x is equal to (2 0) ω .

[2]=plus(x[2],z[1]) | z[1]=x[1] } transitions{ } end Listing 2.3: Actor p2. actor P1(?real x; ! real y;) real z; begin state S1{ z[1]=x[1] | z[2]=x[2] } state S2{ y[2]=z[1] | y[1]=z[2] } transitions{ S1 --1 ->> S2; S2 --1 ->> S1; } end Table 2.2: A synchronous execution of actor p 1 . firing 1 2 3 x = 6 5 4 3 2 1 4 3 2 1 2 1 ǫ z = 4
6 4 2 y = ǫ 0 9 0 9 0 9 0 9 0 9 0 5

3) Activation relations: In a process, every two communicating actors (we assume that instances of the same actor have different names) are (1, 0, 1)-affine-related by default.

To express a different activation relation between two actors p and q, we use either notation p,q=(n,phi,d); to express an affine relation or p,q=[s1,s2]; to express an ultimately periodic activation relation.

4) Processes:

A process is a multi-clocked composition of actors and processes. Listing 2.4 is a process p that consists of the synchronous composition of two [(1 0) ω , (0 2) ω ]activation-related actors p 1 and p 2 . Figure 2.20 represents a synchronous execution of process p.

B Type system

In addition to classical type checking, the type system must ensure three other properties.

1) Consistency: The type system must statically check the consistency of the set of activation relations according to Propositions 2.5 and 2.6. This problem is decidable since all activation relations and rate functions are ultimately periodic.

2) Boundedness and deadlock freedom: We have two ensure that each stream is bounded and contains enough initial tokens. Each stream has one producer p i and one consumer p k . Firstly, we have to deduce the activation relation [s i,k , s k,i ], the production rate, and the consumption rate. Then, the overflow and underflow equations are applied such that functions cbef i,k and cbef k,i are computed according to the above described synchronous semantics.

3) Causality: This analysis is specific to the synchronous operational semantics. Consider the previous process (Listing 2.4) with an activation relation P1,P2=[(1) * ,(2) * ]. In this case, there are some synchronous activations; indeed p 1

[j] = p 2 [2j -1] = p 2 [2j].
From the data-dependencies, p 1 [j] executes first if stream y is empty and p 2 [2j -1] executes first if stream x is empty. Therefore, there is a dependency cycle if both streams are empty. This problem is specific to the synchronous semantics because in EDF or FP scheduling, it is impossible to have for instance that cbef 2,1 (cbef 1,2 (j)) = j.

Conclusion

In this chapter, we have defined abstract schedules of dataflow graphs and presented the necessary conditions that a consistent schedule must satisfy. We have also refined the results for specific cases: strictly periodic schedules with EDF and FP scheduling policies, ultimately cyclo-static dataflow graphs, mulichannels, synchronous operational semantics, etc. In the next chapter, we will further refine abstract schedules by computing the necessary timing and scheduling parameters that maximize a performance metric and satisfy schedulability for different architectures and scheduling policies. In real-time scheduling of dataflow graphs, each actor is mapped to a real-time periodic task. The necessary timing parameters that must be computed for each task are: periods, phases, and deadlines. More scheduling parameters could be needed as priorities of tasks in FP scheduling and processor allocation in partitioned multiprocessor scheduling. The computed scheduling parameters should respect the abstract schedule, ensure schedulability, and maximize a performance metric.

Chapter 3

Symbolic schedulability analysis

In the first section, we will present the general conditions that must be satisfied whatever the scheduling policy. Then, we present the symbolic schedulability analysis for two scheduling policies: FP scheduling (Section 3.2) and EDF scheduling (Section 3.3).

General conditions

Let G = (P, E) be a timed static dataflow graph and G r be the computed affine schedule (or more precisely the graph of affine relations). In a timed dataflow graph, each actor p i is associated with a worst-case execution time sequence η i ∈ N ω such that η i [j] is the worst-case execution time of firing p i [j]. To fit the periodic task model, we take the worst-case execution time of an actor p i as C i = max j η i [j]. So, each actor p i is characterized by (π i , r i , d i , C i ) such that π i is the period, r i is the phase, and d i is the relative deadline. In FP scheduling, actor p i is permanently assigned the priority w i . The dataflow is to be scheduled on a many-core processor architecture that consists of M ≥ 1 identical cores. In partitioned scheduling, actor p i is permanently allocated to core number ν i .

An affine relation is an abstract constraint that describes the relative positioning of activations of two actors without considering the physical duration between two activations. In the sequel, we will impose that the time interval between successive activations of an actor is constant since an actor will be mapped to a periodic task. Let p i and p k be two (n, ϕ, d)-affine-related actors. We have hence that

dπ i = nπ k (3.1)
r k -r i = ϕ n π i (3.2)
So, the period and phase of p k can be expressed in terms of the period and phase of p i ; i.e. π k = d n π i and r k = r i + ϕ n π i . But, timing parameters are non-negative integers. Thus, π i must be a multiple of lcm{ n gcd{n,d} , n gcd{n,ϕ} } and r i must be greater or equal to -ϕ n π i . Similarly, if p i

(n,ϕ,d) -→ p k (n ′ ,ϕ ′ ,d ′ )
-→ p l , then π l = dd ′ nn ′ π i and r l = r i + ϕn ′ +ϕ ′ d nn ′ π i . • If the graph of affine relations is connected, then the period of each actor can be expressed in terms of the period of an arbitrary actor. We can therefore put ∀p i ∈ P : π i = α i T where α i ∈ Q >0 and T is a multiple of some integer B. We can also put ∀p i ∈ P : r i = f + α ′ i T such that f is the phase of the arbitrary actor (f must be greater than or equal to max

p i ∈P {-α ′ i T }). Furthermore, we have that U = p i ∈P C i π i = p i ∈P C i α i T = σ T .
Regardless of the scheduling policy, a necessary condition for schedulability is that U ≤ M . Hence, we have that

T ≥ σ M (3.3)
For some real-time systems, frequencies of tasks must be higher than some minimal frequencies under which safety is not ensured or the service quality is poor. The frequencies should also be lower than some maximal frequencies over which a device, for example, may get damage. To better meet these requirements, we allow the designer to specify upper bounds and lower bounds on periods of actors. We will then have the following condition.

T l ≤ T ≤ T u (3.4)
where T l , T u ∈ N >0 . The schedulability region concerning the periods and phases is initially defined by the following constraints: T l ≤ T ≤ T u , T = kB, and T ≥ σ M . So, T is the only free variable.

• If the graph of affine relations is disconnected, then we partition G r to a set of L (maximal) connected graphs G j = (P j , R j ). Hence, the period and phase of each actor in a partition P j can be expressed in terms of the period and phase of an arbitrary actor in that partition; i.e. ∀p i ∈ P j : π i = α i T j and r i = f j + α ′ i T j where T j must be a multiple of B j , T l j ≤ T j ≤ T u j , and f j ≥ -α ′ i T j . Let U j be the total contribution of actors in P j to the processor utilization factor. So,

U j = p i ∈P j C i π i = σ j T j . A necessary schedulability condition is therefore given as L j=1 σ j T j ≤ M (3.5)
Regarding deadlines, we consider either implicit deadlines or constrained deadlines. The designer may like to impose deadlines. However, since periods are unknown, the designer has to specify deadlines in terms of periods; e.g. d 1 = π 1 2 -3. Therefore, the deadline of an actor p i can be expressed in terms of the period of an arbitrary actor in the connected subgraph that contains p i . So, ∀p i ∈ P j :

d i = β i T j -β ′ i where β i ∈ Q >0 and β ′ i ∈ N.
Since deadlines are integers, β i T j must be an integer. Thus, factor B j must be recomputed. We should also ensure that

C i ≤ d i ≤ π i . So, C i ≤ β i T j -β ′ i ≤ α i T j (3.6)
Therefore, the bounds T l j and T u j should also be recomputed. Regarding priority assignment and processor allocation, these scheduling parameters are required in the affine relation synthesis step and buffer sizes computation. But, in order to compute them, we need to perform a symbolic schedulability analysis that requires performing affine scheduling. We break the cycle in the scheduling approach as follows. Priorities and processor allocation are needed in affine scheduling only to compute parameters ϕ of affine relations since parameters n and d can be obtained from the boundedness criterion. Parameters ϕ are needed in the symbolic schedulability analysis only to compute phases of actors. But, most schedulability tests consider the worst-case arrival scenario when all actors arrive at the same time. Thus, we do not need parameters ϕ to perform the symbolic schedulability analysis. This slightly influences the computation of factors B j .

Most real-life applications are modeled as connected dataflow graphs. Therefore, we will focus more on the symbolic schedulability analysis of connected graphs. Obviously, symbolic schedulability analysis of disconnected graphs is more complicated.

Performance metrics

The design process of any embedded real-time system is driven by the objective of providing the best possible performance within the timing and resource constraints. Thus, we need to express the performance as a function of the design parameters (free variables) and then exploring the schedulability region (i.e. the region of the parameter space that corresponds to feasible designs) to find the best solution. So, if X is the vector of design parameters, S is the schedulability region, and F is the cost (reward or utility) function, then the symbolic schedulability analysis problem can be formulated as max F (X) Subject to X ∈ S

Many practical cost functions exist such as energy consumption, throughput, latency, etc. Some of them could be in conflict with each other as the throughput and buffering requirements of dataflow graphs. In the rest of this section, we will present some cost functions and the controlled parameters for each function. However, we will not consider metrics that depend on the phases of actors such as the end-to-end latency.

Buffering requirements: As shown in the previous chapter, some scheduling parameters influence the buffer sizes computation. In partitioned scheduling, allocating two actors to the same processor results in a smaller total sum of capacities of the channels between them. In FP scheduling, switching priorities of two actors may improve sizes of buffers between them. In EDF scheduling, adjusting deadlines (to implement the totally ordered communication strategy) may also reduce the buffering requirements.

Throughput: The throughput of an actor p i is the average number of firings of p i per unit of time and hence equals to its frequency 1 π i . If the graph of affine relations is connected, then the throughput of the graph is equal to 1 π i r(i) . The repetition vector r can be easily obtained from parameters n and d of affine relations. Since π i = α i T and U = σ T , maximizing the throughput is equivalent to maximizing the processor utilization factor and so to minimizing T .

If the graph of affine relations is disconnected (and so the dataflow graph is also disconnected), the throughput of each connected subgraph G j can always be expressed in terms of T j . However, it is not clear how to define the throughput of the whole graph. We hence choose, as in the connected case, to maximize the processor utilization factor.

If T = [T 1 , . . . , T L ] (a lightweight way to denote a vector), then we may consider any cost function F (T ). For most practical metrics, it is expected that the performance of the system improves when tasks' rates are increased. Therefore and as in [START_REF] Bini | Optimal task rate selection in fixed priority systems[END_REF], we my consider cost functions such that ∇F ≤ 0 (i.e. ∀j : ∂F ∂T j ≤ 0). For example, if

F (T ) = U = L j=1 σ j T j , then ∂F ∂T j = -σ j T 2 j ≤ 0.
Another example is the first order approximation of the energy spent in a bubble control application which is given as

p i ∈P a i e - b i π i [164].

Fixed-priority scheduling

In this section, we present the symbolic FP schedulability analysis for uniprocessor and multiprocessor systems. In each case, we describe the solution with respect to buffer minimization or processor utilization maximization.

Priority assignment

We will describe here how to compute the priority of each actor (without computing the timing parameters) w.r.t. buffer minimization, processor utilization maximization, or a combination of the two metrics. Priorities are used in affine scheduling and they will be used later to perform a symbolic response time analysis.

A Buffer minimization

Let E i,k ⊆ E be the set of all channels between p i and p k (in both directions); and let b i,k be the total sum of approximate capacities of channels in E i,k assuming that p i has a higher priority than p k (i.e. w i < w k ). Table 2.1 (p. 76) shows how to compute the approximate size of a channel (column

ν i = ν k ). So, b i,k = e∈E i,k
̥(e)δ(e) such that w i < w k . For each connected subgraph G j = (P j , E j ) in the graph of affine relations, we construct a weighted complete directed graph G ′ j = (P j , E ′ j ) such that the weight of edge e i,k = (p i , p k ) ∈ E ′ j is equal to b i,k . Hence, the problem of finding the priority assignment that reduces the buffering requirements is equivalent to the linear ordering problem (LOP) [START_REF] Martí | The linear ordering problem. Exact and heuristic methods in combinatorial optimization[END_REF] which consists in finding an acyclic tournament in the graph G ′ j such that the sum of weights of edges in the tournament is minimal. A tournament is a subset of edges containing for every pair of nodes p i and p k either edge (p i , p k ) or (p k , p i ) but not both. For N actors, there are N ! different priority assignments (i.e. permutations). The LOP is NP-hard; however many exact and heuristic solutions had been proposed in the past decades [START_REF] Martí | The linear ordering problem. Exact and heuristic methods in combinatorial optimization[END_REF].

The LOP can be formulated as a 0/1 integer linear program. A 0/1 variable x i,k states whether edge (p i , p k ) is present in the tournament or not.

min i,k b i,k x i,k ∀i < k : x i,k + x k,i = 1 ∀i < j, i < k, j = k : x i,j + x j,k + x k,i ≤ 2 ∀i, k : x i,k ∈ {0, 1}
Once the LOP is solved for every connected subgraph, actors within each subgraph can be ordered according to the computed priorities. It does not matter how to order two actors in different subgraphs because this will not influence the buffering requirements. -→ p 1 . The graph of affine relations is connected and the constructed weighted graph for LOP assignment is depicted in Figure 3.1. So, the best priority ordering is p 2 p 1 p 3 ; while the worst priority ordering is p 3 p 1 p 2 (which is the RM priority assignment).

B Utilization maximization

If deadlines are free parameters, then using implicit deadlines obviously results in the best utilization. Let us consider the case where deadlines are implicit or user-imposed. In both cases, we have that ∀p i ∈ P j :

d i = β i T j -β ′ i .
As mentioned in Chapter 1, the DM priority assignment is optimal (for synchronous task sets). Therefore, it results in the largest processor utilization. In case of equal deadlines, we break the tie using the actors' ID. So, the (initial) schedulability region (or the T -space) can be partitioned into a set of priority regions as illustrated by the following example. Definition 3.1 (Monotonicity of schedulability). FP schedulability is monotone over the T -space if and only if given any two points T 1 and T 2 in the T -space such that T 1 ≤ T 2 and the task set is FP schedulable at T 1 , then the task set is also FP schedulable at T 2 . Property 3.1. Fixed-priority schedulability with predefined priorities is monotone over the T -space.

Proof: We mean by "predefined" priorities the precomputed priorities that do not depend on the values of T j (e.g. the priorities computed for buffer minimization using LOP assignment). To prove Property 3.1, we use the response time analysis. We have that

R i = C i + w i <w k R i π k C k .
When periods are increased, priorities do not change; hence, the solution of the recurrence (i.e. the worst-case response time) decreases. Furthermore, the deadline d i gets larger since d i = β i T jβ ′ i . So, if R i was initially less than or equal to d i , then this remains true when periods are increased. Proof: Let T 1 and T 2 be two points in the T -space such that T 1 ≤ T 2 and the task set is DM schedulable at point T 1 . We denote by π i and d i the vectors of periods and deadlines at point T i , respectively. We have that π 1 ≤ π 2 and d 1 ≤ d 2 . There are two cases:

1. If T 1 and T 2 are in the same priority region, then the task set is also DM schedulable at point T 2 according to Property 3.1.

2.

If T 1 and T 2 are in different priority regions, then we break the transformation from the first to the second point into successive swaps as illustrated by the following example.

Let π 1 = (12, 30, 25, 24), d 1 = (5, 20, 21, 24), π 2 = [START_REF] Bini | Schedulability analysis of periodic fixed priority systems[END_REF][START_REF] Bhattacharyya | Looped schedules for dataflow descriptions of multirate signal processing algorithms[END_REF][START_REF] Bertogna | Tests for global EDF schedulability analysis[END_REF][START_REF] Bertogna | Tests for global EDF schedulability analysis[END_REF], and d 2 = [START_REF] Bertogna | New schedulability tests for real-time task sets scheduled by deadline monotonic on multiprocessors[END_REF][START_REF] Bertogna | Response-time analysis for globally scheduled symmetric multiprocessor platforms[END_REF][START_REF] Benveniste | The synchronous languages 12 years later[END_REF][START_REF] Bertogna | Tests for global EDF schedulability analysis[END_REF]. So, we have that d 1 ≤ d 2 and π 1 ≤ π 2 . But, T 1 and T 2 are in different priority regions since the DM priority ordering at T 1 is p 1 p 2 p 3 p 4 while the DM priority ordering at point T 2 is p 3 p 4 p 2 p 1 . To get from the first permutation (or ordering) to the second one, we need five swaps (see Figure 3.3).

Since the task set is DM schedulable at the first point, we have only to prove that it remains DM schedulable after each swap. So, at each step, we switch only priorities of p i and p i+1 (assuming that actors are ordered by their priorities). According to the worst-response time computation, we have that • ∀k > i + 1 : R k remains intact (Actually, R k decreases if periods π j s.t. j < k are increased). Hence, ∀k > i + 1 : p k meets its deadline.

• ∀k < i or k = i + 1: R k decreases or remains intact (note that p i is excluded from the sum in the response time formula). • For p i , we have that

R i = C i + R i π i+1 C i+1 + k<i R i π k C k . Let R ′ i+1 and d ′ i+1
be the response time and deadline, respectively, of actor p i+1 before the swap.

So, we have that

R ′ i+1 = C i+1 + R ′ i+1 π i C i + k<i R ′ i+1 π k C k . If we can prove that R i ≤ R ′ i+1 , then we will have that R i ≤ d i because d i ≥ d ′ i+1 ≥ R ′ i+1 . Since R ′
i+1 is the fixed point of the response time formula, we have that

R ′ i+1 = C i+1 + a i C i + k<i a k C k such that ∀k ≤ i : a k = R ′ i+1 π k ∈ N >0 . Let us solve the recurrence for R i starting from R 0 i = R ′ i+1 . So, R 1 i = C i + R ′ i+1 π i+1 C i+1 + k<i a k C k .
But, R ′ i+1 ≤ π i+1 because the system is DM schedulable before the swap. Thus,

R 1 i = C i + C i+1 + k<i a k C k ≤ R ′ i+1 . We have two cases, either R 1 i = R ′ i+1 (the recurrence stops) or R 1 i < R ′ i+1 .
In the second case, we will continue until reaching a fixed point which will be less than R ′ i+1 . One direct result of Proposition 3.1 is that if a task is not DM schedulable at point T 2 , then it is not DM schedulable at point T 1 .

C Buffering vs processor utilization

As in static-periodic scheduling of (C)SDF graphs [START_REF] Stuijk | Exploring trade-offs in buffer requirements and throughput constraints for synchronous dataflow graphs[END_REF], buffer minimization and throughput maximization are in conflict with each other. Indeed, we have shown in Example 3.1 that the worst buffering requirements are obtained by the DM priority ordering. This observation can be simply explained as follows. Let p i and p k be two (n, ϕ, d)affine-related actors with implicit deadlines and all channels between them are directed from p i to p k . We have that π k = d n π i . If d > n, then p i will have a higher DM priority than p k . But according to Table 2.1 (p. 76), p k must have a higher priority than p i in order to achieve better buffer sizes.

Let O 1 and O 2 be two priority orderings (i.e. permutations). The swapping distance between O 1 and O 2 is the minimum number of transpositions of two adjacent elements necessary to transform permutation O 1 into permutation O 2 . Each step in the swapping path positively or negatively affects the buffering requirements and the throughput. The impact on buffer sizes can be approximately measured by equations in Table 2.1. T . We take deadlines as

d = [π 1 -30, π 2 2 , 3 4 π 3 -10, π 4 2 , π 5 -60].
So, the initial T -space is defined by B = 6 and T ≥ 452.5. Figure 3.4 represents the trade-off between processor utilization and approximate buffering requirements for all the possible (5!) priority orderings. As one could notice, many priority orderings can result in the same buffering requirements but in different processor utilizations. If we consider only Pareto points, then the buffering requirements and the throughput are proportional to each other. Figure 3.4: Exploration of the priority orderings space: throughput vs buffering requirements.

It will be useful if one can compute the (approximate) cost of a swap on the processor utilization without performing a symbolic schedulability analysis. Let O * , π * , U * be the DM priority ordering, the period vector, and the processor utilization, respectively, obtained by the symbolic schedulability analysis. Hence, any priority ordering should result in a processor utilization no greater than U * . Figure 3.5 shows for every priority ordering O the precedence distance between O and O * and the corresponding decrease in processor utilization. The precedence distance between two permutations O and O * is defined as follows. Let sim(O, O * ) be equal to the number of times an actor p i is preceded by an actor p k in both O and O * . The precedence distance is hence equal to

N (N -1) 2 -sim(O, O * )
If xi,k is the 0/1 variable that states whether actor p i has a higher priority in O * than p k or not, then the precedence distance is equal to N (N -1)

2 - i,k
x i,k xi,k . In the ILP formulation, we could add a constraint that states that the precedence distance is less than some threshold. From Figure 3.5, the decrease in the processor utilization is roughly proportional to the precedence distance. However, the precedence metric is not accurate and it is possible to define a better one. Figure 3.6 presents a new more accurate distance metric called the utilization distance.

Utilization distance: We compute a new period vector π for which the task set is schedulable w.r.t. priority ordering O. Vector π must be computed without performing a complex schedulability analysis. If U is the processor utilization that corresponds to period vector π, then the utilization distance is equal to

0 ≤ dis(O, O * ) = 1 - U U * ≤ 1
Vector π is computed as follows. We compute the response times w.r.t. periods π * and priority ordering O. Then, we take T j = max{T * j , max

p i ∈P j { R i +β ′ i B j β i B j }}.
Clearly, the task set is FP schedulable w.r.t. the new computed periods. Heuristic: Many heuristics have beed developed to solve the linear order problem [START_REF] Martí | The linear ordering problem. Exact and heuristic methods in combinatorial optimization[END_REF].

We choose a simple local enumeration method. For a given ordering and a given window of length W , the heuristic (Algorithm 3) arranges the elements in the window to get the best buffering requirements and an utilization distance no greater than a threshold u. We denote by b(O) the sum of approximate buffer sizes w.r.t. priority ordering O. The best ordering among a set of orderings is the one with the smallest buffering requirements. In case of tie, we choose the one with the smallest utilization distance.

Uniprocessor scheduling

We firstly consider the simple case where the graph of affine relations is connected and there is only one priority region (e.g. when deadlines are implicit, the LOP assignment, etc). The maximum throughput corresponds to the minimum value of T . For RM scheduling, we can use the utilization-based tests but they are too pessimistic. Therefore, we will use a symbolic RTA. In the first place, we reduce the space of feasible values of T by using upper and lower bounds on worst-case response times. As shown in Chapter 1,

R u i = C i + w k <w i C k (1 -U k ) 1 - w k <w i U k
Following a similar reasoning to that in [START_REF] Bini | A response-time bound in fixed-priority scheduling with arbitrary deadlines[END_REF], we can prove that if the system is schedulable, then

R l i = C i - w k <w i C k (1 -U k ) 1 - w k <w i U k (3.8)
If ∃p i ∈ P : R l i > d i , then the task system is unschedulable. We have that

R l i > d i ⇔ β i T 2 -(C i + β ′ i + w k <w i C k ( β i α k -1))T - w k <w i C k α k (C k -β ′ i ) < 0
The second degree inequality can be easily solved to find an interval in which the system is unschedulable. Dually, if ∀p i ∈ P : R u i ≤ d i , then the task set is schedulable. We have that

R u i ≤ d i ⇔ β i T 2 -(C i + β ′ i + w k <w i C k (1 + β i α k ))T + w k <w i C k α k (C k + β ′ i ) ≥ 0
So, we have intervals in which the system is schedulable and intervals in which the system is unschedulable. To find the best T , it is sufficient to perform a dichotomic search in the remaining space knowing that if R i ≤ d i for some T , then R i ≤ d i for all T ′ > T . We denote this procedure by SRTA.

Example 3.4. Let us take the task set in Example 3.3 and the priority assignment p 1 p 2 p 3 p 4 p 5 . The solutions of the previous inequalities are presented in Table 3.1. So, the system is schedulable for T ∈ [1422, ∞[ and unschedulable for T ∈ [0, 456[. To find the best T , we perform RTA for values in [456, 1416] using a dichotomic search. Each time, we compute the response times in the order p 5 p 4 p 3 p 2 p 1 ; i.e. the task that gives the worst value of T s.t. R u i ≤ d i is considered first. We will find the best value of T after computing only six response times. Clearly, the symbolic RTA is faster for large values of B.

l i > d i R u i ≤ d i p 1 ∅ [456, ∞[ p 2 ∅ [456, ∞[ p 3 ∅ [558, ∞[ p 4 ∅ [630, ∞[ p 5 ∅ [1422, ∞[
The second case is DM scheduling of connected graphs. Each DM priority region corresponds to an interval. There are at most 1+ N (N -1) 2 DM priority regions since each equation d i < d k can create only one new region. We use RTA to find the first interval [t l , t u ] such that the task set is schedulable for T = t u . According to Proposition 3.1, the task set is schedulable for every T > t u and unschedulable for every T < t l . To find the best T , we only have to apply the SRTA procedure in interval [t l , t u ].

The third case is when the graph of affine relations is disconnected and there is only one priority region. Since priorities are fixed a priori and the cost function U (T ) is convex, we can apply the branch-and-bound method described in [START_REF] Bini | Optimal task rate selection in fixed priority systems[END_REF] in case deadlines are equal to periods. We present here a different depth-first brand-and-bound (DF-B&B) solution based on symbolic RTA. However, the presented algorithm does not seek for a global optimum solution but for the optimum solution in the sub-space dominated by a first admissible solution T fst (i.e. for all T in the sub-space, T ≤ T fst ). To get the global optimum, we have to take T fst = T u . Algorithm 4 represents the pseudo-code of the search algorithm. In order to explain the algorithm more clearly, we solve the problem in Example 3.2 w.r.t. priority ordering p 4 p 2 p 3 p 1 p 5 . Since there are two weakly connected components, each point in the T -space has two components; i.e. T = [T 1 , T 2 ]. The start point of the algorithm is a first admissible solution T fst (or simply T u , assuming that the task is schedulable at point T u ).

We may compute T fst using a linear relaxation of RTA as follows. Firstly, each deadline

d i = β i T j -β ′ i is under-approximated as d ′ i = ρ i T j . So, we could simply take ρ i = β i - β ′ i T l j
. Clearly, if the system is schedulable with the new deadlines, then it is schedulable with the original ones. Furthermore, the system is schedulable if

∀p i : R u i = C i + w k <w i C k 1- w k <w i U k ≤ d ′ i .
We solve this problem in R >0 as a linear program by putting x j = 1 T j while the objective function is to maximize the processor utilization. If X = [x 1 , x 2 , . . .] is a solution of the linear program, then we take T fst j = 1

x j B j B j . Linear programming has a lower time complexity than convex optimization used in [START_REF] Bini | Optimal task rate selection in fixed priority systems[END_REF]. Regarding the previous example, we have that d ′ = [

300 x 2 ≤ 1 (R u 4 ≤ d ′ 4 ) 130 x 1 + 60 x 2 ≤ 1 (R u 2 ≤ d ′ 2 ) 10115 x 1 + 1140 x 2 ≤ 19 (R u 3 ≤ d ′ 3 ) 3095 x 1 + 360 x 2 ≤ 6 (R u 1 ≤ d ′ 1 ) 2667.5 x 1 + 32400 x 2 ≤ 11 (R u 5 ≤ d ′ 5 ) 0 ≤ x 1 ≤ 1 210 ; 0 ≤ x 2 ≤ 1 460
The solution of this program is T f st = [540, 5360] and U fst = 0.501. So, the T -space consists of 13776 points to be checked. From this first admissible solution, the tree structure built by the invocation of visitTree is shown in Figure 3.7. At the first level, procedure PossibleValuesOf(T 1 ) returns all possible values of T 1 (denoted by 1 ) in [T l 1 , T fst 1 ] such that the system could be schedulable at each point T = [t ∈ 1 , T 2 , . . .]; i.e. the values of the other components in vector T are constant. Values of i are obtained by using test ∀p i : R l i =

C i - w k <w i C k (1-U k ) 1- w k <w i U k
≤ d i since the system is unschedulable if ∃p i : R l i > d i . For the previous example, we have that 1 = [258, 540]. The nodes at this level are processed in the decreasing order of T 1 . If the system is unschedulable at a given node, then the subtree whose root is that node will be pruned since, according to Property 3.1, reducing values of the other components (i.e. nodes in the subtree) will not make the system schedulable. For the same raison, we have also to prune all the nodes for the remaining values of T 1 in i . In the example, the system is unschedulable for T 1 = 468 and so for all T 1 ∈ [258, 468].

At level L, there is only one free variable, we can hence use SRTA instead of the enumeration to compute the best value of the last component T L . The fourth and last case is DM scheduling of disconnected graphs. We use the previous branch and bound technique but we have also to consider the DM priority regions. The first admissible solution can be obtained as in the previous case by considering any priority ordering. Hence, T fst = [474, 2000] (the best solution for priority assignment p 4 p 2 p 3 p 1 p 5 ) is an admissible solution for the DM scheduling. Starting from this point, the space 210 ≤ T 1 ≤ 474∧460 ≤ T 2 ≤ 2000∧U ≤ 1 contains 9 DM priority regions (see Figure 3.2). The DF-B&B algorithm can simply be applied on each region. However, this algorithm can be further improved; for instance, by considering Proposition 3.1. For example, Let T be the current node in the current DM priority region, and let T ′ be a node in an already processed region. If T ′ ≥ T and the system is unschedulable in T ′ , then the current node can be immediately pruned.

Multiprocessor scheduling

Let us first address the symbolic partitioned scheduling problem. We consider only connected dataflow graphs. Partitioned scheduling is known to be NP-hard; we use therefore a best fit heuristic that consists in two steps:

1. Order actors by their decreasing priorities. We will consider only systems with a unique priority region (e.g. computed by the LOP priority assignment).

2. Assign each actor (in the previous order) to a processor according to the best fit strategy.

Let (V i ) i=1,M be the initially empty M partitions (i.e. each partition corresponds to a processor). We allocate task p k , assuming that higher priority tasks are already allocated, as follows. Let T i be the optimal value (a point in the T -space) returned by the symbolic response time analysis such that all partitions (V j ) j =i and V i ∪ {p k } are schedulable each one on a single processor. T i can be found by applying SRTA only on partition V i ∪ {p k } (since partitions (V j ) j =i remain schedulable). We assign task p k to partition V i that results in the maximum processor utilization U (T i ). In case of equality, we break the tie by favoring the partition with the minimum utilization

U i = p j ∈V i ∪{p k } C j
π j and hence seek for balanced partitions. For N periodic tasks, we will apply the symbolic response time analysis N ×M times. However, adding task p k to a partition V i does not change the worst-case response times of the already allocated tasks on V i . Hence, if T ′ is the minimum value for which V i is schedulable (which is computed in the previous steps), then T = max{T ′ , min{T | R k ≤ d k }} is the minimum value for which {p k } ∪ V i is schedulable. If we would like to speed up more the allocation procedure, we may take T = max{T ′ , min{T | R u k ≤ d k }} as an approximate schedulability test.

Example 3.5. Let us consider the task set in Example 3.3 with priority assignment p 1 p 2 p 5 p 4 p 3 and M = 2. Initially, we have that V 1 = ∅ and V 2 = ∅. Task p 1 is assigned directly to partition V 1 and task p 2 to partition V 2 ; so,

V 1 = {p 1 }, V 2 = {p 2 }.
At this stage, we have T = 96 and U (T ) = 65 96 + 70 192 = 1.041. When allocating task p 5 , we have two cases, either to assign the task to partition V 1 or to partition V 2 .

In the first case, p 1 is already schedulable (for T ≥ 96). We have that T ≥ 96 and R 5 = 55 + R 5 T 65 ≤ d 5 implies that T ≥ 540. In the second case, we have that T ≥ 96 and R 5 = 55 + R 5 2T 70 ≤ d 5 implies that T ≥ 555. So, the best case is to allocate p 5 to partition V 1 (so, T = 540 and U = 0.78).

This best-fit allocation strategy aims at maximizing the processor utilization. As shown in the overflow and underflow analyses, the task allocation strategy affects the buffer sizes computation. Hence, an allocation strategy that reduces the buffering requirements can be more suitable for systems with strong memory constraints. For instance, a task p k could be assigned to a partition so that the total sum of sizes of channels that connect p k to the already assigned tasks is minimized.

For global FP scheduling, we use the schedulability test proposed in [START_REF] Bertogna | Response-time analysis for globally scheduled symmetric multiprocessor platforms[END_REF] (Section 1.4.3) assuming that there is a unique priority region. Again, we will consider only connected dataflow graphs. The algorithm consists in arranging tasks by the decreasing order of priorities. Then, for each task p k and starting from the solution found in the previous step, we compute the best solution that satisfies R k ≤ d k . So, we do not have to check the schedulability of the already processed tasks (thanks to Lemma 3.1). Lemma 3.1. If T ′ ≥ T , then the value of R k at T ′ is smaller than its value at T .

Proof: Since R k = C k + 1 M w i <w k I i (R k )
, it is sufficient to prove that ∀L : I i (L) is smaller at T ′ than at T . Recall that I i (L) is an upper bound on the interference of task p i on task p k in an interval of length L. This interference is higher for small periods and deadlines of p i . Hence, I i (L) at point T ′ is smaller than I i (L) at point T .

Example 3.6. We again consider the task set in Example 3.3 with priority assignment p 1 p 2 p 5 p 4 p 3 and M = 2. For actor p 1 , we have R 1 = 65. Hence, T = 96. For actor p 2 , we have that T ≥ 96 and

T ≥ R 2 = 70 + 1 2 min{R 2 -69, W 1 } such that W 1 = N 1 65 + min{65, R 2 -T -95 -N 1 T } and N 1 = R 2 +T -95

T

. Hence, T = 96, etc.

EDF scheduling

In this section, we present the symbolic EDF schedulability analysis of dataflow graphs for uniprocessor and multiprocessor systems. We also describe the lock-free implementation of the totally ordered communication strategy.

Deadlines adjustment

In FP scheduling, adjusting priorities of actors can be used to reduce the buffering requirements. Similarly, adjusting priorities of jobs in EDF scheduling could improve the buffering requirements, as shown in the previous chapter. Let d i [j], R i [j] = r i +(j -1)π i , and D i [j] = R i [j] + d i [j] be the relative deadline, the release time, and the absolute deadline of job p i [j], respectively. One way to ensure that job p i [j] has a higher priority than job p k [j ′ ] (i.e. ω i [j] < ω k [j ′ ]) without using lock-based synchronizations is to make sure that

D i [j] < D k [j ′ ] if R i [j] = R k [j ′ ] and ID(p i ) > ID(p k ); and D i [j] ≤ D k [j ′ ] otherwise.

Totally ordered communication

The totally ordered communication strategy was used in abstract EDF schedules contruction to eliminate preemptions and hence obtain more accurate buffer sizes. The precedences imposed by this strategy can be encoded as deadlines adjustments. Let S i be the set of neighbors of p i in the dataflow graph; i.e. ∀p k ∈ S i : p k communicates with p i and therefore p k and p i are affine-related. Let p k [safr i,k (j)] be the earliest job of p k that must be preceded by job p i [j]; i.e. p k [safr i,k (j)] can only start when p i [j] completes its execution. So, cbef k,i (safr i,k (j)) ≥ j. Figure 3.8 gives an intuition on how to compute safr i,k (j). There are mainly five cases, illustrated in Figure 3.9 where j ′ = safr i,k (j). The totally ordered communication is just an example of communication strategies; one can imagine more possible strategies.

D i [j] = min p k ∈S i {R i [j] + d * i , D k [safr i,k (j)] -ζ i,k (j)} (3.9)
If we consider relative deadlines, then Equation 3.9 can be written as

d i [j] = D i [j] -R i [j] = min p k ∈S i {d * i , d k [safr i,k (j)] -ζ i,k (j) + R k [safr i,k (j)] -R i [j]} 1.
For each actor p i , we compute a minimum deadline d i = min

j d i [j]
. These deadlines are used just in the symbolic schedulability analysis since if the system is schedulable with the minimum deadlines, then it is schedulable with the original deadlines. This is true for sustainable schedulability tests (see [START_REF] Burns | Sustainability in real-time scheduling[END_REF]) such as the processor demand analysis used in the sequel. However, the original deadlines must be used in the implementation since the minimum deadlines do not guarantee the totally ordered communication strategy. In the previous example, we may take d 3 = T -11 when T ∈]15, 33].

2. A unique deadline is computed for each task p i as d i = min

j d i [j].
Hence,

d i = min j d i [j] = min j min p k ∈S i {d * i , d k [safr i,k (j)] -ζ i,k (j) + R k [safr i,k (j)] -R i [j]} = min p k ∈S i {d * i , min j {d k [safr i,k (j)] -ζ i,k (j) + R k [safr i,k (j)] -R i [j]}} ≥ min p k ∈S i {d * i , d k + min j {-ζ i,k (j) + R k [safr i,k (j)] -R i [j]}} (because min j d k [safr i,k (j)] ≥ min j d k [j] = d k )
So, we only need to compute a lower bound on min Similarly, from the affine relation, it is possible to compute min

j {R k [safr i,k (j)] -R i [j]}. Let us put ∆ i,k = min j {-ζ i,k (j) + R k [safr i,k (j)] -R i [j]}.
Therefore, we have that

d i = min p k ∈S i {d * i , d k + ∆ i,k } (3.10) If we put X = [d 1 , d 2 , . . . , d N ]
, then approximate deadlines computation can be written as X = F (X). So, we need to compute the greatest fixed point of the function F . Since F is a monotone function, the fixed point, if any, can be found by computing the sequence X 0 , X 1 = F (X 0 ), X 2 = F (X 1 ), . . . until stabilization such that X 0 is the vector where ∀p i ∈ P : This property means that for two points T and T ′ in the T -space such that T ≤ T ′ , the deadline of any job at point T ′ is greater than or equal to its deadline at point T .

d i = d * i .

Impact on throughput

Let T * be the point that gives the best processor utilization in the initial T -space (i.e. using the necessary schedulability test U ≤ M ). Any increase on the lower bound of T j , due to deadlines adjustment, potentially decreases the processor utilization if T l j > T * j . The lower bound could be increased after adjusting the deadlines in order to meet the constraint C i ≤ d i [j]. One simple solution is to not consider in the deadlines adjustment any precedence that may increase the lower bounds of components T j .

Uniprocessor scheduling

We firstly consider the case where the graph of affine relations is connected. Thus, ∀p i ∈ P : π i = α i T . If the deadlines are equal to periods, we use the schedulability test U ≤ 1 since it is an exact EDF schedulability test. The solution is therefore equal to T = T l B B (computation of T l has already considered the constraint U ≤ 1). If the deadlines are constrained, then we use the QPA schedulability test (Section 1.4.2). The basic symbolic schedulability test consists in using QPA at each point T k = T l B B +kB in the interval [T l , T u ] in the increasing order till reaching the first feasible solution. This time consuming approach can be improved knowing that "when we increase T , deadlines and period are stretched while execution times remain constants".

Our symbolic schedulability analysis of dataflow graphs consists in incorporating the search of the minimum T that ensures EDF schedulability into the QPA algorithm. Algorithm 5 represents the symbolic QPA algorithm. Let L(T ), U (T ), and h T (t) denote respectively the values L, U, and h(t) for a given T . Recall that L is the feasibility bound and h is the processor demand function.

Starting from the minimum value of T (i.e. T 0 ), SQPA performs the QPA analysis in the interval [0, L(T 0 )]. This first iteration leads either to h T 0 (t) ≤ min{d} or to a deadline miss, i.e. h T 0 (t) > t (Figure 3.11). In the first case, the task system is schedulable and the algorithm returns T 0 .

In the second case, assume that the deadline miss occurs at d * (i.e. h T 0 (d * ) > d * ). In this case, T must be increased to T 1 (instruction k++;). According to Lemma 3.2, L(T 1 ) ≤ L(T 0 ). Hence, the verification can restart from L(T 1 ) instead of L(T 0 ). But, according to Lemma 1.1 (p. 41), we have that ∀t ∈ [h T 0 (d * ), L(T 0 )] : h T 0 (t) ≤ t. Since Lemma 3.3 implies that ∀t ∈ [h T 0 (d * ), L(T 0 )] : h T 1 (t) ≤ h T 0 (t) ≤ t, the verification process for T 1 can restart from min{L(T 1 ), h T 0 (d * )}. This process is repeated until the termination condition is reached or T exceeds the upper bound T u . Proof: We have that L is equal to synchronous busy period which can computed with

L m+1 = p i ∈P L m π i C i where L 0 = p i ∈P C i . Clearly, ∀m : L m (T ′ ) ≤ L m (T ). Hence, L(T ′ ) ≤ L(T ). Lemma 3.3. If T ≤ T ′ , then ∀t : h T (t) ≥ h T ′ (t).
Proof: We have that h T (t) =

p i ∈P h T i (t) such that h T i (t) = D i [j]≤t C i .
According to Property 3.2, a given absolute deadline occurs earlier for T than for T ′ . Therefore, ∀l, h T i (t) ≥ h T ′ i (t). SQPA algorithm has a pseudo-polynomial complexity since it checks in the worstcase scenario all the deadlines in interval [0, L(T 0 )] as a standard processor-demand analysis may do. be the optimum solution. As in DF-B&B SRTA, it is possible to limit the search space to the sub-space dominated by a first admissible solution.

Multiprocessor scheduling

Let us first address the symbolic partitioned EDF scheduling problem. As in FP scheduling, we consider a best fit allocation strategy. Actors are ordered according to some criterion (e.g. non-decreasing order of deadlines in case there is a unique DM priority region). Then, actor p k is assigned to the best partition. Let T i be the value of T returned by uniprocessor schedulability analysis and which is the best vector for which all partitions (V j ) j =i and V i ∪ {p k } are EDF-schedulable each one on a single processor. We assign task p k to the partition that gives the highest processor utilization U (T i ). In case of equality, we break the tie by favoring the partition with the minimum utilization

U i = p j ∈V i ∪{p k } C j
π j and hence seek for balanced partitions. This best fit allocation strategy aims at maximizing the processor utilization. As shown in the previous chapter, the processor allocation influences the buffer sizes computation. Furthermore, adjusting deadlines to enforce precedences between jobs of two actors does not work if the two actors are allocated to different processors. The approximate gains that come from assigning two actors to the same processor and from totally ordered communication strategy can be deduced using overflow and underflow equations.

An allocation strategy, for connected graphs, that firstly aims at minimizing the buffering requirements (by adjusting implicit deadlines) and secondly balances the processor utilization of partitions consists of the following steps.

1. Parameters n and d of every affine relation are computed using the boundedness criterion. So, we have that ∀p i ∈ P : π i = α i T .

2. Let G = (V, E) be an undirected graph where nodes represent actors and edges represent affine relations. Each node v i is associated with a weight that represents the utilization of actor p i ; i.e. w(v i ) = C i α i . The weight of edge e i,k = (v i , v k ), denoted by w(e i,k ), is equal to zero if enforcing precedences between p i and p k may jeopardize the processor utilization factor, and equal to the approximate gain that comes from adjusting the deadlines otherwise.

3.

The graph G should be partitioned into M balanced partitions

(V i ) i=1,M ; that is, ∀i, j : |w(V i ) -w(V j )| is minimal such that w(V i ) = v∈V i w(v)
. Furthermore, the partitioning must minimize the total weight of edges connecting different partitions. The reason behind this requirement is that adjusting deadlines will not ensure precedences between actors allocated to different processors. This M -partitioning problem is well known in graph theory; for instance, we use the SCOTCH tool [START_REF] Chevalier | PT-Scotch: a tool for efficient parallel graph ordering[END_REF] to solve the problem.

4.

Once each actor is assigned to a processor, overflow and underflow analyses can be performed to compute parameter ϕ of each affine relation.

5.

Computation of symbolic deadlines of tasks in each partition.

6.

The SQPA algorithm is then applied on each partition V i . The algorithm will return the minimum value T i that ensures EDF schedulability of the set V i on a single processor. We need just to take T = max i=1,M T i .

For global EDF scheduling of connected graphs, we will use the QPA-FFDBF schedulability test. But first, we propose an improvement of the schedulability test using the following lemma.

Lemma 3.4. If γ 1 < γ 2 and ffdbf(t, γ 1 ) ≥ ( M -(M -1)γ 1 (M -1)γ 2 ) p i ∈P C i , then h(t, γ 1 ) ≤ h(t, γ 2 ).
Proof: Figure 3.13 depicts the forced-forward demand bound function for two values γ 1 and γ 2 such that γ 1 < γ 2 . As shown in that figure, we have clearly that ∀t : 0

≤ ∆ i (t) = ffdbf i (t, γ 1 ) -ffdbf i (t, γ 2 ) ≤ ∆ i . Using basic geometry, we have that ∆ i = C i (1 -γ 1 γ 2 ). So, h i (t, γ 2 ) -h i (t, γ 1 ) = ffdbf i (t, γ 1 ) -∆ i (t) M -(M -1)γ 2 - ffdbf i (t, γ 1 ) M -(M -1)γ 1 Hence, h(t, γ 2 ) -h(t, γ 1 ) = x (M -(M -1)γ 2 )(M -(M -1)γ 1 ) s.t. x = (M -1)(γ 2 -γ 1 ) ffdbf(t, γ 1 ) -(M -(M -1)γ 1 ) p i ∈P ∆ i (t). Therefore, if x ≥ 0; i.e. ffdbf(t, γ 1 ) ≥ M -(M -1)γ 1 (M -1)(γ 2 -γ 1 ) p i ∈P ∆ i (t)
then h(t, γ 1 ) ≤ h(t, γ 2 ). But, ∀t :

p i ∈P ∆ i (t) ≤ p i ∈P ∆ i .
, if h(t, γ 1 ) > t and ffdbf(t, γ 1 ) ≥ F * = ( M -(M -1)γ 1 (M -1)γ 1 ) p i ∈P
C i , then it does not matter if we increase γ 1 to γ 2 since h(t, γ 2 ) will be also greater than t. Note that we used γ 1 in the dominator of F * instead of γ 2 .

Algorithm 7 represents the symbolic QPA-FFDBF algorithm for global EDF scheduling of connected graphs. Let γ min (T ), and γ max (T ) denote respectively γ min = µ * , and γ max = M -U M -1 for a given T . Let F * (γ) denote the value of F * for a given value of γ. If h(t, γ) > t, then we have to increase either γ or T according to Lemma 3.4 and Theorem 1.2 (p. 42). As for SQPA, we note the following results.

Lemma 3.5. If T ≤ T ′ , then ∀t : h T (t, γ) ≥ h T ′ (t, γ). Proof: We have that h T (t, γ) = p i ∈P ffdbf T i (t,γ)
M -(M -1)γ . It is quite easy to prove that ffdbf T ′ i (t, γ) ≤ ffdbf T i (t, γ). Indeed, periods and deadlines are larger at point T ′ than at point T . You can easily notice in Figure 3.13 that the value of the forced-forward demand bound function decreases when periods and deadlines are increased.

If d * is the first deadline for which h T (d * , γ) > d * , then we have that ∀t ∈ [h T (d * , γ), L(T )] : h T ′ (t, γ) ≤ h T (l, γ) ≤ t.
For given values T k+1 and γ, we take Prev

(γ) = h T k (d * , γ). Lemma 3.6. If T ≤ T ′ , then L(T ) ≥ L(T ′ ).
Proof: If there is a unique deadline region and ∀p i : [START_REF] Baruah | Implementation of speedup-optimal global EDF schedulability test[END_REF]) satisfies the property.

d i π i is monotone over the T -space, then L = p i ∈P (π i -d i )U i M -(M -1)γ-U satisfies the property; otherwise L = p i ∈P C i M -(M -1)γ-U (from
Thanks to these observations, for a given value γ, it is not necessary to recheck deadlines in the interval [L(T ′ ), Prev(γ)] when T is increased to T ′ .

It is worth mentioning that computation of T l must consider the constraint µ * < M -U M -1 . If the graph of affine relation is disconnected, then a branch and bound technique like the one proposed for SQPA can be used with SQPA-FFDBF.

Algorithm 7: SQPA-FFDBF algorithm k = 0; γ = γ min (T k ); t = L(T k ); while h(t, γ) > min{d} do if h(t, γ) ≤ t then t = min{h(t, γ), max{d|d < t}}; else if ffdbf(t, γ) ≥ F * (γ) ∨ γ + ǫ ≥ γ max (T k ) then k++; if T k > T u then return task set unschedulable; γ = γ min (T k ); else γ = γ + ǫ; t = min{L(T k ), Prev (

Conclusion

In this chapter, we have presented the necessary symbolic schedulability analyses of abstract schedules that aim at either minimizing the buffering requirements or maximizing the processor utilization. We have presented the symbolic schedulability analysis for uniprocessor and multiprocessor systems with respect to two real-time scheduling policies: fixed-priority scheduling and earliest-deadline first scheduling.

Chapter 4

Experimental validation In this chapter, we present the results obtained by the scheduling algorithms on a set of real-life stream processing applications and randomly generated dataflow graphs w.r.t. buffer minimization and throughput maximization. Furthermore, we compare the complexity of our symbolic schedulability analyses with that of basic enumerative solutions. We refer to the implementation of our scheduling algorithms as the ADFG tool. We will also briefly present a graphical editor for automatic synthesis of SCJ Level 1 applications from UCDF graph specifications.

Performance comparison: ADFG vs DARTS

In a first place, we compare our scheduling tool (the ADFG tool) with the DARTS tool (an implementation of the scheduling approach presented in [START_REF] Bamakhrama | Hard-real-time scheduling of data-dependent tasks in embedded streaming applications[END_REF]). In the best of our knowledge, DARTS is the only existing tool for real-time scheduling of (C)SDF graphs. However, it can handle only acyclic connected graphs. Therefore, we use the same acyclic benchmarks (see Table 4.1) presented in more details in [START_REF] Bamakhrama | Hard-real-time scheduling of data-dependent tasks in embedded streaming applications[END_REF]. They are SDF and CSDF graphs collected from many sources (the StreamIt benchmark [START_REF] Thies | An empirical characterization of stream programs and its implications for language and compiler design[END_REF], the SDF 3 tool [START_REF] Stuijk | SDF 3 : SDF for free[END_REF], is very small in case of matched I/O rates channels (and null in case of perfectly matched I/O channels) since

d n = v 1 |v 1 | |v 2 | v 2 .
Similar observation holds for deadlines adjustment. To better measure the impact of our techniques, we will use a set of randomly generated (cyclic) connected SDF graphs. The graphs are generated by the SDF 3 tool with the following setting. Production and consumption rates follow a normal distribution with a mean equal to 5 and a variance equal to 4. Worst-case execution times follow a normal distribution with a mean equal to 1000 and a variance equal to 300. The graphs are generated with different numbers of nodes (from 6 to 80) such that the average degree of each node is 2.

In most of the experiments, we will assume implicit deadlines unless it is stated otherwise or the deadlines adjustment technique is used. We will show the results obtained by some of the scheduling algorithms presented in the previous chapter. However, we will focus more on uniprocessor scheduling algorithms.

Throughput

We consider here some of the scheduling algorithms that aim at maximizing the processor utilization regardless of the achieved buffering requirements. Let us first address the uniprocessor scheduling case.

Figure 4.1 shows the obtained results by the ADFG and DARTS tools in case of EDF and FP priority scheduling of the real-life benchmarks. Implicit deadlines are used in order to achieve the highest throughput. Furthermore, the priority assignment policy for FP scheduling is taken as the RM priority assignment. Clearly, our scheduling tool gives (by far) the best processor utilization in case of RM scheduling. This is because our RM schedulability analysis is based on the accurate RTA; while the RM schedulability analysis in the DARTS tool is based on the pessimistic utilization-based test. 4.2 shows the processor utilization that can be achieved by the best fit partitioned RM algorithm (BF-RM) for different numbers of processors. In BF-RM, actors with high utilization are considered first in case of tie. It is worth mentioning that an optimal multiprocessor scheduling algorithm needs at least ⌈U max ⌉ processors to achieve the self-timed throughput (if it is possible). Clearly, BF-RM is not an optimal algorithm and needs more resources to achieve the maximum throughput. For instance, in case of the Serpent application, BF-RM requires 46 processors to achieve an utilization equal to 38.67.

Regarding partitioned EDF scheduling, we compare our best fit partitioned scheduling algorithm (BF-EDF) with the first fit partitioned scheduling algorithm of the DARTS tool. Figure 4.3 shows the number of processors needed by both algorithms to achieve the self-timed throughput. As one could notice, our algorithm largely outperforms the DARTS tool in all cases. This is due to the symbolic schedulability approach of the DARTS tool and its first fit allocation strategy. We note that the ADFG tool has obtained the optimum solution in many cases.

DARTS does not implement any global scheduling algorithm. Therefore, we will compare our global and partitioned scheduling algorithms with each other; for instance, BF-EDF with FFDBF-SQPA. Since FFDBF-SQPA is especially designed for constrained task sets, we assume that ∀p i : d i = 9 10 π i . In this case, BF-EDF will apply SQPA on each partition instead of the utilization-based test. Figure 4.4 shows the obtained results for some applications. In this figure, U M =N denotes the maximum utilization which is obtained when dedicating a processor to each actor. Though the forced-forward demand analysis can be considered as one of the best global EDF schedulability analyses [START_REF] Bertogna | Tests for global EDF schedulability analysis[END_REF], this experiment attests the superiority of partitioned EDF schedulability tests over global EDF schedulability tests.

Buffering requirements

We consider here the presented scheduling techniques that aim at minimizing the buffering requirements. But, we first compare our tool with the DARTS tool in order to have at least a hint about the accuracy of our linear approximations and machine-independent buffer sizes computation technique. Figure 4.5 represents the ratios of the obtained buffering requirements to the minimum buffering requirements (i.e. minBS). The ADFG tool computes the buffer sizes for uniprocessor EDF scheduling of the benchmarks assuming implicit deadlines. However, the DARTS tool computes buffer sizes under the following hypotheses: (1) An actor consumes its required data at the beginning of a firing and writes all its results at the end. (2) Unlimited number of resources; hence, an actor reads tokens simultaneously with each release. Therefore, the computed buffer sizes are not overflow-safe for uniprocessor scheduling since a consumer can be delayed because of limited resources.

Both tools manage to get the minimum buffering requirements for most of the applications with perfectly matched I/O rates channels (e.g. FFT and Beamformer). However, for applications with mis-matched I/O rates channels (e.g. Satellite, Pacemaker), our tool largely outperforms the DARTS tool. In average, our tool improves the buffering requirements by 11% compared to the DARTS tool.

Let us now measure the improvement on buffering requirements that can be achieved by the totally ordered communication strategy in uniprocessor EDF scheduling. As we mentioned before, this technique does not improve sizes of perfectly matched I/O rates channels. Thus, we conduct our experiment on the set of randomly generated SDF graphs. Figure 4.6 shows the improvement on the buffering requirements. We found that the totally ordered communication strategy improves the buffering requirements in average by 40% with a very low standard deviation (0.05). However, this improvement comes at the price of a throughput decline with an average equal to 20.95% (Figure 4.6). In 50% of the graphs, the deadlines adjustment improves the buffering requirements without affecting the throughput. These are graphs with highly mis-matched I/O channels. Indeed, when factor B is too large (compared to σ), adjusting deadlines does not influence the achievable throughput. Compromised solutions can be obtained by excluding some precedences in the deadlines adjustment step.

!"# $!"# %!"# &!"# '!"# (!"# )!"# (# $!# $(# %!# %(# &!# &(# '!# '(# (!# ( (
"# $!"# %!"# &!"# '!"# (!"# )!"# *!"# +!"# ,!"# $!!"# (# $!# $(# %!# %(# &!# &(# '!# '(# (!# ( (
Let us now address buffer minimization in fixed-priority scheduling. Figure 4.7 shows the impact of the LOP priority assignment on buffering and processor utilization compared to the DM priority assignment. The average improvement is equal to 37.99% with a low standard deviation (0.07). This is a good improvement that comes at the price of a throughput decline with an average equal to 48.31%. Thus, LOP priority assignment can be used for systems with strong memory constraints. We should also note that LOP assignment does not decrease the throughput of 31.57% of the graphs. Those graphs are graphs whose factor B is too large (compared to σ) so that changing the priorities does not affect the throughput.

In a second configuration, we investigate the constrained LOP priority assignment which consists in constraining the precedence distance between the computed assignment and the DM priority assignment to not exceed a given threshold. Figure 4.8 shows the impact of the constrained LOP priority assignment on buffering and processor utilization for a threshold equal to N (N -1)

!"# $!"# %!"# &!"# '!"# (!"# )!"# *!"# (# $!# $(# %!# %(# &!# &(# '!# '(# (!# ( (

10

. We obtained a slightly less buffering improvement (average equal to 34.99%) but for less throughput decrease (average equal to 21.83%). Furthermore, the constrained LOP assignment does not decrease the utilization in 44.73% of the cases.

In the third configuration, we would like to find a priority assignment that improves the buffering requirements without decreasing the processor utilization (compared to the DM utilization) by more than 15%. Therefore, we use the utilization distance instead of the precedence distance; and hence the heuristic presented in Algorithm 3 (p. 97). However, since the heuristic is based on a local enumeration, we do not expect to obtain a huge buffering improvement as the one obtained in the previous experiment (based on the ILP exact solution). We take W =7(for an exact solution, we must take W = N ) and a threshold u =0 .15. Figure 4.9 represents the obtained results. The average improvement in buffering requirements is equal to 8.60% (with a standard deviation of 0.1). This is a meaningful improvement that comes at no price (a negligible average throughput decline of 1.13%). Furthermore, it is worth noticing that for N>32, value W =7is not large enough to have a good enumeration.

!"# $"# %!"# %$"# &!"# &$"# '!"# '$"# (!"# ($"# $# %$# &$# '$# ($# $$# )$# *$# !"#$

Symbolic schedulability analysis

In this section, we will compare the complexity of our symbolic schedulability algorithms with that of basic enumerative solutions using a huge set of randomly generated task sets. This comparison will also demonstrate that our algorithms compute the same solutions as the basic enumerative algorithms. For a machine-independent comparison, we will compute in each time the number of checked absolute deadlines in EDF scheduling and the number of computed response times in FP scheduling. The task sets are For dataflow graphs with matched I/O rate channels, factor B is generally small, and the schedulability problem is hence more complicated. The SQPA algorithm outperforms the enumerative solution in all cases except cases with small N or very small D. When deadlines are too constrained, deadline misses could be detected earlier by a forward search than by a backward search. So, for dataflow graphs with few actors or highly constrained deadlines, it is better to use the enumerative solution than the SQPA algorithm. In order to emphasis the impact of constrained deadlines on the performance of SQPA, we have conducted the following experiment. We fix N = 60 and B =2, and use implicit deadlines for all tasks except for F tasks which will have constrained deadlines !" This experiment shows that the complexity of the symbolic schedulability problem is lower for small and large values of D. This means that the schedulability problem is simpler when task sets have implicit deadlines or highly constrained deadlines. Furthermore, the enumerative solution outperforms SQPA only for task sets with highly constrained deadlines. The value of D after which SQPA outperforms the enumerative approach depends on the number of tasks with constrained deadlines (i.e. value of F ).

d i = β i T such that β i ∈ [Dα i , ( D
#!!!" $!!!!" $#!!!" %!!!!" %#!!!" &!!!!" &#!!!" '!!!!" !" !($" ! (
The second algorithm to consider is the FFDBF-SQPA symbolic schedulability algorithm for connected graphs which will be compared with the following basic enumerative algorithm: Starting from k =0and for each value of γ ∈ [γ min (T k ),γ max (T k )[, test condition h(t, γ) ≤ t at each absolute deadline t ∈ [0,L(T k )]. If a deadline miss occurs, then increment either γ (if γ + ǫ<γ max (T k )) or k. Repeat the same process until reaching the first feasible task set. Figure 4.12 represents the obtained results for M =2 . They are quite similar to that of SQPA; i.e. the FFDBF-SQPA algorithm outperforms the enumerative approach for non-small values of N and D. We note that in case of FFDBF-SQPA, parameter D has more impact than factor B on the complexity of the problem. solution) is almost constant for D =0.6 and monotonic for D =0.2. Furthermore, the complexity of the schedulability problem decreases when adding more processors.

!" #" $!" $#" %!" %#" &!" &#" #" $#" %#" &#" '#" ##" (#" )#" &#" +#" !"#$%#&'&#(&)*+#,' -*.#'/0'1(,%',#1,' ,-%."/-!0)."1-&!0$'" ,-&."/-!0%."1-$++0&" ,-$)#."/-!0(."1-'0+" ,-&!."/-!0!$."1-+(0%'"
The last algorithm to consider is the DF-B&B SQPA algorithm (i.e. SQPA for disconnected graphs). We generate disconnected graphs with L =2 , B j ∈ [10,[START_REF] Benveniste | Compositionality in dataflow synchronous languages: specification & distributed code generation[END_REF], and T u j = 10⌈σ j ⌉. The enumerative solution proceeds as follows: starting from T = T l , test condition h(t) ≤ t at each absolute deadline in [0,L(T )]. If there is a miss, then put T = getNext() and repeat the same process until reaching the first feasible task set. Function getNext() returns the next unexplored point in the T -space that results in the maximum utilization. The huge overhead of this method is not considered in the comparison.

Fixed-priority scheduling

Let us first consider the SRTA algorithm (i.e. connected dataflow graphs) with fixed priorities (i.e. a unique priority region). We assume that tasks have priorities in the same order in which they were randomly generated. The obtained results are shown in Figure 4.15 where each point represents the ratio of the average number of computed response times by the enumerative solution (for 2000 task sets) to the average number of computed response times by SRTA. The enumerative algorithm consists in the following steps: starting from k =0, perform RTA. If the task set is not feasible, then increment k and repeat the same process until reaching the first feasible task set. The difference between the performance of SRTA and the performance of the basic algorithm is quite huge and unexpected. For instance, for N = 100,B =2 , and D =0 .7, SRTA requires the computation of only 13 response times while the basic approach requires to compute more than 224426 response times. In fact, for the four configurations, SRTA requires to compute at most 13 response times. The second schedulability algorithm to address is the DF-B&B SRTA algorithm (i.e.

SRTA for disconnected graphs). We follow the same approach, described in the previous section, to generate disconnected graphs with L =2 , B ∈ [10,[START_REF] Benveniste | Compositionality in dataflow synchronous languages: specification & distributed code generation[END_REF], and T j = 100⌈σ j ⌉.

The enumerative solution proceeds as follows: starting from T = T l , perform RTA. If there is a deadline miss, then put T = getNext() and repeat the same process until reaching the first feasible task set. Figure 4.16 presents the obtained results where each point in the diagram represents the ratio of the average number of computed response times by the enumerative solution (for 50 task sets) to the average number of computed response times by DF-B&B SRTA. The performance of the DF-B&B SRTA algorithm is not as good as expected, especially in comparison with the performance of the SRTA algorithm. Thus, the problem should be further researched to identify better algorithms. (" $%" $)" %'" &!" &(" '%" ')" #'" (!" ((" *%" *)"

!"#$%&'()*'+$",+')-#'+)

./0')"1)&2+3)+'&+)

+,%-".,!/*-"0,%')!#/%)" +,%-".,!/&-"0,(!(!!/%" In recent years, there has been a growing interest in using Java for safety-critical systems such as flight control systems, railway signaling systems, robotic surgery machines, etc. The high productivity of Java compared to low-level languages is one among multiple reasons that encourage efforts to develop Java environments for both high-end and lowend embedded devices. FijiVM, JamaicaVM, PERC, PERC Pico, KESO, and Muvium are examples of such environments. Much ongoing effort, mainly made by the JSR-302 expert group, is focused on developing the Safety-Critical Java (SCJ) specification [104]. SCJ is a subset of Java augmented by the Real-Time Specification for Java (RTSJ) [START_REF] Gosling | The Real-Time Specification for Java[END_REF] and intended to develop applications that are amenable to certification under safety critical standards (such as DO-178B, Level A).

To better meet domain-specific safety requirements, the SCJ specification defines three levels of compliance (Levels 0, 1, and 2), each with a different model of concurrency, each aiming at applications of specific criticality. By the time of writing, there are few and incomplete implementations (only levels 0 and 1) of SCJ specification; for instance oSCJ [START_REF] Plsek | Developing safety-critical Java applications with oSCJ/L0[END_REF] implemented on top of FijiVM [START_REF] Pizlo | Real time Java on resource-constrained platforms with Fiji VM[END_REF], SCJ implemented on top of HVM [START_REF] Søndergaard | Safety-critical Java for lowend embedded platforms[END_REF], and the prototype implementation of SCJ on the Java processor JOP [START_REF] Schoeberl | Safety-critical Java on a Java processor[END_REF]. We have chosen Level 1 because it is less restricted than Level 0 and more analyzable than Level 2 not yet implemented. Indeed, SCJ/L0 supports only periodic handlers scheduled by a cyclic executive on a single processor; while SCJ/L2 has a much complicated concurrency model with nested missions, no-heap real-time threads, inter-processor job migration, self-suspension, etc.

In this section, we will focus on the concurrency model of SCJ/L1 rather than its memory model. SCJ/L1 relies entirely on periodic and aperiodic event handling. Each handler has its own server thread; this is however inconsistent with RTSJ in which a many-to-one relationship between handlers and servers is allowed [START_REF] Wellings | Asynchronous event handling and safety critical Java[END_REF]. Handlers communicate through shared memory; concurrency therefore becomes an issue as the programmer has to deal with data races, priority inversion, and deadlocks. In order to avoid data races, lock-based synchronization protocols are required though they are extremely complex and require pessimistic schedulability analyses.

Our objective is to propose a dataflow design model of SCJ/L1 applications (as an extension to the affine dataflow model) in which handlers communicate only through lock-free channels. Using dataflow diagrams to model real-time Java applications is not a new idea. Indeed, dataflow models of computation have been used in many realtime Java programming models such as Eventrons [START_REF] Spoonhower | Eventrons: a safe programming construct for high-frequency hard real-time applications[END_REF], Reflexes [START_REF] Spring | Reflexes: abstractions for higly responsive systems[END_REF], Exotasks [START_REF] Auerbach | Java takes flight: time-portable real-time programming with Exotasks[END_REF], StreamFlex [START_REF] Spring | Streamflex: high-throuput stream programming in Java[END_REF], and Flexotasks [START_REF] Auerbach | Flexible task graphs: a unified restricted thread programming model for Java[END_REF]. The main goal of those restricted subsets of Java is to achieve lower latencies than what can be achieved by the real-time garbage collector. They attest the software engineering benefits of the dataflow model by offering some model-driven development capabilities such as automatic code generation. Some of them also provide type systems to ensure memory isolation; i.e. tasks can communicate only through specific mechanisms such as buffers and transactional memory. The above mentioned issues have been already partially solved by the SCJ memory model [START_REF] Cavalcanti | The safety-critical Java memory model: a formal account[END_REF] or the SCJ annotation checker [START_REF] Tang | Static checking of safety critical Java annotations[END_REF]. Those dataflow programming models lack however the necessary tools for computing buffer sizes and priority-driven scheduling parameters.

Concurrency model of SCJ/L1

A SCJ/L1 application consists of a set of missions executed in sequence; nested missions are hence not allowed. The infrastructure MissionSequencer thread is responsible of creating and terminating missions, one after another. As depicted in Figure 4.17, a mission starts in an initialization phase during which schedulable objects (periodic and aperiodic event handlers) are created. Thus, the number and scheduling parameters (i.e. periods, phases, deadlines, priorities, etc.) of handlers are known at compile-time. Handlers are released during the mission execution phase such that periodic handler releases are time-triggered while aperiodic handler releases are event-triggered. SCJ/L1 specification does not support sporadic releases; therefore, aperiodic handlers can have only soft deadlines since the assumptions necessary to check their schedulability are not part of the profile. Each handler overrides the handleAsyncEvent() method to provide the computational logic executed when the handler is released. This is somehow similar to firing functions of actors in dataflow graphs and hence justifies our choice of a dataflow design model. Periodic and aperiodic handlers are bound asynchronous event handlers; i.e. each handler is permanently bound to a single implementation thread. Each handler has a fixed priority; and the set of handlers is executed in parallel with a full preemptive priority-based scheduler. Handlers cannot self suspend and access to shared data is controlled by synchronized methods and statement blocks to avoid race conditions. The scheduler must implement the priority ceiling emulation protocol.

Scheduling aperiodic tasks based on their priorities may cause some lower priority hard tasks to miss their deadlines. Among the proposed solutions, aperiodic servers have been devised to improve the average response time of soft aperiodic tasks; examples of such techniques are: polling servers, deferrable servers, sporadic servers, priority exchange servers, etc. See Section 1.4.3 for more details. The SCJ specification is silent about using such approaches to execute aperiodic handlers although sporadic servers, for instance, are now supported by the POSIX standard P1003.1d. In the sequel, we propose to use sporadic servers; nevertheless, the presented technique can be easily adapted to consider polling servers or deferrable servers. SCJ/L1 also supports multiprocessor implementations which require full partitioned scheduling (through the notion of Affinity Sets). Each handler can execute on a fixed processor with no migration (i.e. a partitioned FP scheduling).

Dataflow design model

Since missions are independent, each mission will be separately designed as a dataflow graph; while the mission sequencer can be modeled by a finite state machine. So, an actor in a dataflow graph represents a SCJ handler. The necessary user-provided information about a mission are illustrated in Figure 4. [START_REF] Benazouz | A new approach for minimizing buffer capacities with throughput constraint for embedded system design[END_REF].

Circle nodes represent periodic actors. The user must provide the worst-case execution time of each actor and the production and consumption rates of FIFO channels (solid arrows between periodic actors). Those rates can be just a safe abstraction of the actual production and consumption rates that can be obtained by some static code analysis. A FIFO channel e will be simply implemented as a cyclic array E with a fixed size s such that the instruction e.set(v) is implemented as {E[i]=v;i=(i+1)%s;} where i is a local index in the producer. Calls for the get() method are implemented in a similar way. The overflow and underflow analyses will ensure that there will be no need for synchronization protocols to access the arrays. Two non-communicating periodic actors can be linked together via an affine relation to relate their speeds to each other. Actors p 3 and p 2 are (2, 0, 1)-affine-related which means that actor p 2 is twice as fast as actor p 3 . Rectangle nodes represent aperiodic handlers. Actor p 4 is an aperiodic handler bound to a sporadic server thread which has a capacity equal to 75 and a replenishment period equal to 540. Parameters of servers that minimize the average response times are generally obtained by simulation. Some selection criteria have been proposed in [START_REF] Bernat | New results on fixed priority aperiodic servers[END_REF]. Since there can be multiple servers in the system, a capacity sharing protocol like the one described in [START_REF] Bernat | Multiple servers and capacity sharing for implementing flexible scheduling[END_REF] may increase the responsiveness of aperiodic tasks.

Besides having unknown (or extremely large) worst-case execution times, aperiodic tasks have unknown interarrival time of requests. Therefore, an aperiodic task cannot communicate with other tasks via simple FIFO channels. Indeed, these communications may be unbounded or empty and hence block the other tasks for an indeterminate time. In our design model, an aperiodic task communicates with other (periodic or aperiodic) tasks through Cyclical Asynchronous Buffers (CAB) [START_REF] Clark | HIC: an operating system for hierarchies of servo loops[END_REF]. CABs offer bounded nonblocking communications. Tokens in a CAB are maintained until they are over-written by the producer. Hence, some produced tokens are lost if the producer is faster than the consumer; and the consumer may read the same tokens several times if it is faster than the producer. This is not a problem in many control applications, where tasks require fresh data rather than the complete stream. CABs were used in HARTIK system [START_REF] Buttazzo | HARTIK: a hard real-time kernel for programming robot tasks with explicit time constraints and guaranteed execution[END_REF] and SimpleRTK. Sample-and-hold communication mechanisms are used in many design models; for instance in the Architecture Analysis and Design Language (AADL) [START_REF]Aerospace standard AS5506A: Architecture analysis and design language (AADL)[END_REF] and the Prelude compiler [START_REF] Pagetti | Multi-task implementation of multi-periodic synchronous programs[END_REF]. Based on the parameters of the aperiodic servers bound to the aperiodic tasks, it is possible to compute the average sizes of CABs.

The user may provide further optional information: (1) Lower bounds and upper bounds on periods. (2) Constrained deadlines of tasks as fractions (less than one) of periods; otherwise deadlines are assumed to be implicit. (3) The number of identical processors for multiprocessor implementations; otherwise uniprocessor scheduling is considered. (4) Buffer sizes and number of initial tokens in channels.

Implementation

The presented dataflow design model comes with a development tool integrated in the Eclipse IDE for easing the development of SCJ/L1 applications and enforcing the restrictions imposed by the design model. It consists of a GMF editor where applications are designed graphically and timing and buffering parameters can be synthesized. Indeed, affine scheduling is first applied on the dataflow subgraph that consists only of periodic actors. Then, symbolic FP schedulability analysis considers both periodic and aperiodic actors. Thanks to equations such as Equation 1.14 (p. 45), SRTA can be easily extended to consider also sporadic servers. Through a model-to-text transformation, using Acceleo, the SCJ code for missions, interfaces of handlers, and the mission sequencer is automatically generated in addition to the annotations needed by the memory checker. Channels are implemented as cyclic arrays or CABs and a fixed amount of memory is hence reused to store the infinite streams of tokens. Channels are instantiated in the mission memory since event handlers execute in private memory areas and can communicate only through mission memory (or the immortal memory). For instance, when a handler reads a token from a channel, it simply copies the token from the mission memory to its private memory.

The user must provide the SCJ code of all the handleAsyncEvent() methods. We have integrated the SCJ memory checker in our tool so that potential dangling pointers can be highlighted at compile-time. A dangling pointer is a reference from an object allocated in a long-lived memory area (e.g. the immortal memory which is destroyed only at the end of the application) to an object allocated in a short-lived memory area (e.g. the private memory of a handler which is destroyed each time its firing function completes).

Conclusion

In this chapter, we have performed several experiments on either real-life benchmarks or randomly generated graphs and task sets. We have compared our tool with the DARTS tool and shown that our symbolic schedulability tests are generally more accurate. We have also shown the improvement on buffering requirements that can be achieved by the priority assignment and deadlines adjustment techniques. Furthermore, we have shown that our symbolic schedulability tests are much faster than the basic enumerative solutions in most cases. Finally, we have briefly present how to use the affine scheduling technique to automatically generate SCJ/L1 applications from a dataflow specification.

Conclusion

The design of real-time safety-critical applications is getting more and more complex due to the ever-increasing functional and nonfunctional requirements. This calls for new design flows that solve the specification, validation, and synthesis problems. Formal models must be used to describe the system, then formal analysis techniques explore the design space to assess feasibility and find the optimal design before the costly implementation phase. Finally, automatic synthesis techniques should be used as much as possible to generate correct by construction implementations.

Any design flow must ensure two key properties of a real-time safety-critical system, namely, functional determinism and temporal predictability. Dataflow models of computation (e.g. SDF, CSDF, etc.) are widely used to design stream-based embedded systems thanks to their inherent functional determinism. Since the introduction of the SDF model, a considerable effort has been made to solve the static-periodic scheduling problem; i.e. the construction of periodic infinite sequences of firings of actors that result in bounded, live, and complete executions. Ensuring boundedness and liveness is the essence of the proposed algorithms in addition to optimizing some nonfunctional performance metrics (e.g. buffer minimization, throughput maximization, code size minimization, etc.). We tried in Chapter 1 to present a survey of dataflow models of computation together with the existing algorithms for static-periodic scheduling of (C|H)SDF graphs.

Nowadays real-time embedded systems are so complex that real-time operating systems are used to manage hardware resources and host real-time tasks. Most of real-time operating systems rely on priority-driven scheduling algorithms (e.g. RM, EDF, etc.) instead of static-periodic schedules (also called cyclic executives) because of the inflexibility and difficult maintainability of cyclic executives. Real-time scheduling theory provides the necessary schedulability tests to verify that all real-time tasks will meet their deadlines even in the worst-case scenario. In Chapter 1, we have presented some of the schedulability tests regarding EDF and FP scheduling for uniprocessor and multiprocessor architectures. The underlying model of computation was the periodic task model which consists of a set of independent and concurrent real-time tasks.

This thesis has addressed the problem of implementing a dataflow specification as a set of independent real-time tasks to be executed on a system equipped with a realtime operating system [START_REF] Bouakaz | Affine data-flow graphs for the synthesis of hard real-time applications[END_REF][START_REF] Bouakaz | Buffer minimization in earliest-deadline first scheduling of dataflow graphs[END_REF][START_REF] Bouakaz | Design of safety-critical Java level 1 applications using affine abstract clocks[END_REF]. This problem consists in mapping each actor in the dataflow graph to a periodic real-time task with appropriate scheduling parameters (i.e. period, first start time, priority, processor allocation, etc.). Certainly, properties Conclusion such as boundedness and liveness must also be considered. Since reads and writes in the periodic task model are non-blocking operations, we have talked more about overflow and underflow exceptions over communication channels. Real-time scheduling of dataflow graphs is not a trivial problem. We have solved it in two steps: abstract scheduling (Chapter 2) and symbolic schedulability analysis (Chapter 3). Let us recall the contributions made at each step: Abstract scheduling 1. Activation-related schedules are presented, together with the necessary conditions for boundedness, liveness, and consistency, as a general framework to describe schedules of static dataflow graphs.

2. Affine relations are used to describe strictly periodic schedules. The objective of the ILP formalization of the problem was to minimize the buffering requirements in a machine-independent way.

3. We have also presented UCSDF (a generalization of CSDF), FRStream (a synchronous operational semantics for UCSDF graphs), multichannels, and how channels can share the same storage space.

Symbolic real-time schedulability analysis 1. We have created a new application field for parametric schedulability theory.

2. We have presented many symbolic EDF schedulability analyses (e.g. SQPA, DF-B&B SQPA, FFDBF-SQPA, BF-EDF, etc.) that aim at maximizing the processor utilization factor. We have shown that our schedulability tests have a lower complexity than the basic enumerative solutions. We have also presented a deadline adjustment technique (to encode scheduling precedences) that aims at minimizing the buffering requirements.

3. Finally, many symbolic FP schedulability tests are presented (e.g. SRTA, DF-B&B SRTA, etc.). We also presented some priority assignment strategies that aim at either minimizing the buffering requirements, maximizing the throughput, or finding a compromised solution.

In Chapter 4, we have shown that our tool (the ADFG tool) outperforms the only existing tool for real-time scheduling of dataflow graphs (the DARTS tool). We have also briefly presented our graphical editor for automatic synthesis of SCJ Level 1 applications from UCDF graph specifications. Certainly, the synthesis flow relies on affine scheduling and symbolic FP schedulability analysis to transform the dataflow specification to a set of independent periodic SCJ handlers.

Perspectives

This thesis is one among the fewest studies that have addressed the real-time scheduling problem of dataflow graphs. However, it offers by no means complete or optimal solutions. Several points need to be researched further; for example:

1. Expressive dataflow models: Though the abstract scheduling approach (Section 2.2) has been presented for arbitrary rate functions and activation relations, we have only implemented a specific case where infinite integer sequences (used either to describe activation relations or rate functions) were ultimately periodic. It will be very interesting to find more expressive classes of integer sequences that could be used as rate functions and yet define an analyzable model.

Symbolic schedulability analysis:

We have focused more on symbolic schedulability analysis of connected graphs. The design parameter space could be further relaxed to consider: disconnected graphs, arbitrary deadlines, more priority assignment strategies, etc. More performance metrics should also be addressed as energy consumption minimization. We believe that this research field is very large, complex, and not yet explored.

Actor clustering:

In the presented scheduling approach, each actor is mapped to a periodic real-time task. However, a large set of real-time tasks could result in a noticeable run-time overhead (due to context switching, scheduling decisions, etc.). It may be hence reasonable to map many actors to a single real-time task so that each task consists in a static schedule of its actors.

Design of SCJ\L1 applications:

To enhance functional determinism, we would like to develop an ownership type system, as the one presented in Reflexes, to ensure firstly that actors are strongly isolated; i.e. objects allocated within an actor are encapsulated unless they are full-immutable. This requirement ensures that the state of an actor cannot be altered by other actors. Typing rules such as "a non-private field must be either a final primitive or a final reference to a full-immutable object" and "non-private methods of an actor do not change its state or leak references to mutable objects" must be checked statically. Besides isolation of actors, the type system must ensure that actors can communicate only through buffers. Hence, "shared objects in the immortal or mission memory areas must be either final primitives or final references to fullimmutable objects". Our future work will also consider to develop a static analysis that infers safe production and consumption rates from the user-provided SCJ code of firing functions and to connect our tool to existing worst-case execution time estimation tools.

Figure 1 :

 1 Figure 1: Real-time scheduling of dataflow graphs.

Figure 2 -

 2 Figure 2 -(a) un graphe flot de données et (b) une relation d'activation.

  représente un ordonnancement abstrait inconsistant qui contient des problèmes de causalité. En effet, on peut déduire à partir de la relation d'activation entre p 1 et p 2 et de la relation entre p 2 et p 3 que la 4 e activation de p 3 précède strictement la 2 e activation de p 1 . Par contre et partant de la relation entre p 3 et p 1 , la 2 e activation de p 1 précède strictement la 2 e activation de p 3 .

Figure 3 -

 3 Figure 3 -Un ordonnancent abstrait inconsistant.

Figure 4 -

 4 Figure 4 -Une relation d'activation affine de paramètres (4, 2, 3).

Definition 1 . 2 (

 12 Events, Signals). An event is a pair (t, a) ∈ T × A such that A is a value domain. A signal s is a partial function s : C ⇀ A with C a chain in T . It associates values with totally ordered observation points. Definition 1.3 (Abstract clock). The abstract clock of a signal s : C ⇀ A is its domain of definition ŝ = dom(s) ⊆ C.

Listing 1 . 1 :

 11 Example in Lucy-n. let node example x=y where rec a=x when (0 1) and b=x when (1 0 1) and y= a+ buffer(b) example when when

Figure 1 . 1 :

 11 Figure 1.1: Example of (a) a cyclic SDF graph, and (b) its equivalent HSDF graph.

Figure 1 . 2 :

 12 Figure 1.2: Reachability graph of the SDF example.

Figure 1 . 3 :

 13 Figure 1.3: Self-timed execution of the SDF example.

1 40 (

 40 Figure 1.4(b)).

  Self-timed execution after retiming. Θ(G) = 1/40. time period (c) Self-timed execution. Θ(G) = 1/60.

Figure 1 . 4 :

 14 Figure 1.4: Retiming of a SDF graph.

Figure 1 . 5 :

 15 Figure 1.5: Pareto space of the SDF example.

Figure 2 . 1 :

 21 Figure 2.1: Time abstraction of the self-timed example.

Definition 2 . 6 (

 26 Graph of activation relations). The graph of activation relationsG r = (P, R) is an undirected graph where the set of vertices P represent actors and the set of edges R represent activation relations.

Property 2 . 3 .

 23 R is clearly non-consistent because according to the first and second activation relations ∀j ∈ N >0 : p 1 [j], p 2 [j] and p 3 [j] are synchronous while ∀p i : p i [j] and p i [j + 1] are not synchronous. But according to the third relation, ∀j ∈ N >0 : p 3 [j] and p 1 [2j] are synchronous. The graph G r is consistent only if for every actor

Figure 2 . 2 :

 22 Figure 2.2: Illustration of Proposition 2.1.

Hence, prd 3 , 1 3 [p 1 (

 3131 (3) = 5 suc 3,1 (3) = 4 prd 3,1 (7) = 8 suc 3,1 (6) > 6 prd 3,1 (11) = 11 suc 3,1 (7) = 7 prd 3,1 (15) = 14 suc 3,1 (10) > 9 . . . . . . There is an infinite number of activation relations that satisfy the previous constraints; for instance, p illustrated in Figure 2.2(b)) and

Figures 2 .

 2 Figures 2.3(c) and 2.3(d):In both cases, ψ 2 [prd 1,2 (j)] is false. Suppose that prd 1,2 (prd ψ 1 (j)) ≥ prd 1,2 (j). Since ψ 1 [j]is false, we have that prd ψ 1 (j) < fsim 1 (j); and hence prd 1,2 (prd ψ 1 (j)) = prd 1,2 (j). This implies that prd ψ 1 (prd ψ 1 (j)) = prd ψ 1 (j); hence, ψ 1 [prd ψ 1 (j)] is true. But ψ 1 [prd ψ 1 (j)] cannot be true, otherwise ψ 2 [prd 1,2 (j)] will also be true. Contradiction.

Figure 2 . 4 :

 24 Figure 2.4: Illustration of Proposition 2.2.

Figure 2 . 5 :

 25 Figure 2.5: Illustration of Proposition 2.3.

Figure 2 . 6 :

 26 Figure 2.6: Graph of activation relations.

  1) ω ] -→ p 2 . Equation 2.1 holds for ψ ′ (Figure 2.7(a)) and ψ ′′ (Figure 2.7(b)) but not for ψ = ψ ′ ⊎ ψ ′′ (Figure 2.7(c)). Indeed, prd ψ (1) = 2.

Figure 2 . 7 :

 27 Figure 2.7: Consistency of symmetric difference of simple cycles.

Figure 2 . 8 :

 28 Figure 2.8: Illustration of Proposition 2.6.

Figure 2 .

 2 Figure 2.9 represents a (3, -4, 5)-affine relation.

Figure 2 . 9 :

 29 Figure 2.9: A (3, -4, 5)-affine relation. Property 2.5. pi and pk are ultimately periodic binary sequences.

Property 2 . 6 .

 26 Figure 2.9. It consists of d gcd{n,d} activations of p i and n gcd{n,d} activations of p k . Thus, parameters n and d of an affine relation encode the ratio between activation rates of actors. For instance, a (1, ϕ, 2)-affine relation means that p i is twice as fast as actor p k . Parameter ϕ encodes the difference between the first start times of the two actors. If p i and p k are (n, ϕ, d)-affine-related, then p k and p i are (d, -ϕ, n)affine-related.

Property 2 . 7 .

 27 An affine relation contains synchronous activations if and only if gcd{n, d} divides ϕ. Proof : If p i [j] = p k [j ′ ], then pi (nj-n+1) = pk (dj ′ -d+ϕ+1) = 1 and nj-dj ′ = ϕ+n-d. We have two cases: (i) gcd{n, d}|ϕ: the diophantine equation n gcd{n,d} j -d gcd{n,d} j ′ = ϕ+n-d

  integers. Hence, the minimum value of m is 2 and the minimum value of ϕ ′ is 2 ϕ g + 1.

Example 2 . 14 . 1 (-→ p 3 (n 3

 214133 Proposition 2.8 is a sufficient but non-necessary condition for consistency of a cycle. If p ,ϕ 3 ,d 3 )

Figure 2 .

 2 Figure 2.10: A consistent affine schedule.

Figure 2 . 11 :

 211 Figure 2.11: Function cbef i,k : partitioned fixed-priority scheduling.

  j) can be linearly lower bounded by d n j + ϕ-n-d+1 n

  indicates that the best values of ϕ are in the neighborhood of 0.

Figure 2 . 13 :

 213 Figure 2.13: Function cbef i,k : partitioned EDF scheduling, ν i = ν k . There are only three cases in which cbef i,k (j) = prd i,k (j) -1 (cases (c), (e), and (f)) and which are possible only if d-n gcd{n,d} ≥ 2 or if n = d ∧ ID(p i ) < ID(p k ).

Figure 2 . 14 :

 214 Figure 2.14: An ultimately cyclo-static dataflow graph.

Figure 2 .

 2 Figure 2.14 represents an UCSDF graph. It is not evident how to transform an UCSDF graph to an equivalent SDF graph without refactoring the code. Let us consider a very simple UCSDF graph G = ({p 1 , p 2 }, e = (p 1 , p 2, x = u 1 v ω 1 , y = u 2 v ω 2 )). This graph can be modeled as a (C)SDF graph only if there are two finite integers j 1 ≥ |u 1 | and j 2 ≥ |u 2 | such that θ(e) + ⊕x(j 1 ) -⊕y(j 2 ) = 0. For example, if x = 3 0(2 1) ω , y = 3(2 0 1) ω , and θ(e) = 2, then j 1 = 2 and j 2 = 2. This way the graph can be partitioned into two disjoint (C)SDF graphs: a deadlocked graph and a live one, as illustrated in Figure2.15. Note that actor p 1[1] will fire only once (and hence corresponds to the first job of actor p 1 ) because of the non-consistent self loop.

Figure 2 .

 2 Figure 2.15: (a) An UCSDF graph and (b) its equivalent CSDF graph.

Figure 2 .

 2 [START_REF] Basten | Efficient execution of process networks[END_REF] illustrates the linear bounds for x = 2 0 1(2 1 0 2) ω .

Figure 2 . 16 :

 216 Figure 2.16: Linear bounds of ultimately periodic rates.

d

  gcd{n,d} activations of p i and n gcd{n,d} activations of p k whatever the parameter ϕ. Using the boundedness criterion, we may have p 1 (2,ϕ 1 ,4) -→ p 2 (6,ϕ 2 ,2) -→ p 3 (4,ϕ 3 ,6)

Figure 2 . 17 :

 217 Figure 2.17: Activation relations of the schedule p 2 p 3 p 3 p 1 p 2 (p 2 p 3 p 3 p 1 p 3 p 1 ) ω .

Figure 2 .

 2 Figure 2.18: (a) An UCSDF graph with a multichannel and (b) its equivalent graph with simple channels.

Figure 2 . 19 :

 219 Figure 2.19: Buffer minimization using a shared storage space.

Listing 2 . 2 :

 22 Actor p1. actor P1(?real x; ! real y;) real z init 4.0; begin state S1{ y

Listing 2 . 4 :Figure 2 .

 242 Figure 2.20: A synchronous execution of process p.

Contents 3 . 1

 31 General conditions . . . . . . . . . . . . . . . . . . . . . . . . . 87 3.2 Fixed-priority scheduling . . . . . . . . . . . . . . . . . . . . . 90 3.2.1 Priority assignment . . . . . . . . . . . . . . . . . . . . . . . 91 3.2.2 Uniprocessor scheduling . . . . . . . . . . . . . . . . . . . . . 97 3.2.3 Multiprocessor scheduling . . . . . . . . . . . . . . . . . . . . 101 3.3 EDF scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . 102 3.3.1 Deadlines adjustment . . . . . . . . . . . . . . . . . . . . . . 102 3.3.2 Uniprocessor scheduling . . . . . . . . . . . . . . . . . . . . . 106 3.3.3 Multiprocessor scheduling . . . . . . . . . . . . . . . . . . . . 109 3.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112

Example 3 . 1 . 1 ( 2 ,ϕ 1 , 4 )-→ p 2 ( 3 ( 4 ,

 31124234 Consider the UCSDF example in Figure 2.14 (p. 79) and assume that all tokens have the same size. The affine relations in the graph are p ϕ 3 ,6)

Figure 3 . 1 :

 31 Figure 3.1: Priority assignment problem expressed as a LOP.

Example 3 . 2 . 4 ( 8 ,

 3248 We add to the UCSDF example (Figure2.14, p. 79) two actors p 4 and p 5 and a channel e 4 = (p 4 , p 5 , 4 ω , 1 ω ). We have hence an additional affine relationp ϕ 4 ,2) -→ p 5 in graph G r which is disconnected in this case. So, we have that π = [T 1 , 2T 1 , 2 3 T 1 , T 2 , T24 ]. Suppose that C = [65, 70, 95, 60, 55] and d = [π 1 -30, π 2 2 , 3 4 π 3 -10, π 4 5 , π 5 -60]. We have that U = 242.5 T 1 + 280 T 2 . The initial T -space is hence defined by T 1 ≥ 210, T 2 ≥ 460, B 1 = 6, B 2 = 20, and U ≤ 1 (i.e. uniprocessor scheduling). Using linear equations d i = d k , we can partition the T -space into a set of priority regions as illustrated in Figure 3.2. For instance region S 1 corresponds to the DM priority ordering p 3 p 5 p 4 p 1 p 2 .

Figure 3 . 2 :

 32 Figure 3.2: Partitioning of the T -space into a set of DM priority regions.

DMFigure 3 . 3 :

 33 Figure 3.3: Transforming DM priority assignments.

Example 3 . 3 .

 33 Let us consider the dataflow graph in Figure 2.14 (p. 79). We add two actors p 4 and p 5 and two channels e 4 = (p 4 , p 5 , 4 ω , 1 ω ) and e 5 = (p 5 , p 3 , 1 ω , 2 ω ). So, π = [T, 2T, 2 3 T, 4 3 T, T 3 ], C = [65, 70, 95, 60, 55] and U = 452.5

Figure 3 . 5 :

 35 Figure 3.5: Exploration of the priority orderings space: throughput vs precedence distance.

Figure 3 . 6 :

 36 Figure 3.6: Exploration of the priority orderings space: throughput vs utilization distance.

Algorithm 3 :

 3 Priority ordering heuristic O = O * ; repeat O prev = O; for i=1, . . ., N-W+1 do Find the best priority ordering O ′ s.t. dis(O ′ , O * ) ≤ u by arranging elements at positions i, i+1, . . . , i+W-1 in O; if b(O ′ ) < b(O) or ( b(O ′ ) = b(O) and dis(O ′ , O * ) < dis(O, O * ) ) then O = O ′ ;until O prev == O;

Figure 3 . 7 :

 37 Figure 3.7: Illustration of DF-B&B symbolic FP schedulability analysis.

Figure 3 .

 3 8 represent a (5, 3, 4)-affine relation between producer p i and consumer p k of a channel e. Arrows represent the precedence relation. For instance, the scheduling constraint "p k [4] precedes p i [4]" can be encoded as D k [4] < D i [4] (assuming that ID(p i ) < ID(p k )) or as D k [4] = min{D k [4], D i [4] -1}.

Figure 3 . 8 :

 38 Figure 3.8: Totally ordered communication strategy.

Figure 3 . 9 :

 39 Figure 3.9: safr i,k function. Let d * i be the user-provided deadline of actor p i (it could be the implicit deadline) and ζ i,k (j) = 1 if D i [j] must be strictly less than D k [safr i,k (j)], and ζ i,k (j) = 0 otherwise. The new deadline of job p i [j] can be computed as follows.

j{

  -ζ i,k (j) + R k [safr i,k (j)] -R i [j]}.That depends on the affine relation between p i and p k . If the affine relation contains synchronous activations (i.e. gcd{n, d} = 1 assuming that the affine relation is under canonical form) and ID(p i ) > ID(p k ), then min j {-ζ i,k (j)} = -1; otherwise min j {-ζ i,k (j)} = 0.

Example 3 . 8 .

 38 Let us consider the graph in Example 3.7. Using Equation 3.10, we obtain d 1 = min{d 1 , d 2 +T, d 3 + T 3 }, d 2 = min{d 2 , d 1 +T, d 3 + 2 3 T }, and d 3 = min{d 3 , d 1 -1, d 2 -1}. The solutions of this equation system are presented in Table 3.3. Property 3.2. Deadlines are monotone over the T -space.

Table 3 . 3 : 1 T - 10 T - 10

 3311010 Fixed-point computation of deadlines. T ∈ ]10, 16] ]16, 33] ]33, ∞[ d

Figure 3 . 11 :

 311 Figure 3.11: Illustration of SQPA.

Lemma 3 . 2 .

 32 T k-1 (t), max{d|d ≤ L(T k )}}; return T k ; If T ≤ T ′ , then L(T ) ≥ L(T ′ ).

Example 3 . 9 .Figure 3 . 12 :

 39312 Figure 3.12: Illustration of DF-B&B SQPA.

Figure 3 . 13 :

 313 Figure 3.13: Illustration of ffdbf

Example 3 . 11 ., 3 4 π 3 - 10 , π 4 2 , π 5 -

 31131025 γ)}; return T k ; Let us consider the task set in Example 3.3: π = [T, 2T, 2 3 T, 4 3 T, T 3 ], C = [65, 70, 95, 60, 55], d = [π 1 -30, π 2 2 60], and U = 452.5 T . If M = 2, then the initial T -space is defined by T ≥ 348 and B = 6. We have that γ min (T ) = max{ 190 T -20 , 165 T -180 } and γ max (T ) = 2 -452.5 T . Constraint µ * < M -U M -1 implies that T ≥ 384. We take ǫ = 0.002 and the initial value of γ is rounded up (e.g. 0.6893 → 0.690) in order to pass by the same values of γ in the iterations. ✷ T = 384, γ min = 0.8088, γ max = 0.8216 • γ = 0.810, L = 10504 t = 10504, h(t, γ) = 10425.21 t = 10425, h(t, γ) = 10363.86 . . . t = 6584, h(t, γ) = 6584.03: miss. Increasing γ will not solve the problem since ffdbf (t, γ) = 7835.0 > F * = 506.85. Hence, T must be increased. ✷ T = 390, γ min = 0.7857, γ max = 0.8397 • γ = 0.786, L = 2270 t = 2265, h(t, γ) = 2173.49 . . . t = 751, h(t, γ) = 751.23: miss and ffdbf (t, γ) > F * . . . . ✷ T = 408, γ min = 0.7236, γ max = 0.8909 • γ = 0.724, L = 718: schedulable and U M = 0.554

Figure 4 . 1 :

 41 Figure 4.1: Achieved throughput in EDF/RM uniprocessor scheduling.

Figure 4 . 2 :

 42 Figure 4.2: Impact of number of processors on the throughput in BF-RM scheduling.

Figure 4 . 3 :

 43 Figure 4.3: Comparison between BF-EDF and the first fit allocation strategy of DARTS.

Figure 4 . 4 :

 44 Figure 4.4: Comparison between BF-EDF and FFDBF-SQPA.

Figure 4 . 5 :

 45 Figure 4.5: Comparison between DARTS and ADFG in terms of buffering requirements.

Figure 4 . 6 :

 46 Figure 4.6: Impact of the totally ordered communication strategy on the buffering requirements.

!

Figure 4 . 7 :

 47 Figure 4.7: Impact of the LOP priority assignment on the buffering requirements and the processor utilization.

Figure 4 . 8 :

 48 Figure 4.8: Impact of the constrained LOP priority assignment on the buffering requirements and the processor utilization.

Figure 4 . 9 :

 49 Figure 4.9: Impact of the priority assignment with utilization distance on the buffering requirements and the processor utilization.

  +0.03)α i ]. The obtained results are shown in Figure 4.11. Each point in the diagram represents the average number of checked deadlines by either the enumerative solution or the SQPA algorithm for 2000 task sets.

Figure 4 . 11 :

 411 Figure 4.11: Impact of constrained deadlines on the performance of the SQPA algorithm.

Figure 4 . 12 :Figure 4 . 13 :

 412413 Figure 4.12: Performance of the FFDBF-SQPA algorithm.

Figure 4 .

 4 14 shows the obtained results. Each point in the diagram is the ratio of the average number of checked deadlines by the enumerative solution (for 100 task sets) to the average number of checked deadlines by DF-B&B SQPA. For each configuration, we denote by E the average number of checked points per task (obtained by the enumerative solution) to indicate the complexity of the problem. Again, the symbolic schedulability problem is more complex for large values of D. Furthermore, DF-B&B SQPA outperforms the enumerative solution for non-small values of N and D. ."/-!0)."1-&!+*(.*')$+" ,-%."/-!0&."1-$$($%.)*#&'"

Figure 4 . 14 :

 414 Figure 4.14: Performance of the DF-B&B SQPA algorithm.

Figure 4 . 15 :

 415 Figure 4.15: Performance of the SRTA algorithm.

Figure 4 . 16 :

 416 Figure 4.16: Performance of the DF-B&B SRTA algorithm.

4. 3

 3 Application: Design of SCJ/L1 systems

Figure 4 . 17 :

 417 Figure 4.17: SCJ mission life cycle.

Figure 4 . 18 :

 418 Figure 4.18: An ultimately cyclo-static dataflow graph with aperiodic actors.

Figure 4 . 19 :

 419 Figure 4.19: Graphical editor for SCJ/L1 applications design.

  .1 shows the essential SIGNAL operators and what relations should relate clocks. Both the select and merge operators are not Kahn processes. Unlike LUSTRE and ESTEREL, SIGNAL is a multi-clocked model; i.e. a master clock is not needed in the system. Therefore, two signals may have totally unrelated abstract clocks; such as the operands of the merge process.

	Construct	clock relations	semantics
	Stepwise extensions r = f (s 1 , . . . , s n )	r = ŝ1 = • • • = ŝn	∀t ∈ r : r(t) = f (s 1 (t), . . . , s n (t))
	Delay r = s$ init a 0 Select r = s when b	r = r = ŝ ∩ {t ∈ b|b(t) = ŝ true}	∀t ∈ r : r(t) = t -and t are successive tags in if t = a 0 s(t -) otherwise r r ∀t ∈ r : r(t) = s(t)
	Merge r = s 1 default s 2	r = ŝ1 ∪ ŝ2	∀t ∈ r : r(t) =	s 1 (t) if t ∈ ŝ1 s 2 (t) otherwise
		Table 1.1: SIGNAL elementary processes

Table 1 .

 1

	2: N-synchronous execution of Program 1.1.
	signal		flow		clock
	x	2 5 1 0 3 2 1	1 ω
	a = x when (0 1)	5	0	2	1 ω on (0 1) ω
	b = x when (1 0 1) 2	1 0	2 1 1 ω on (1 0 1) ω
	buffer(b)	2	1	0	1 ω on (0 1) ω
	y	7	1	2	1 ω on (0 1) ω

Table 1 .

 1 3: Semantics of Program 1.2.

	date	0 10 20 30 40 50 60
	x	3 2	4	1	0	6	2
	a	4 3	9	6 10 16 13
	a /2	4	9		10		13
	b	5	10		11		14
	1 fby b	1	5		10		11
	(1 fby b) * 2 1 1	5	5 10 10 11

  , then the reachability graph is infinite since actor p 1 is always enabled. This implies that the new SDF graph is not strictly bounded; but it is bounded since there exists at least one complete execution with bounded channels.A dataflow graph is live if it has executions in which all actors are fired infinitely. An immediate result of the functional determinism of CSDF graphs (i.e. the scheduling order does not affect the results) is that if one execution deadlocks then all executions deadlock[START_REF] Ghamarian | Liveness and boundedness of synchronous dataflow graphs[END_REF]. The reachability graph in Figure1.2 is deadlock-free (i.e. ∀M : ∃p i ∈ P : p i is firable at M ) and live (i.e. ∀p i : ∀M : ∃M ′ : the firing sequence that transforms M

	channel e i . The initial marking M 0 contains for each channel e its number of initial
	tokens θ(e). Figure 1.2 represents the reachability graph of the SDF example (Figure
	1.1(a)) where states are markings and transitions are actor firings. The SDF example
	is strictly bounded since its reachability graph is finite. However, if we delete channel
	e 1
	1.3.1 Reachability analysis
	Since SDF graphs are equivalent to weighted marked graphs, many techniques from the
	Petri nets literature can be used to analyze them. A marking M (or channels state)
	is denoted by a vector whose i th component M (i) represents the number of tokens in

  Priority-driven operational semantics . . . . . . . . . . . . . 52 2.2 Activation-related schedules . . . . . . . . . . . . . . . . . . . 53 2.2.1 Activation relations . . . . . . . . . . . . . . . . . . . . . . . 2.2.2 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.3 Overflow analysis . . . . . . . . . . . . . . . . . . . . . . . . . 2.2.4 Underflow analysis . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Affine schedules . . . . . . . . . . . . . . . . . . . . . . . . . . 67 2.3.1 Affine relations . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.2 Consistency . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3.3 Fixed-priority schedules . . . . . . . . . . . . . . . . . . . . . 2.3.4 EDF schedules . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4 Specific cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 2.4.1 Ultimately cyclo-static dataflow graphs . . . . . . . . . . . . 2.4.2 Multichannels . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.4.3 Shared storage space . . . . . . . . . . . . . . . . . . . . . . . 2.4.4 FRStream . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

	Chapter 2
	Abstract schedules
	Contents
	2.1

Table 3 .

 3 1: Symbolic RTA of the task set in Example 3.3 with DM priorities.

actor R

  Algorithm 4: DF-B&B SRTA.

	Procedure main() begin
	T cur = T fst ; U cur = U (T fst );
	VisitTree(1);
	return T cur ; Procedure visitTree(i) begin
	i =PossibleValuesOf(T i ) ;
	for each t ∈ i do if not Feasible(T node ) then prune this node and nodes for remaining values in i
	else
	if U (T node ) < U cur then
	T cur = T node ; U cur = U (T cur );
	if i < L then VisitTree(i+1);

  6 7 T 1 , T 1 , 19 42 T 1 , 1 5 T 2 , 11 92 T 2 ]. The linear program can hence be written as max 242.5 x 1 + 280 x 2

	242.5 x 1 + 280 x 2 ≤ 1	(U ≤ 1)

  Symbolic schedulability analysis . . . . . . . . . . . . . . . . 121 4.2.1 EDF scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . 122 4.2.2 Fixed-priority scheduling . . . . . . . . . . . . . . . . . . . . 125 4.3 Application: Design of SCJ/L1 systems . . . . . . . . . . . . 127 4.3.1 Concurrency model of SCJ/L1 . . . . . . . . . . . . . . . . . 128 4.3.2 Dataflow design model . . . . . . . . . . . . . . . . . . . . . . 129 4.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 131

Contents 4.1 Performance comparison: ADFG vs DARTS . . . . . . . . . . 113 4.1.1 Throughput . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 4.1.2 Buffering requirements . . . . . . . . . . . . . . . . . . . . . . 118 4.2

Acknowledgements

and Eric JENN, project manager of THALES Avionics, for accepting to be the examiners of my thesis defense.

It is worth mentioning that even if p i belongs to a cycle in the dataflow graph, D i [j] does not depend on itself. Therefore, it is possible to compute adjusted deadlines using simple propagation of new values. Furthermore, since each affine relation is an ultimately periodic activation relation, the deadlines of jobs of each actor are ultimately periodic. -→ p 1 . As shown in Figure 3.10, the hyperperiod of this schedule consists of two activations of p 1 , one activation of p 2 , and three activations of p 3 . Deadlines computation will be limited to one hyperperiod. We have that π = [T, 2T, 2 3 T ] and we suppose that the user-provided deadlines are d * = [π 1 -10, π 2 2 , π 3 ] and that ID(p 1 ) < ID(p 2 ) < ID(p 3 ). The new deadlines are computed as follows.

Figure 3.10: Deadlines computation example.

The possible deadline regions are depicted in Table 3.2. So, if C = [START_REF] Davey | Introduction to lattices and order[END_REF][START_REF] Dennis | First version of a data flow procedure language[END_REF][START_REF] Halbwachs | The synchronous dataflow programming language LUSTRE[END_REF], then T ≥ 242. 5 M . Hence, if M = 1, then ∀p i :

Table 3.2: Deadline regions of Example 3.7. ( 2 3 T ) ω

Approximate deadlines

Most of EDF schedulability tests assume that a task has a unique deadline. To fit in this model, we may consider the following two simple solutions.

Symbolic schedulability analysis

So, the maximum processor utilization that can be achieved with the user-provided deadlines is equal to U = 0.985.

The second case is when the graph of affine relations is disconnected. We propose a DF-B&B SQPA search algorithm (Algorithm 6). Procedure SQPA * (T , t) performs QPA (i.e. testing h(t) ≤ t in backward manner) for a given value T starting from point min{t, L(T )}. It ends when there is a miss (i.e. this procedure does not increase periods) or if the system is schedulable at point T . When U (T ) > 1, the procedure indicates the miss immediately. To better explain the search algorithm, we consider the following example.

Algorithm 6: DF-B&B SQPA.

Procedure main() begin

Procedure visitTree(T , t, j) begin for i = j, j + 1, . . . , L, . . . , j -1 do 6 represents the results of the search algorithm where nodes are numbered in the order of appearance. Initially, we have that T cur = [START_REF] Johnston | Advances in dataflow programming languages[END_REF][START_REF] Halbwachs | Simulation and verification of asynchronous systems by means of a synchronous model[END_REF] and U = 0. Since U (T cur ) > 1, procedure SQPA * indicates a miss immediately. From each node, we increase either T 1 or T 2 . The first node with U (T node ) ≤ 1 is T node = [START_REF] Halbwachs | Simulation and verification of asynchronous systems by means of a synchronous model[END_REF][START_REF] Lehoczky | The rate monotonic scheduling algorithm: exact characterization and average case behavior[END_REF]. At this node, Procedure SQPA * returns a miss. As in SQPA, If d * is the missed deadline, then the verification will continue from min{L, h(d * )} when periods are increased (h(d * ) is denoted by t in Figure 3.12). The first encountered leaf is T = [START_REF] Lehoczky | The rate monotonic scheduling algorithm: exact characterization and average case behavior[END_REF][START_REF] Ritz | High level software synthesis for signal processing systems[END_REF] (i.e. the task set is EDF-schedulable at this point), and U cur and T cur must be updated. Node numbered 12 is pruned because U ( [START_REF] Oh | Utilization bounds for N-processor rate monotonic scheduling with static processor assignment[END_REF][START_REF] Lehoczky | The rate monotonic scheduling algorithm: exact characterization and average case behavior[END_REF]) < U cur = 0.806.

However, this algorithm requires upper bounds T u j in order to have a finite search space. This is mainly to ensure that a point such and some research papers). The number of nodes in a graph is denoted by #nodes, the number of channels is denoted by #edges, the maximum throughput (i.e. the self-timed throughput) is denoted by Θ(G), while the minimum buffering requirements that can be obtained by a static-periodic schedule is denoted by minBS. The maximum throughput and the minimum buffering requirements are computed after disabling autoconcurrency. Minimum buffering requirements are computed using the SDF 3 tool. The throughput of an actor p i is taken as

Then, the maximum processor utilization is taken as

. If all the channels in a graph are perfectly matched I/O rates channels, then factor B (computed in the symbolic schedulability analysis) will be equal to 1. Most of the applications in Table 4.1 (except for MP3 decoder, cd2dat-csdf, Satellite, Experimental validation number of initial tokens in channels). The reason is that the DARTS tool first computes the minimum periods assuming unlimited resources and then scales these periods so that the task set fits on one processor.

Even in EDF scheduling, it is not always possible to achieve an utilization equal to 1. If the system is unschedulable for a given T , then the next value of T depends on B (since T = T l B B + kB). This explains the low utilization achieved by the cd2dat-csdf and Satellite applications for instance.

Regarding constrained deadlines, the DARTS tool allows the user to specify deadlines of the form ∀p i ∈ P :

Hence, all the deadlines must be scaled with the same scale factor f . In our tool, the designer has more freedom on which deadlines he would like to constrain as d i = a i π ib i . In Sections 2.3.3 and 2.3.4, we have shown how to compute function cbef in the overflow and underflow analyses. In FP scheduling, user-imposed deadlines has no (direct) impact on the computation of cbef. However, in EDF scheduling, user-provided deadlines may introduce different scheduling precedences than the one deduced from implicit deadlines. Therefore, they must be considered at the abstract schedule construction step.

Let us now address the multiprocessor scheduling case. One important question is "given a (global or partitioned) scheduling algorithm, what is the minimum number of processors required to achieve the self-timed throughput ?". A necessary schedulability condition is that U = σ T ≤ M . But, T must be a multiple of some integer B. Therefore, if B ≥ σ, then even if we increase the number of processors, we cannot reduce the lower bound on T (deduced from U ≤ M and T = kB). This is why in some cases (e.g. the satellite application), it is impossible to achieve the self-timed throughput even with an unlimited number of processors.

In partitioned scheduling, the best processor utilization cannot exceed the one obtained when M = N . In this case, the best fit strategy allocates each actor to a different processor. Let U M =N be the obtained utilization and let T l be the lower bound deduced only from constraint C i ≤ d i . So,

Depending on T l and B, value U M =N can or cannot be equal to the self-timed utilization.

Application 1. Connected graphs: For each task p i , we generate three parameters (C i , α i , β i ) such that π i = α i T and d i = β i T . The UUniFast algorithm [START_REF] Bini | Measuring the performance of schedulability tests[END_REF] is used to generate uniformly distributed C i α i values. Worst-case execution times are uniformly distributed in the interval [START_REF] Jeffay | A rate-based execution abstraction for multimedia computing[END_REF]1000]. Parameters α i and β i are uniformly generated by fixing the value of factor B and the value of an experimental parameter D ∈]0, 1] so that ∀p i :

We will show the obtained results for different configurations of N, B, and D.

Disconnected graphs:

A disconnected graph consists of a set of connected components. Hence, we use the above mentioned method to generate L components and we then take the union of these components. Let N j be the number of actors in the j th component (hence, N = L j=1 N j ). We generate the components such that ∀j : N j = N L ; while factors B j are uniformly distributed in a given interval.

EDF scheduling

Let us start with the SQPA algorithm (hence, connected graphs) to be compared with the following basic algorithm: starting from k = 0; test condition h(t) ≤ t at each absolute deadline t ∈ [0, L(T k )]. If there is a deadline miss, then increment k. Repeat the same process until reaching the first feasible task set. The complexity of the symbolic schedulability problem increases inversely with factor B. Indeed, if B has a small value, then the number of checked deadlines will be large since each time a deadline is missed, T is increased only by a small quantity.

Appendix A

Sets, orders, and sequences

This appendix introduces some basic mathematical concepts about ordered sets used in describing the different dataflow models of computation. Most of definitions are taken from the wonderful book of Davey and Priestly [START_REF] Davey | Introduction to lattices and order[END_REF]. Furthermore, the appendix presents the sequence domain and its properties.

A.1 Ordered sets

Definition A.1 (Poset). A partially ordered set (poset for short) is a pair (A, ⊑) such that A is a set and ⊑ is a partial order relation on A (i.e. ⊑ is reflexive, antisymmetric, and transitive). Dually, we can define the minimal elements and the minimum of a subset. The maximum element of the poset, if any, is called the top element (denoted by ⊤ A ); while the minimum element, if any, is called the bottom element (denoted by ⊥ A ). Dually, we can define a meet semi-lattice. A lattice (A, ⊑, ⊔, ⊓) is both a join semilattice and a meet semi-lattice.

Sets, orders, and sequences

Definition A.5 (complete lattice). A complete lattice (A, ⊑, , ) is a poset (A, ⊑) such that any subset B ⊆ A has a least upper bound B and a greatest lower bound B in A.

The poset satisfies the ascending chain condition (ACC) if and only if any infinite sequence a 0 ⊑ a 1 ⊑ . . . ⊑ a n ⊑ . . . of elements of A is not strictly increasing, that is ∃k ≥ 0 : ∀j ≥ k : a k = a j .

Definition A.7 (CPO). A complete partial order (CPO for short) (A, ⊑, ⊥ A ) is a poset (A, ⊑) with a bottom ⊥ A such that any increasing chain of A has a lower upper bound in A. Lemma A.1 (CPO of continuous functions). For CPOs (A, ⊑ 1 ) and (B, ⊑ 2 ), let [A → B] be the set of all continuous total functions from

A.2 Fixed point theory

Theorem A.2 (fixed point theorem for a continuous function on a CPO). Let f ∈ A → A be a continuous function on a CPO (A, ⊑, ⊥ A ). The least fixed point exists and

Theorem A.3 (fixed point theorem for a monotone function on a CPO). Every monotone function on a CPO has a least fixed point.

A.3 Sequences

Let A ∞ be the set of finite or denumerably infinite sequences over a set A. A finite sequence s ∈ A * is a total function s : {1, . . . , n} → A for some natural number n such that s(i) is the i th element of the sequence. The number n is the length of the sequence, denoted by |s|. The empty sequence, which has a length equal to 0, is denoted by ǫ. The sequence s : N >0 → A is an infinite sequence of length equals ω where ∀i ∈ N : i < ω. The set of infinite sequences is denoted by A ω . Thus,

We often list the elements of a sequence s, writing a 1 a 2 . . . a |s| if s ∈ A * , and a 1 a 2 . . . if s ∈ A ω . For two sequences s 1 and s 2 , the sequence s 1 .s 2 represents their concatenation.

Definition A.11 (Prefix order). A sequence s 1 is a prefix of a sequence s 2 , and we write s 1 ⊑ s 2 , if and only if it exists s 3 such that s 2 = s 1 .s 3 . We say then that s 1 provides an approximate information about s 2 . The relation ⊑ is a partial order on A ∞ .

(A ∞ , ⊑) is a CPO. Indeed, the poset (A ∞ , ⊑) has a bottom element ⊥ = ǫ. Furthermore, the lower upper bound of any finite non-empty chain is the greatest element, while the lower upper bound of any infinite chain s 0 ⊑ s 1 ⊑ . . . ⊑ s n ⊑ . . . is the infinite sequence s where s(i) equals s k (i) for any k such that |s k | ≥ i.

(A ∞ , ⊑) is a meet semi-lattice since the greatest lower bound of any two sequences is their longest common prefix. However, it is not a join semi-lattice (e.g. a 1 a 2 and a 2 a 1 do not have a lower upper bound).

A.3.1 Periodic sequences

An infinite constant sequence s = a ω where a ∈ A is a sequence such that ∀i ∈ N >0 : s(i) = a. A periodic infinite sequence s = v ω , where v is a finite non-empty sequence, is a sequence such that ∀i ∈ N >0 : s(i) = v(1 + (i -1) mod |v|). An ultimately periodic sequence s = uv ω , where u is a (possibly empty) finite sequence, is the concatenation of a periodic sequence v ω to a finite sequence u. Hence, ∀i ∈ N >0 : s(i) = u(i) if i ≤ |u|; and s(i) = v(1+(i-|u|-1) mod |v|) otherwise. So, every constant sequence is periodic (|v| = 1) and every periodic sequence is ultimately periodic (|u| = 0).

A.4 Tuples

We often list the sequences within a N -tuple, writing [s 1 , s 2 , . . . , s N ]. Thus, S(i) represents the i th sequence of the tuple. For the sake of conciseness, the Cartesian product

We extend the prefix order to A N as the point-wise prefix order; i.e. if S 1 , S 2 ∈ A N , then S 1 ⊑ S 2 if and only if ∀i :

A.5 Real sequences

Arithmetic operations are extended to real sequences as follows. If s and r are two infinite sequences or finite sequences with |s| = |r|, then ∀i : (s op r)(i) = s(i) op r(i). Furthermore, s ≤ r if and only if ∀i : s(i) ≤ r(i).

Sets, orders, and sequences

Definition A.12 (Cumulative functions). The cumulative function of a real sequence s ∈ R ∞ is the sequence ⊕s such that ∀i ∈ {1, . . . , |s|} : ⊕s(i) = i j=1 s(j). By convention, ⊕s(0) = 0.

The sum of all elements of a finite sequence v ∈ R * , denoted by v , is equal to ⊕v(|v|).

Definition A.13 (Inverse sequence). Let s ∈ N ∞ be an integer sequence. The inverse sequence s -1 ∈ N ∞ is the sequence such that ∀j ≤ s : ⊕s(s -1 (j) -1) < j ≤ ⊕s(s -1 (j)). For example, if s = 1 2 4, then s -1 (5) = 3 because ⊕s(2) < 5 ≤ ⊕s(3).

Definition A.14 (⊗ operator). Let s ∈ R ω and r ∈ N ω be two infinite sequences. The

The on operator of the synchronous language Lucy-n [START_REF] Mandel | Lucy-n : a n-Synchronous Extension of Lustre[END_REF] is equivalent to the ⊗ operator defined on binary sequences B ω ; i.e. the set of infinite sequences over B = {0, 1}. The set of ultimately periodic binary sequences corresponds to the set of 2-adic numbers [START_REF] Vuillemin | On circuits and numbers[END_REF]. Table A.1 illustrates the ⊗ operator. Proof: From Definition A.14, we note that ∀i : (s ⊗ r)(i) = ⊕s(⊕r(i)) -⊕s(⊕r(i -1)).

Hence, ⊕(s ⊗ r)(i) =

List of Figures

Abstract

The ever-increasing functional and nonfunctional requirements in real-time safety-critical embedded systems call for new design flows that solve the specification, validation, and synthesis problems. Ensuring key properties, such as functional determinism and temporal predictability, has been the main objective of many embedded system design models. Dataflow models of computation (such as KPN, SDF, CSDF, etc.) are widely used to model streambased embedded systems due to their inherent functional determinism. Since the introduction of the (C)SDF model, a considerable effort has been made to solve the static-periodic scheduling problem. Ensuring boundedness and liveness is the essence of the proposed algorithms in addition to optimizing some nonfunctional performance metrics (e.g. buffer minimization, throughput maximization, etc.). However, nowadays real-time embedded systems are so complex that real-time operating systems are used to manage hardware resources and host real-time tasks. Most of real-time operating systems rely on priority-driven scheduling algorithms (e.g. RM, EDF, etc.) instead of static schedules which are inflexible and difficult to maintain. This thesis addresses the real-time scheduling problem of dataflow graph specifications; i.e. transformation of the dataflow specification to a set of independent real-time tasks w.r.t. a given priority-driven scheduling policy such that the following properties are satisfied: (1) channels are bounded and overflow/underflow-free; (2) the task set is schedulable on a given uniprocessor (or multiprocessor) architecture. This problem requires the synthesis of scheduling parameters (e.g. periods, priorities, processor allocation, etc.) and channel capacities. Furthermore, the thesis considers two performance optimization problems: buffer minimization and throughput maximization.

Résumé

Les systèmes temps-réel critiques sont de plus en plus complexes, et les exigences fonctionnelles et non-fonctionnelles ne cessent plus de croître.