12
IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 1 Holistic Scheduling of Real-time Applications in Time-Triggered in-Vehicle Networks Menglan Hu, Jun Luo, Member, IEEE, Yang Wang, Martin Lukasiewycz, Member, IEEE, and Zeng Zeng Abstract—As time-triggered communication protocols (e.g., TTCAN, TTP, and FlexRay) are widely used on vehicles, the scheduling of tasks and messages on in-vehicle networks becomes a critical issue for offering quality-of-service (QoS) guarantees to time-critical applications on vehicles. This paper studies a holistic scheduling problem for handling real-time applications in time-triggered in-vehicle networks where practical aspects in system design and integration are captured. The contributions of this paper are multi-fold. Firstly, this paper designs a novel scheduling algorithm, referred to as Unfixed Start Time (UST) algorithm, which schedules tasks and messages in a flexible way to enhance schedulability. In addition, to tolerate assign- ment conflicts and further improve schedulability, this paper proposes two rescheduling and backtracking methods, namely Rescheduling with Offset Modification (ROM) and Backtracking and Priority Promotion (BPP) procedures. Extensive performance evaluation studies are conducted to quantify the performance of the proposed algorithm under a variety of scenarios. Index Terms—Automotive electronics, distributed embedded systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems. I. I NTRODUCTION A S electronic and computer technologies rapidly evolve, today’s cars are becoming complicated distributed em- bedded systems where various electronic devices such as controllers, sensors, and actuators are integrated to replace mechanical components. These electronic control units (ECU) require information exchange among each other via in-vehicle networks to support the execution of their tasks. For example, in today’s luxury cars up to 70 ECUs exchange up to 2500 signals [1]. Data exchange on in-vehicle networks are imple- mented via communication protocols. One widely deployed protocol is the Controller Area Network (CAN) [2]. However, this event-triggered protocol is improper for novel real-time Copyright (c) 2009 IEEE. Personal use of this material is permitted. However, permission to use this material for any other purposes must be obtained from the IEEE by sending a request to [email protected]. This work was supported in part by the Singapore National Research Foundation under its Campus for Research Excellence And Technological Enterprise (CREATE) programme. M. Hu is with the School of Computer Engineering, Nanyang Technological University, Singapore and also with the Department of Electronics and Information Engineering, Huazhong University of Science and Technology, Wuhan, China. This paper was done when he worked in NTU. E-mail: [email protected]. J. Luo is with the School of Computer Engineering, Nanyang Technological University. E-mail: [email protected]. Y. Wang is with the Faculty of Computer Science, University of New Brunswick, Fredetricton, Canada. E-mail: [email protected]. M. Lukasiewycz is with TUM CREATE Centre, Singapore. E-mail: [email protected]. Z. Zeng is with the Department of Electrical and Computer Engineering, National University of Singapore, Singapore. E-mail: [email protected]. applications requiring predictable and robust communication. Hence, the design paradigm in the automotive industry is shifting from event-triggered systems (e.g., CAN) to time- triggered systems, which are based on time-triggered protocols such as Time-triggered Protocol (TTP) [5] and Time-triggered CAN (TTCAN) [3]. As the number of ECUs and functions in cars continues to increase, the needs of large-scale data exchanges for novel applications such as X-by-wire [6] has motivated the development of the FlexRay protocol [4], which is expected to be the de-facto standard in the automotive industry and has been deployed in new cars including new BMW-7 series. Due to the wide deployment of the time-triggered protocols (e.g., TTCAN, TTP, and FlexRay) on vehicles [7], [8], [9], the scheduling of applications on such systems becomes a critical issue for offering quality-of-service (QoS) guarantees to time-critical applications on in-vehicle networks. Here, an application is referred to a set of tasks with timing constraints to perform a well-defined function in the vehicle. Each task running in a specified ECU is triggered by messages received from other tasks and sends messages to its downstream tasks. Consequently, the application can be abstracted as a directed acyclic graph (i.e., task graph) where nodes represents either the tasks or the messages and edges specify the precedences among the nodes. For instance, the in-cycle control in a vehicle is triggered when the messages of 4 wheel positions are available (broadcast by the corresponding tasks of the wheels) and thereby updates its control outputs (tasks). Given that such applications are regularly repeated, the scheduling problem can be formulated as a periodic task graph scheduling problem. A number of studies for scheduling in time-triggered sys- tems have been reported. Many existing works mainly focused on scheduling messages while tasks were neglected [28], [30], [29], [12]. The isolated message scheduling may severely limit the overall performance and feasibility of all applications which consist of both tasks and messages. A handful of studies have studied the holistic scheduling on both tasks and messages on time-triggered systems [20], [13], [18], [19], [21]. However, most of the above mentioned studies relied on mathematical programming techniques, which cannot scale to large-scale systems. Due to the sharply increasing amount of software functionality in modern vehicles, efficient and scalable heuristic algorithms are desired. Over the past decades, many heuristic algorithms for scheduling task graphs in multiprocessors have been proposed in literature [14], [15], [16], [26], [25], [24]. However, these heuristics were not designed for time-triggered in-vehicle networks. Also, most of the works even neglected the contention on communication

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 1

Holistic Scheduling of Real-time Applications inTime-Triggered in-Vehicle Networks

Menglan Hu, Jun Luo, Member, IEEE, Yang Wang, Martin Lukasiewycz, Member, IEEE, and Zeng Zeng

Abstract—As time-triggered communication protocols (e.g.,TTCAN, TTP, and FlexRay) are widely used on vehicles, thescheduling of tasks and messages on in-vehicle networks becomesa critical issue for offering quality-of-service (QoS) guaranteesto time-critical applications on vehicles. This paper studies aholistic scheduling problem for handling real-time applicationsin time-triggered in-vehicle networks where practical aspects insystem design and integration are captured. The contributionsof this paper are multi-fold. Firstly, this paper designs a novelscheduling algorithm, referred to as Unfixed Start Time (UST)algorithm, which schedules tasks and messages in a flexibleway to enhance schedulability. In addition, to tolerate assign-ment conflicts and further improve schedulability, this paperproposes two rescheduling and backtracking methods, namelyRescheduling with Offset Modification (ROM) and Backtrackingand Priority Promotion (BPP) procedures. Extensive performanceevaluation studies are conducted to quantify the performance ofthe proposed algorithm under a variety of scenarios.

Index Terms—Automotive electronics, distributed embeddedsystems, FlexRay, in-vehicle networks, list scheduling, real-timescheduling, task graphs, time-triggered systems.

I. INTRODUCTION

AS electronic and computer technologies rapidly evolve,today’s cars are becoming complicated distributed em-

bedded systems where various electronic devices such ascontrollers, sensors, and actuators are integrated to replacemechanical components. These electronic control units (ECU)require information exchange among each other via in-vehiclenetworks to support the execution of their tasks. For example,in today’s luxury cars up to 70 ECUs exchange up to 2500signals [1]. Data exchange on in-vehicle networks are imple-mented via communication protocols. One widely deployedprotocol is the Controller Area Network (CAN) [2]. However,this event-triggered protocol is improper for novel real-time

Copyright (c) 2009 IEEE. Personal use of this material is permitted.However, permission to use this material for any other purposes must beobtained from the IEEE by sending a request to [email protected].

This work was supported in part by the Singapore National ResearchFoundation under its Campus for Research Excellence And TechnologicalEnterprise (CREATE) programme.

M. Hu is with the School of Computer Engineering, Nanyang TechnologicalUniversity, Singapore and also with the Department of Electronics andInformation Engineering, Huazhong University of Science and Technology,Wuhan, China. This paper was done when he worked in NTU. E-mail:[email protected].

J. Luo is with the School of Computer Engineering, Nanyang TechnologicalUniversity. E-mail: [email protected].

Y. Wang is with the Faculty of Computer Science, University of NewBrunswick, Fredetricton, Canada. E-mail: [email protected].

M. Lukasiewycz is with TUM CREATE Centre, Singapore. E-mail:[email protected].

Z. Zeng is with the Department of Electrical and Computer Engineering,National University of Singapore, Singapore. E-mail: [email protected].

applications requiring predictable and robust communication.Hence, the design paradigm in the automotive industry isshifting from event-triggered systems (e.g., CAN) to time-triggered systems, which are based on time-triggered protocolssuch as Time-triggered Protocol (TTP) [5] and Time-triggeredCAN (TTCAN) [3]. As the number of ECUs and functionsin cars continues to increase, the needs of large-scale dataexchanges for novel applications such as X-by-wire [6] hasmotivated the development of the FlexRay protocol [4], whichis expected to be the de-facto standard in the automotiveindustry and has been deployed in new cars including newBMW-7 series.

Due to the wide deployment of the time-triggered protocols(e.g., TTCAN, TTP, and FlexRay) on vehicles [7], [8], [9],the scheduling of applications on such systems becomes acritical issue for offering quality-of-service (QoS) guaranteesto time-critical applications on in-vehicle networks. Here, anapplication is referred to a set of tasks with timing constraintsto perform a well-defined function in the vehicle. Each taskrunning in a specified ECU is triggered by messages receivedfrom other tasks and sends messages to its downstream tasks.Consequently, the application can be abstracted as a directedacyclic graph (i.e., task graph) where nodes represents eitherthe tasks or the messages and edges specify the precedencesamong the nodes. For instance, the in-cycle control in a vehicleis triggered when the messages of 4 wheel positions areavailable (broadcast by the corresponding tasks of the wheels)and thereby updates its control outputs (tasks). Given that suchapplications are regularly repeated, the scheduling problem canbe formulated as a periodic task graph scheduling problem.

A number of studies for scheduling in time-triggered sys-tems have been reported. Many existing works mainly focusedon scheduling messages while tasks were neglected [28], [30],[29], [12]. The isolated message scheduling may severelylimit the overall performance and feasibility of all applicationswhich consist of both tasks and messages. A handful ofstudies have studied the holistic scheduling on both tasksand messages on time-triggered systems [20], [13], [18],[19], [21]. However, most of the above mentioned studiesrelied on mathematical programming techniques, which cannotscale to large-scale systems. Due to the sharply increasingamount of software functionality in modern vehicles, efficientand scalable heuristic algorithms are desired. Over the pastdecades, many heuristic algorithms for scheduling task graphsin multiprocessors have been proposed in literature [14], [15],[16], [26], [25], [24]. However, these heuristics were notdesigned for time-triggered in-vehicle networks. Also, mostof the works even neglected the contention on communication

Page 2: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 2

resources.In addition, this paper considers practical needs in system

integration in automotive industries. In practice, applicationsin vehicles are developed and tested by different teams and areintegrated in a later stage. For example, BMW may integratevarious sub-systems (i.e., partial schedules of various softwarefunctionality) offered by its suppliers onto its cars. The partialschedules have been verified by the suppliers so that possiblythe end-to-end delay of a task graph is constrained by bothlower bound and upper bound while in traditional modelsend-to-end delays are only bounded by upper bounds (i.e.,deadlines). Further, possibly the end-to-end delay in a partialschedule is even fixed by the suppliers and cannot be changed;otherwise applications need be tested again. Accordingly, com-plex timing constraints are associated with the applications insystem integration, enhancing the difficulty in schedulability.

Given the practical demands in system design and integra-tion for time-triggered vehicle-carried systems, the previousapproaches may not be directly applied and are likely to sufferfrom severe performance deterioration even if they may berevised to adapt for the novel needs. To this end, this papercontributes a set of novel and scalable heuristic algorithms.

Firstly, this paper proposes a novel scheduling algorithm,referred to as Unfixed Start Time (UST), which flexiblyschedules tasks and messages such that their actual start timesare not fixed during the scheduling. The flexibility offered bythe algorithm is a significant advantage when compared toprevious list scheduling heuristics (e.g., [26], [24], [14]). Also,the contention on communication resources in time-triggeredsystems is explicitly addressed in UST.

In addition, to tolerate assignment conflictions broughtby complex and hard timing constraints and further im-prove schedulability, this paper proposes two reschedulingand backtracking approaches, namely Rescheduling with OffsetModification (ROM) procedure and Backtracking and PriorityPromotion (BPP) procedure. Upon a conflict in time allocation,ROM reschedules the conflicted application with an adjustedoffset (i.e., release time) such that the scheduling of differentapplications can be staggered to resolve conflicts. Once ROMis not helpful, BPP backtracks a number of previously sched-uled applications to create space for the conflicted applicationand reschedules remaining applications with the priority pro-moted for the conflicted application.

The remainder of this paper is organized as follows. SectionII discusses the related work. Section III introduces mathemat-ical models, assumptions, and problem formulation. SectionIV describes the proposed algorithms in great detail. SectionV presents simulation results, with conclusions following inSection VI.

II. RELATED WORK

A number of studies on scheduling in time-triggered in-vehicle networks have been reported in literature. Park etal. [10] proposed a FlexRay network parameter optimizationmethod which can determine the lengths of the static slotand the communication cycle. In [30] and [28], the mes-sage scheduling problems were solved via nonlinear integer

programming (NIP) for static segment and dynamic segment,respectively. In particular, [30] applied a signal packing tech-nique which packs multiple periodic signals into a message;[28] proposed to reserve slots for aperiodic messages so thatflexible medium access of the dynamic segment is preservedwhile QoS assurance can also be guaranteed. Both paper-s formulated NIP and decomposed the NIP problems intointeger linear programming (ILP) problems. Another work[29] transformed the message scheduling problem for thestatic segment into a bin packing problem and again appliedILP to solve it. [32] proposed a heuristic to construct thecommunication schedule on the static segment of FlexRaysystems. However, these papers only focused on messagescheduling and neglected tasks in ECUs. The isolated messagescheduling may severely limit the performance and feasibilityof applications which consist of both tasks and messages. Incontrast, our paper holistically investigates the scheduling ofboth tasks and messages on time-triggered systems.

The holistic scheduling on both tasks and messages hasalso been studied for time-triggered systems [20], [13], [18],[19], [11]. [20] applied constraint logic programming (CLP)to the scheduling and voltage scaling of low-power fault-tolerant hard real-time applications mapped on distributedheterogeneous embedded systems. [18] leveraged geometricprogramming (GP) to assign task and message periods for dis-tributed automotive systems. [19] developed scheduling anal-ysis approaches for hybrid event-triggered and time-triggeredsystems. [31] applied genetic algorithm techniques to solve thescheduling problem for FlexRay systems. The high complexityof solving mathematical programming limits the applicabilityand scalability of such methods.

The scheduling of task graphs in multiprocessors has beenextensively studied in past decades. One widely applied typeof algorithms is list scheduling. A list scheduling heuristicmaintains a list of all tasks according to their priorities. Itthen iterates to pick tasks and schedule them onto selectedprocessors. Some of the examples are the Highest Level First(HLF) [14], Earliest Task First (ETF) [15], Dynamic CriticalPath (DCP) [16], and Mobility Directed (MD) [17] algorithms.As list scheduling approaches can provide high performanceat a low cost, our paper presents algorithms based on listscheduling techniques. DCP is an efficient list schedulingalgorithm for allocating task graphs on multiprocessors tominimize schedule length. One valuable feature of DCP isthat the start times of the scheduled nodes are unfixed untilall nodes have been scheduled. Our UST heuristic also appliesthis feature. The differences between DCP and UST are thatDCP is not a real-time scheduling algorithm and cannot handlecontention of different messages on communication resources,while UST is designed for real-time scheduling and canaddress the contention of different messages on time slots intime-triggered systems.

Another type of heuristic is clustering [26], [25], [24]. Inthis category, tasks are pre-clustered before allocation beginsto reduce the size of the problem. Task clusters (instead of in-dividual tasks) are then assigned to individual processors. [26]presented a clustering-based co-synthesis algorithm, whichschedules periodic task graphs for hardware and software

Page 3: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 3

Fig. 1. A cluster of ECUs on a car

64 communication

cycles

Static slots in SS

1 communication

cycle

0 1 2 …... 6362

SS DS SW NIT

ST slot ST slot ST slot…...

Fig. 2. FlexRay timing hierarchy.

co-synthesis on heterogeneous distributed embedded systems.[25] proposed a period-based approach to the problem ofworkload partitioning and assignment for large distributedreal-time systems. [24] designed a static algorithm for allocat-ing and scheduling components of periodic tasks across sitesin distributed systems. In the problem discussed in this papereach task must be processed in a specific ECU; therefore,clustering may be useless since the tasks have been naturallyclustered by their functionality. In this case, these clusteringheuristics may lose their advantages when dealing with theproblem discussed in this paper.

Optimal methods for some real-time task graph schedulingproblems have also been proposed. [22] proposed an optimalB&B algorithm for allocating communicating periodic tasksto heterogeneous distributed real-time systems. [23] presentedan optimal B&B algorithm for task assignment on multipro-cessors subject to precedence and exclusion constraints. Theseare, however, applicable to only small task graphs.

III. PROBLEM FORMULATION

A. System models

The target platform is a typical time-triggered in-vehiclesystem: a cluster of ECUs (i.e., hosts) that are connected viathe FlexRay bus, as shown in Fig. 1. The operating systemis non-preemptive. Each ECU can process particular taskswhich exchange data via messages transferred on the bus. Theoperation of a FlexRay bus is based on repeatedly executedcommunication cycles with a fixed duration. A FlexRay cyclecomprises a static segment (SS) and other segments suchas a dynamic segment (DS). This paper focus on periodicapplications, which only utilizes the static segment. Fig. 2shows the timing hierarchy of 64 FlexRay cycles with anemphasis on the static segment. Each static segment consistsof a fixed number of equal size static slots. Each static slot ineach each cycle can only be uniquely assigned to one ECU to

N1

N2 N3

N4

N5

N6 N7

N8

ECU 3

ECU 2

ECU 1

ECU 4

Bus

Fig. 3. An example of task graph running on ECUs.

transfer one frame (i.e., message), but each static slot can beassigned to different ECUs in different cycles. The lengths ofstatic slot Ts, static segment Tss, and the communication cycleTc are assumed to be known beforehand as previous papershave shown how to determine these parameters [10], [30].

B. Application Models

This paper assumes a periodic real-time task model whereG = {g1, g2, ..., gJ} is a set of J applications to be processed.Each application is independent from others. 1 Let p(gj)be the period of application gj ∈ G and L be the leastcommon multiple of all p(gj)s. The interval [0, L) is calledthe hyper period. In one hyper period an application invokesI(gj) = L

p(gj)times. Also, one hyper period spans multiple

communication cycles. It suffices to analyze the behavior ofthe whole system only in one hyper period, since it will repeatfor all hyper periods [22].

As shown in Fig. 3, an application can be modeled bya directed acyclic graph (DAG) comprising multiple nodes(i.e., vertexes), which are the smallest units to be scheduled,and edges, which specify precedence constraints. Task graph,DAG and application terms are interchangeably used in thispaper. A node can be either a task (i.e., computation module)running on a particular ECU (e.g., a sensor, or an actuator)or a message (i.e., communication module) exchanged on thecommunication bus. Associated with each node ni is its timecost w(ni) indicating the execution time on an ECU if thenode is task, or the transmission time on the bus if the nodeis a message. In addition, since each ECU has its specificfunction, the host ECU of each task is known beforehandand processor selection appearing in conventional work is notneeded. The host of node ni is specified as H(ni). Further,messages nodes should be fit into static slots on the FlexRaybus. The transmission of a message cannot span two or morestatic slots.

An edge eij linking two nodes nj and ni specifies theprecedence constraint between the nodes. That is, ni shouldcomplete its execution before nj starts. The edges incur notime cost. The source node ni and the destination node nj ofthe edge eij are called parent and child respectively. A nodewithout parents is called an entry node while a node without

1In practice multiple applications may be related in the sense that theyshare some tasks or messages. In this case these related applications aremerged/regarded as one application whose period is the least common multipleof these applications’ periods.

Page 4: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 4

children is called an exit node. Also, once ni is scheduled ontoH(ni), prev(ni) is the node scheduled immediately before ni

and next(ni) is the node scheduled immediately after ni onH(ni). Moreover, a node ni that must be finished before thestart of another node nj is called an ancestor of nj , and nj iscalled an offspring of np. Hence, the ancestors of ni’s parentsand prev(ni) are also ni’s ancestors; the offspring of ni’schildren and next(ni) are also ni’s offspring.

Each application has an offset o(gj), which indicates thestart time of each invocation of gj in one hyper period. Thatis, the start time of the k-th invocation of gj is o(gj)+k∗p(gj)where k = 0, 1, ..., I(gj) − 1. The offset of each applicationmay vary between [0, p(gj)). By default o(gj) is set as zeroand it will be determined via the scheduling algorithm. Eachnode ni may have a release time (i.e., input earliest start time,ESTR(ni)). The k-th invocation of a node ni (i.e., nk

i ) cannotstart before ESTR(ni) + o(gj) + k ∗ p(gj), where gj is theapplication containing ni. Also, each node ni may have adeadline d(ni). The k-th invocation of a node ni cannot finishafter d(ni)+o(gj)+k ∗p(gj). The release time and deadlinesdenote the timing constraints imposed by schedule design andintegration.

C. The Scheduling Problem

The main objective is to schedule all nodes in all invocationsof all applications in one hyper period to guarantee thatall invocations of all applications can satisfy their respectivedeadlines. Once this goal can be achieved, the scheduler mayaim to minimize the length of the static segment which isactually used, denoted as Tu

ss, i.e., to minimize the number ofused slots in the static segment. The unused bandwidth caneither be used by the dynamic segment or be reserved forfurther schedule extension.

IV. THE PROPOSED ALGORITHMS

This section describes the proposed algorithm whose pseudocode is shown in Algorithm 1. The algorithm works byiteratively selecting applications and scheduling individualnodes in the selected applications via UST, while ROM andBPP serve as complements to enhance the schedulability ofthe applications. The major components and their features ofthe algorithm are summarized as follows:

• Section IV-A introduces two attributes: earliest start time(EST) and latest start time (LST), which are assigned toeach node and will be used by UST described below.

• Section IV-B describes the application selection proce-dure, which orders and selects applications for schedul-ing.

• Section IV-C details the UST scheduling heuristic, whichflexibly schedules nodes of each selected application.When the nodes are being scheduled (i.e., ordered), thestart times of the scheduled nodes are not fixed. Theunfixed scheduling policy offers more opportunities toinsert nodes into proper positions between schedulednodes.

• Section IV-D presents ROM. Upon a confliction in timeallocation, ROM reschedules the conflicted application

Parameter DefinitionCPL(gi) the critical path length of application gjd(gj) relative deadline of application gjd(ni) relative deadline of node ni

eij edge linking two nodes ni and nj

H(ni) the host (ECU or bus) of node ni

L length of a hyper periodni i-th node in a given applicationnki k-th invocation of i-th node in a given application

p(gj) period of application gjrank(gj) the rank of graph gjTc length of a bus cycleTs length of a slot in the static segment of the busTss length of the static segmentw(ni) time cost of node ni

Variable DefinitionEST (nk

i ) the earliest start time of node nki

ESTG(nki ) EST value constrained by nk

i ’s parentsESTP (nk

i ) EST value constrained by prev(nki )

ESTR(ni) release time of node ni

ESTR(nki ) EST value constrained by input requirements

EST (nki ,m) EST value of nk

i after it is inserted into m-th positionLST (nk

i ) the latest start time of node nki

LSTG(nki ) LST value constrained by nk

i ’s childrenLSTP (nk

i ) LST value constrained by next(nki )

LSTR(nki ) LST value constrained by input requirements

LST (nki ,m) LST value of nk

i after it is inserted into m-th positionnext(nk

i ) next node of ni

o(gj) the offset of application gjRM(nk

i ) relative mobility of ni

prev(nki ) previous node of ni

priority(gj) priority of application gjST (nk

i ) start time of nki

Tuss length of the static segment which is actually used

TABLE INOTATIONS AND TERMINOLOGY

with an adjusted offset such that the scheduling of differ-ent applications can be staggered to avoid conflictions.

• Section IV-E describes BPP. Once ROM cannot helpto eliminate conflictions, BPP promotes the priorityof the conflicted application and backtracks previouslyscheduled applications to create space for the conflictedapplication.

• Section IV-F presents a bandwidth optimization pro-cedure. Once all nodes are successfully ordered, thescheduler determines a final schedule that can optimizethe bandwidth utilization of the bus while the deadlinerequirements of all scheduled nodes are still satisfied.

A. EST and LST

Since the nodes are not allocated fixed start times, twoattributes are introduced for each node: earliest start time(EST) and latest start time (LST), which are the lower boundand upper bound on the start time of a node. The EST andLST of a node can reflect its mobility since its actual starttime can slide between its EST and LST. Each invocation ofa node is separately scheduled. Hence, each node nk

i (i.e., k-th invocation of node ni) has its own EST and LST. In thefollowing, the EST and LST of node nk

i belonging to gj arederived.

Page 5: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 5

n5ECU 1

n1

n2

n0

n3

n6

n4

node

size

EST

LST

10

n1n0 n2 n3 n4 n6n5

5

108

2 7

2

40 3050

NA

NA

NA

NA

NA

NA

NA NA

NA?

?

Fig. 4. An example for calculating EST and LST of node n0.

The EST of a node nki is defined as:

EST (nki ) = max{ESTR(nk

i ), ESTG(nki ), ESTP (nk

i )}(1)

where ESTR(nki ) is the EST value constrained by input

requirements; ESTG(nki ) is the EST value constrained by

nki ’s parent nodes; ESTP (nk

i ) is the EST value constrained byprev(nk

i ). By default o(gj) is set as zero and it can be modifiedin Section IV-D. One can write ESTR(nk

i ) as follows:

ESTR(nki ) = ESTR(ni) + o(gj) + k ∗ p(gj) (2)

If ESTR(ni) is not specified, ESTR(ni) = 0. Also, one canwrite ESTG(nk

i ) as follows:

ESTG(nki ) = max

1≤p≤P{EST (nikp

) + w(nikp)} (3)

where nki has P parents and nikp

is the p-th parent node. Ifnki is an entry node, then ESTG(nk

i ) = o(gj) + k ∗ p(gj).Equation (3) states that the EST of a node nk

i is no greaterthan the earliest ready time of all its parents. ESTP (nk

i ) is theearliest finish time of the node that is scheduled immediatelybefore nk

i on the same host and can be written as:

ESTP (nki ) = EST (prev(nk

i )) + w(prev(nki )) (4)

If nki is scheduled as the first node on the processor,

ESTP (nki ) = 0. In addition, if nk

i has not been scheduledonto its host, ESTP (nk

i ) = 0.Fig. 4 shows an example for calculating EST and LST of a

node n0 where the superscript k is omitted and ESTR(n0) isgiven as zero. In this example, only a small part of a wholeapplication, i.e., only directly related nodes to n0, are depicted.Nodes n1 and n2 are n0’s parents and nodes n3 and n4 areits children; n5 and n6 are scheduled immediately before andafter n0, respectively on n0’s hosted ECU. The table in Fig. 4provides all required information for calculating n0’s EST andLST, i.e., the sizes, EST, and LST of the above nodes. Accord-ing to Equations (3) and (4), ESTG(n0) = max{EST (n1)+w(n1), EST (n2) + w(n2)} = max{5 + 8, 2 + 10} = 13;ESTP (n0) = EST (n5)+w(n5) = 7+2 = 9. Consequently,EST (n0) = max{ESTR(n0), ESTG(n0), ESTP (n0)} =max{0, 13, 9} = 13.

One cycle

SS

ST slot ST slot…... ST slot …...ST slot

n2

n2 n4

n4

ni Message niEST/LST before

mapped

EST/LST after

mapped

n1

n1 n3

n3

ST slot

LST(n1) LST(n3) EST(n4)EST(n2)

Fig. 5. Examples for calculating EST and LST for messages.

If nki is a message node, EST (nk

i ) is tailored so that themessage can be fit into a slot in the communication bus. LetST slot(t) be the start time of the slot in which time t resides.

ST slot(t) = ⌊ t

Tc⌋Tc + ⌊

t mod Tc

Ts⌋Ts (5)

Once EST (nki ) is computed in Equation (1), it can be tailored

for a message node as:

EST (nki ) =

⌈EST (nk

i )

Tc⌉Tc case 1

ST slot(EST (nki )) + Ts, otherwise

(6)

where case 1 is that EST (nki ) computed in Equation (1) falls

outside the range of static segments (EST (nki ) mod Tc >

Tss and EST (nki ) +w(ni) mod Tc > Tss). Thus EST (nk

i )is mapped to the start time of the first static slot of the nextcommunication cycle. Fig. 5 shows examples for mappingthe EST of message nodes into static slots, where ESTT

denotes the EST value computed in Equation (1) and ESTM

denotes the mapped EST value in Equation (6). In Fig. 5, themapping of message n4 shows this case. Otherwise, EST (nk

i )is mapped to the start time of the next static slot, as shownby message n2 in Fig. 5.

EST (nki ) can be computed once the EST of all nk

i ’s parentsand prev(nk

i ) are known. Hence, the EST of all nodes canbe calculated by traversing the DAGs in a top-down mannerbeginning from the entry nodes that are not scheduled orare scheduled as the first nodes on their respective hosts.Consequently, when all the EST of nk

i ’s parents and prev(nki )

are available, the EST of nki can be computed.

The LST of a task node nki is defined as follows:

LST (nki ) = min{LSTR(nk

i ), LSTG(nk

i ), LSTP (nk

i )} (7)

where LSTR(nki ) is the LST value constrained by input

requirements; LSTG(nki ) is the LST value constrained by

nki ’s children; LSTP (nk

i ) is the LST value constrained bynext(nk

i ). One can write LSTR(nki ) as follows:

LSTR(nki ) = o(gj) + k ∗ p(gj) + d(ni)− w(ni) (8)

Page 6: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 6

If d(ni) is not specified, LSTR(nki ) =∞. Also, one can write

LSTG(nki ) as follows:

LSTG(nki ) = min

1≤q≤Q{LST (nikq

)− w(ni)} (9)

where nki has Q children and nikq

is the q-th child. If nki is an

exit node, LSTT (nki ) =∞.

LSTP (nki ) is constrained by the start time of next(nk

i ).Accordingly, one can write ESTG(nk

i ) as:

LSTP (nki ) = LST (next(nk

i ))− w(ni) (10)

If nki has not been scheduled or nk

i is scheduled as the lastnode on its host, LSTP (nk

i ) =∞.In the example of Fig.4, LSTR(n0) is given as∞; LSTG(n0) = min{LST (n3) − w(n0), LST (n4) −w(n0)} = min{50 − 10, 40 − 10} = 30, LSTP (n0) =LST (n6) − w(n0) = 30 − 10 = 20. As a result,LST (n0) = min{LSTR(n0), LST

G(n0), LSTP (n0)} =

min{∞, 30, 20} = 20.If nk

i is a message node, one can tailor LST (nki ) for a

message node after it is computed in Equation (7) as:

LST (nki ) =

⌊LST (nk

i )

Tc⌋Tc + Tss − w(ni), case 1

ST slot(LST (nki )) + Ts − w(ni), otherwise

(11)where case 1 is that LST (nk

i ) computed in Equation (7) fallsoutside the range of static segments. Thus LST (nk

i ) is mappedto the last static slot of the last communication cycle. Fig. 5shows examples for mapping the LST of message nodes intostatic slots, where LSTT denotes the LST value computed inEquation (7) and LSTM denotes the mapped LST value inEquation (11). In Fig. 5, the mapping of message n3 showsthis case. Otherwise, LST (nk

i ) is mapped to the last static slot,as shown by message n1 in Fig. 5. Similar to the computationof EST (nk

i ), LST (nki ) can also be computed by traversing

the task graphs in a bottom-up manner.

B. Application Selection

The algorithm iterates to schedule all nodes of all invoca-tions of each application. Since it is favoured to first schedulehard applications, the first step is to obtain the priorities ofthe applications and order them according to their priorities.The priority of an application gj (denoted as priority(gj)) isinitially set as the rank of gj , which is defined as:

rank(gj) =p(gj) + d(gj)

CPL(gj)(12)

where CPL(gj) is the critical path length of the task graphand is defined as:

CPL(gj) = maxi{EST (n0

i ) + w(ni)} (13)

In addition, d(gj) is the relative deadline of gj which repre-sents its overall urgency (i.e., hardness of timing constraints)and d(gj) is defined as:

d(gj) = minni∈gj

{d(ni)− LST (n0i )} (14)

Hence, rank(gj) can be obtained after EST (n0i ) and

LST (n0i ) are calculated via Equations (1) and (7) for all

nodes. The intuition to set rank(gj) as the initial priority isthat a longer critical path length probably means that the graphis harder to schedule within limited space while a longer periodand a longer deadline usually implies larger space for thenodes in the graph to be flexibly scheduled. It may be noticedthat the priority can be modified as described in Section IV-E.The task graphs are sorted by the ascending order of theirpriorities. Accordingly, a task graph with the smallest priorityis first selected for scheduling (Line 7 of Algorithm 1).

C. Node Scheduling (The UST Algorithm)

The UST algorithm flexibly schedules all nodes of all invo-cations of a selected application gj (Lines 8-14 of Algorithm1). When the nodes are being scheduled, the start times of thescheduled nodes are not fixed. Hence, the nodes are actually“clustered” together in a linear order. The unfixed schedulingpolicy offers more opportunities to insert nodes into properpositions between scheduled nodes. The flexibility offered bythe algorithm is a significant advantage when compared toprevious list scheduling algorithms (e.g., [26], [24], [14]) thatassign fixed start times in the process of scheduling.

Since the start time of the scheduled nodes are not fixedwhen they are being scheduled, the scheduled nodes areactually ordered on their hosts. The only constraint is that thetotal order among the scheduled nodes will not be affected bythe subsequent scheduling. While preserving the linear order ofthe scheduled nodes, the EST and LST values of the nodes canbe updated in each round of node scheduling (i.e., ordering).

The algorithm iterates two steps, a node selection step fordynamically selecting nodes, and a node insertion step forscheduling selected nodes onto their hosts. The node with thesmallest relative mobility value in gj is selected for scheduling(Line 11 of Algorithm 1). The relative mobility of a nodeRM(nk

i ) is defined as:

RM(nki ) =

LST (nki )− EST (nk

i )

w(ni)(15)

Once a node nki is selected, it will be scheduled on its host

H(ni). Suppose a set of M nodes {n0, ..., nM−1} have beenscheduled on H(ni). Hence nk

i may be scheduled onto M+1positions, i.e., position m ∈ [0,M ] between two consecutivelyscheduled nodes nm−1 and nm. Virtual nodes n−1 and nM

are used for the convenience of denoting the first and the lastslots. For virtual nodes n−1 and nM , let EST (n−1) = 0,w(n−1) = 0, LST (nM ) = L, and w(nM ) = 0. In order notto violate the precedence constraints among nodes, nk

i mustnot be scheduled before its ancestors, or after its offsprings.If a position satisfies this constraint, it is called a candidateposition. Let EST (nk

i ,m) and LST (nki ,m) denote the re-

spective EST and LST values of nki if it is scheduled onto

m-th position on H(ni) (i.e., between nodes nm−1 and nm).One can write EST (nk

i ,m) as:

EST (nki ,m) = max{ESTG(nk

i ), EST (nm−1) +w(nm−1)}(16)

Page 7: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 7

Also, one can write LST (nki ,m) as:

LST (nki ,m) = min{LSTG(nk

i ), LST (nm)− w(ni)} (17)

Theorem 1: If the current partial schedule of a set of nodesS is feasible, after a new node nk

i is scheduled onto a candidateposition m on H(ni), the new partial schedule for S′ ← S ∪{nk

i } is still feasible provided:

LST (nki ,m)− EST (nk

i ,m) ≥ 0 (18)

Proof: For the convenience of proof, insert nki on position

m and accordingly update nki ’s ancestors and offspring. In S,

any node nj’s start time can be feasibly set as nj’s EST ifall nj’s ancestors start time is set as their EST. Similarly, inS any node nj’s start time can be feasibly set as nj’s LSTif all nj’s offspring’s start time is set as their LST. In thiscase, after recursively setting all nk

i ’s ancestors’ start time astheir EST and setting all nk

i ’s offspring’s start time as theirLST, the schedulability of all nodes in S are kept. After-wards, nk

i can be scheduled on position m between the range[EST (nk

i ,m), LST (nki ,m)] if LST (nk

i ,m) > EST (nki ,m).

Among all candidate positions satisfying Equation (18), nki

is inserted into the one that can maximize LST (nki ,m) −

EST (nki ,m) (Lines 12-14 of Algorithm 1). That is, nm−1

becomes the previous node of nki (prev(nk

i )) if it exists, andnm becomes the next node of nk

i (next(nki )) if it exists. Such

a position can help to preserve the flexibility of nki and may

ease the scheduling of latter nodes.After scheduling the node, the algorithm updates EST and

LST for all nodes and continues selecting and schedulingnodes. By iterating these steps (Lines 9-14 of Algorithm 1), allnodes in gj can be ordered accordingly. Afterwards, anotherapplications is selected for scheduling. Once all applicationsare successfully scheduled, a final schedule is produced bysimply setting the start time of each node, defined as ST (nk

i ),as ST (nk

i )← EST (nki ) (Line 35 of Algorithm 1).

D. Rescheduling with Offset Modification (ROM)

Due to the complex timing constraints in system integration,conflicts may frequently occur in node assignment, especiallywhen the offset (release time) of each application is limitedto be zero. It may be noticed that in many prior studies(e.g., [22], [23], [26]), offsets were simply fixed as zero,which might incur poor schedulability. If multiple applicationscan start at different offsets such that the time allocationsof different applications can be staggered, the schedulabilitycan be improved even under complex timing constraints.To this end, this paper designs the ROM approach, whichreschedules conflicted applications with adjusted offsets toavoid the conflicts (Lines 24-29 of Algorithm 1).

Recall that the offset of each application is initially set aszero. Once no feasible position can be found for schedulingnki via UST, conflictions in time allocation have occurred. To

eliminate conflictions, ROM is applied to reschedule gj to anew offset o(gj) such that nk

i can be inserted into a slack (i.e.,

Algorithm 1 The Scheduling Algorithm1: Input: a set of J applications2: Output: a schedule for the applications, i.e., start times

(ST (nki )) are determined for all nodes of the applications

3: ∀gj , compute rank(gj) and initialize priority(gj)4: sort all applications by ascending order of priority(gj)5: outerLoop:6: while not all applications are scheduled do7: pick next application gj from the application list for

scheduling8: while not all nodes of all invocations of gj are sched-

uled do9: update EST and LST for all nodes via Equations (1),

(6), (7), and (11)10: update ancestors and offspring for all nodes11: select a node nk

i with the smallest RM(nki )

12: find a position m that maximizes LST (nki ,m) −

EST (nki ,m) among all candidate positions

13: if the position is found then14: schedule nk

i in the position15: else if cntres > maxres or a feasible δm is not found

then16: cntres ← 017: if exit conditions are fulfilled then18: exit without a feasible solution19: end if20: cntback ← cntback + 121: execute a long-distance backtrack22: update priority(gj) via Equation(21)23: continue outerLoop:24: else25: cntres ← cntres + 126: update o(gj) via Equation(20)27: backtrack all nodes of all invocations of gj28: continue outerLoop:29: end if30: end while31: remove gj from the application list32: end while33: update EST and LST for all nodes34: if required, call Algorithm 2 to optimize bandwidth35: ∀nk

i , ST (nki )← EST (nk

i )

capable) slot on H(ni). The slackness of m-th slot is definedas:

δ(m) = LST (nm)−w(ni)−EST (nm−1)−w(nm−1) (19)

Actually δ(m) is the difference between the EST specified bynm−1 and LST specified by nm for nk

i . If δ(m) < 0, the slotcannot hold nk

i . But if any candidate position m exists suchthat δ(m) ≥ 0, the algorithm will modify o(gj) as:

o(gj) = o(gj) + (EST (nm−1) + w(nm−1) + LST (nm)

− w(ni)− ESTG(nki )− LSTG(nk

i ))/2. (20)

where m is the position that δ(m) is the maximum among allcandidate positions. Such an update enables that the mobility

Page 8: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 8

of nki given by its parents and children (i.e., LSTG(nk

i ) −ESTG(nk

i )) probably fits m-th slot in the following runs.Then, all scheduled nodes in gj are backtracked, i.e., they

are now unscheduled. Afterwards, the algorithm continues thenode scheduling procedure to reschedule gj .

E. Long-Distance Backtrack and Priority Promotion (BPP)

Once ROM is not helpful, BPP backtracks previously sched-uled task graphs to create space for the failed one (Lines 15-23of Algorithm 1). The backtracking technique is widely usedin exhaustive methods (e.g., branch and bound (B&B)) [22],[23] which are, however, applicable to only small task graphs.Accordingly, some prior work [27] limited the number/level ofbacktracks to refrain time consumption. Since only one nodewas backtracked in each step, the limited local exhaustivesearch in such papers is probably ineffective for large taskgraphs.

In contrast, to make a trade-off between time and perfor-mance, BPP may backtrack multiple applications (rather thanone node) at one time depending on previous progresses. Thatis, if the total number of offset modification and reschedulingfor the failed application gj (denoted as cntres) reaches a pre-defined limit (denoted as maxres) or a feasible δm cannot befound, the algorithm executes a long-distance backtrack, whichnot only backtracks gj , but also backtracks multiple previouslyscheduled applications to create space for gj . The number ofapplications backtracked, denoted as backlimit, is initially setas 1. If gj has ever failed previously, backlimit is doubled;otherwise it is reset. For each backtracked application, allnodes are backtracked. The algorithm repeatedly backtrackscheduled applications from the tail of the scheduled list untila number of backlimit applications have been backtracked orthe scheduled list is empty.

In addition, according to Equation (12), priority(gj) ≤ 2and an application with priority(gj) = 2 has the highestpriority. Hence the priority of gj is updated as:

priority(gj) = priority(gj)/2 + 1 (21)

This significantly boosts the priority of gj , which is probablyhard to schedule, and places it into a front position forscheduling in the next run. Afterwards, the algorithm continuesto select applications and scheduling nodes via UST. Thealgorithm terminates once a feasible solution is found orthe following conditions are fulfilled. All recently NF failedapplications have ever failed before or the total number oflong-distance backtracks cntback reaches maxback. In oursimulations, NF is set as 5 and maxback is set as 20.

F. Schedule Determination with Bandwidth Optimization

This subsection provides an approach to derive a schedulewith bandwidth optimization which can be used once suchoptimization is needed (Line 34 of Algorithm 1). Algorithm 2depicts the pseudo code of the bandwidth optimization method.After all nodes are successfully ordered in Algorithm 1,Algorithm 2 determines a feasible schedule that can minimizeTuss. Since Tu

ss is a multiple of Ts, there are only limitedchoices for Tu

ss as Tss < Tc. In this case, a binary search

Algorithm 2 Schedule Determination with Bandwidth Opti-mization

1: Thighss ← Tmax

ss

2: T lowss ← Ts

3: while true do4: if T low

ss + Ts < Thighss then

5: Tuss ← Ts⌊T

lowss +Thigh

ss

2Ts⌋

6: update EST and LST for all nodes7: if ∀ni, EST (ni) ≤ LST (ni) then8: Thigh

ss ← Tuss

9: else10: T low

ss ← Tuss

11: end if12: else13: break14: end if15: end while16: Tu

ss ← Thighss

17: update EST and LST for all nodes

4 8 12 16 200

0.5

1

1.5

2

2.5x 10

4

Number of ECUs

Nor

mal

ized

Tim

e C

ost o

f ILP

easymiddlehard

Fig. 7. Normalized time cost of ILP.

approach is applied to search for the minimum Tuss that is

feasible for a schedule. Let T lowss denote the currently largest

infeasible value of Tuss and let Thigh

ss denote the currentlysmallest feasible value of Tu

ss. Since a successful scheduleexists when Tss = Tmax

ss , initially let Thighss = Tmax

ss andT lowss ← Ts. The while loop in Algorithm 2 iteratively updates

T lowss and Thigh

ss and searches for a feasible Tuss among the

range (T lowss , Thigh

ss ) by updating EST and LST for eachchecked Tu

ss. If a candidate Tuss is feasible, after EST and

LST are updated for all nodes, EST (ni) ≤ LST (ni) holdsfor each node ni. Finally, the actual start time of each nodeis set as its EST updated after setting Tu

ss ← Thighss (Lines 16

and 17 of Algorithm 2).

V. PERFORMANCE EVALUATION

In order to assess the effectiveness of the proposed schedul-ing algorithm, this section presents a performance evaluationstudy for scheduling a number of real-time applications (i.e.,

Page 9: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 9

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

Number of ECUs

Suc

cess

Rat

io

ILPUST−ROM−BPP

(a) Easy experiment

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of ECUs

Suc

cess

Rat

io

ILPUST−ROM−BPP

(b) Middle experiment

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of ECUs

Suc

cess

Rat

io

ILPUST−ROM−BPP

(c) Hard experiment

Fig. 6. Success ratio for the comparison of ILP and UST-ROM-BPP.

task graphs). The success ratio is used as the major perfor-mance metric. It is defined as the the number that an algorithmsuccessfully schedules all application to the number of totalexperiments.

The system configurations are set as follows: A set ofsynthetic applications are randomly generated based on real-istic cases. Basic parameters including the periods, deadlines,and topology of the applications and the sizes of tasks andmessages are randomized according to sampled values fromindustrial cases. Specifically, the period of each applicationis varied among [5ms, 10ms, 20ms, 40ms]. The length ofone hyper schedule period is thus 40ms. The duration of acycle of the communication bus is 5ms and the duration ofthe available static segment per cycle is 3.75ms. The durationof a communication slot is set as 0.0625ms. The average costof a task is 2ms. Experiments with three different difficulties,easy, middle and hard, are conducted. For each difficultylevel, one figure with five data points is plotted to exhibit theperformance of a set of algorithms on different system scalesto evaluate the scalability of the algorithms. In the followingfigures of results, the horizontal axis marks the number ofECUs, which is varied among the range [4, 8, 12, 16, 20].That is, the number of ECUs on the horizontal axis denotesthe scale of the experiments as the number of ECUs and thenumber of nodes simultaneously grows in each experiment.

Since the proposed algorithms comprise three major parts(i.e., UST, ROM, and BPP), to understand the merits of ouralgorithms, the results of three algorithm combinations areseparately presented. The first algorithm, denoted as UST, onlyenables UST and disables both ROM and BPP. The secondalgorithm, denoted as UST-ROM, enables UST and ROM anddisables BPP. The third algorithm, denoted UST-ROM-BPP,enables all three proposed approaches.

As a first case, UST-ROM-BPP is compared with an ILPsolution formulated in [13]. In the ILP formulation an eCos-based operating system and the FlexRay 3.0 model are applied.The ILP formulation is then solved by the CPLEX ILP solver[33]. Since ILP is very time-consuming and thousands of inputcases are simulated, a time-out of one hour is set for ILPto guarantee that the simulations can stop within acceptabletime. As the results below show, the proposed algorithm candeliver more competitive performance within few seconds,

which renders the one-hour timeout for ILP sufficiently longfor performance comparison. In this case, as the scale of ex-periments increases, ILP may not deliver the optimal solutionwithin the time-out. The results on three difficulty levels areshown in Fig. 6. Among the three experiments, the numberof nodes per ECU is the largest and deadlines are the mosturgent in the hard experiment, while in the easy experimentthe number of nodes per ECU is the smallest and deadlinesare the least urgent. The average ratio of deadline to period ofeach application is 0.82, 0.71, and 0.6, for easy, middle, andhard cases, respectively.

From Fig. 6 one can observe that UST-ROM-BPP outper-forms ILP in the easy and middle experiments. Specifically, asthe number of ECUs increases, the performance gap betweenUST-ROM-BPP and ILP significantly enlarges, which is dueto the fact that ILP is unscalable. As the number of ECUsincreases, it becomes more difficulty for ILP to search for so-lutions within the timeout. Such gaps do not exist in Fig. 6(c),showing that both UST-ROM-BPP and ILP are hindered inhard cases. Also, Fig. 7 shows the time cost of ILP normalizedto the time cost of UST-ROM-BPP in the three experiments.As Fig. 7 shows, UST-ROM-BPP consumes much less timethan ILP, i.e., the time consumed by ILP is about 1000 -10,000 times of the time consumed by UST-ROM-BPP. Sincethe performance of UST-ROM-BPP is at least as good as ILPin Fig. 6, the advantages of UST-ROM-BPP over ILP in speedand efficiency are quite obvious.

As ILP is unscalable, in the following experiments theproposed algorithms are compared with 3 peer list schedulingheuristics, ETF [15], HLF [14], MD [17], which are adaptedfrom previous algorithms. Because HLF outperforms ETF andMD in our experiments, to further evaluate the effectivenessof the proposed algorithms, by replacing UST with HLFin UST-ROM and UST-ROM-BPP, another two algorithmcombinations, HLF-ROM and HLF-ROM-BPP, are generated.In HLF-ROM, HLF is used for node scheduling and ROM istuned to adapt HLF. In HLF-ROM-BPP, both ROM and BPPare enabled. By comparing HLF, HLF-ROM, HLF-ROM-BPP,UST, UST-ROM, and UST-ROM-BPP, one can evaluate thebenefits of UST, ROM, and BPP.

Then, experiments with three different difficulties, easy,middle, and hard, are conducted and the results are shown

Page 10: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 10

in Fig. 8. The average ratio of deadline to period of eachapplication is 0.82, 0.77, and 0.7, for easy, middle, and hardcases, respectively. It may be noticed that the inputs for theseexperiment are easier than those of the first experiments forcomparing UST-ROM-BPP and ILP because the performanceof the peer list scheduling algorithms is much poorer thanUST-ROM-BPP and ILP.

The following observations are made from Fig. 8. Firstly,UST-ROM-BPP significantly delivers the best performanceamong all evaluated algorithms. Specifically, for the middleexperiment (Fig. 8(b)), the performance gap between UST-ROM-BPP and others is huge. That is, the success ratio ofUST-ROM-BPP is kept above 0.7 while for other algorithmsthe success ratio is no larger than 0.25. Similarly, for thehard experiment (Fig. 8(c)), the success ratio of UST-ROM-BPP is kept above 0.3 while for other algorithms the successratio is no larger than 0.1. These demonstrate the effectivenessof the proposed three approaches. Secondly, UST constantlyoutperforms HLF, ETF, and MD on success ratio by a clearmargin. This demonstrates that the unfixed start time ofUST offers more opportunities to flexibly insert nodes intoproper positions between scheduled nodes and thus great-ly enhances overall schedulability. Thirdly, UST-ROM andUST-ROM-BPP outperform their counterparts, HLF-ROM andHLF-ROM-BPP, respectively. These again support the aboveconclusion that UST is advantageous in node scheduling.Fourthly, UST-ROM and HLF-ROM outperform UST andHLF, respectively. This demonstrates the effectiveness of ROMin enhancing schedulability. Fifthly, UST-ROM-BPP and HLF-ROM-BPP outperform UST-ROM and HLF-ROM, respective-ly. This demonstrates the effectiveness of BPP in enhancingschedulability. Finally, the above observations are consistentamong three different difficulties. These further demonstratethe effectiveness of the proposed approaches.

The time cost to achieve high performance is not free.Fig. 9 shows the corresponding time cost of the algorithmsfor the easy experiment (i.e., Fig. 8(a)). It is shown thatUST, UST-ROM and UST-ROM-BPP require much moretime than other algorithms. UST-ROM-BPP, which outperformothers in success ratio, consumes the most time among allevaluated heuristic algorithms. Nevertheless, UST-ROM-BPPis still quite scalable when its time cost is compared to that ofILP, as shown in Fig. 7. Due to limited space, only the timecost of the easy experiment is shown in the paper and the timecost of other experiments are quite similar to this one.

Fig. 10 depicts the bandwidth saved (i.e., 1− Tuss

Tss) by UST-

ROM-BPP in the above three experiments (i.e., Fig. 8). It isshown that the algorithm saves up to 17% of bandwidth in theexperiments. Specifically, the algorithm saves less bandwidthin harder cases. This may be due to the fact that timingconstraints are more urgent in harder cases, which limits theroom for bandwidth optimization. In addition, as the number ofECUs increases, the bandwidth that can be saved decreases. Aplausible explanation is that when the number of ECUs grows,there are more time constraints, which may limit the space forbandwidth optimization.

In the above experiments, each application has only onedeadline. To evaluate the performance of the algorithms under

4 8 12 16 2010

0

101

102

103

104

105

Number of ECUs

Ave

rage

Tim

e C

ost (

in m

s)

USTUST−ROMUST−ROM−BPPMDETFHLFHLF−ROMHLF−ROM−BPP

Fig. 9. Average time cost of the heuristics.

4 8 12 16 200.02

0.04

0.06

0.08

0.1

0.12

0.14

0.16

0.18

Number of ECUs

Ban

dwid

th S

avin

g R

atio

easymiddlehard

Fig. 10. Bandwidth saving ratio of UST-ROM-BPP.

complex timing constraints, in the following two experiments,the input cases of the above easy experiment are reused whilecomplex timing constraints are added. Fig. 11 shows thecorresponding success ratio of the two experiments. In thefirst one (Fig. 11(a)), 50% of entry and exit nodes and 20% ofnormal task nodes have constrained release time and deadlines.In the second experiment (Fig. 11(b)), 40% of entry and exitnodes have constrained release time and deadlines and another15% of entry and exit nodes have given start times, i.e., therelease time is equal to the deadline for such nodes.

The results in Fig. 11 basically support the observationsmade from Fig. 8. In addition, by comparing Fig. 11 with Fig.8(a), one can observe that the degradation of success ratio ofUST-ROM-BPP is smaller than that of UST and UST-ROM.This demonstrates that ROM and BPP can effectively tolerateconflictions brought by complex timing requirements.

VI. CONCLUSIONS

This paper has studied an important scheduling problemfor holistically handling both tasks and messages in time-triggered automotive systems. This paper has formulated novel

Page 11: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 11

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of ECUs

Suc

cess

Rat

io

USTUST−ROMUST−ROM−BPPMDETFHLFHLF−ROMHLF−ROM−BPP

(a) Easy experiment

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of ECUs

Suc

cess

Rat

io

USTUST−ROMUST−ROM−BPPMDETFHLFHLF−ROMHLF−ROM−BPP

(b) Middle experiment

4 8 12 16 200

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

Number of ECUs

Suc

cess

Rat

io

USTUST−ROMUST−ROM−BPPMDETFHLFHLF−ROMHLF−ROM−BPP

(c) Hard experiment

Fig. 8. Results for the comparison of the heuristics.

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

Number of ECUs

Suc

cess

Rat

io

USTUST−ROMUST−ROM−BPPMDETFHLFHLF−ROMHLF−ROM−BPP

(a) Type 1

4 8 12 16 200

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

Number of ECUs

Suc

cess

Rat

io

USTUST−ROMUST−ROM−BPPMDETFHLFHLF−ROMHLF−ROM−BPP

(b) Type 2

Fig. 11. Success ratio of experiments with complex timing constraints.

models for practical system design and integration in auto-motive industries. This paper has presented the UST algo-rithm that schedules tasks and messages in a flexible wayto enhance schedulability. In addition, to tolerate assignmentconflictions brought by complex timing constraints and furtherimprove schedulability, this paper proposes the ROM andBPP procedures. The simulation results have shown that theproposed approaches significantly outperform ILP and priorpeer heuristics for various settings.

REFERENCES

[1] N. Navet, Y. Song, F. Simonot-Lion, and C. Wilwert, “Trends in Au-tomotive Communication Systems,” Proc. IEEE, vol. 93, pp. 1204-1224,2005.

[2] CAN in automation. http://www.can-cia.org/can/[3] TTCAN. http://www.can-cia.org/can/ttcan/.[4] “The flexray communication system specification, version 3.0.1,”

http://www.flexray.com.[5] H. Kopetz and G. Bauer, “The time-triggered architecture,” Proc. IEEE,

vol. 91, no. 1, pp. 1120-126, 2003.[6] M. Bertoluzzo, G. Buja, and A. Zuccollo, “Design of drive-by-wire

communication network for an industrial vehicle,” in Proc. IEEE Int. Conf.Ind. Informat., pp. 155-160, Jun. 2004.

[7] J. Broy and K. Muller-Glaser, “The impact of time-triggered communica-tion in automotive embedded systems,” in Proc. IEEE Symp. Ind. Embed.Syst., pp. 353-356, 2007.

[8] M. Short and M. Pont, “Fault-tolerant time-triggered communicationusing CAN,” IEEE Trans. Ind. Informat., vol. 3, no. 2, pp. 131-142, May2007.

[9] K. C. Lee, M. H. Kim, S. Lee, and H. H. Lee, “IEEE-1451-based smartmodule for in-vehicle networking systems of intelligent vehicles,” IEEETrans. Ind. Electron., vol. 51, no. 6, pp. 1150-1158, Dec. 2004.

[10] I. Park and M. Sunwoo, “FlexRay network parameter optimizationmethod for automotive applications,” IEEE Trans. Ind. Electron., vol.58,no. 4, pp. 1449-1459, Apr., 2011.

[11] H. Zeng, , M.D. Natale, A. Ghosal, and A. Sangiovanni-Vincentelli.“Schedule optimization of time-triggered systems communicating over theFlexRay static segment,” IEEE Trans. Ind. Informat., vol. 7, no. 1, pp.1-17, Jan. 2011.

[12] B. Tanasa, U.D. Bordoloi, P. Eles, and Z. Peng, “Scheduling for fault-tolerant communication on the static segment of FlexRay,” Proc. RTSS2010.

[13] M. Lukasiewycz, R. Schneider, D. Goswami, and S. Chakraborty, “Mod-ular scheduling of distributed heterogeneous time-triggered automotivesystems,” Proc. ASP-DAC, 2012.

[14] T.C. Hu, “Parallel Sequencing and Assembly Line Problems,” Oper.Research, vol. 19, no. 6, pp.841-848, Nov. 1961.

[15] J.J. Hwang, Y.C. Chow, F.D. Anger and C.Y. Lee, “Scheduling Prece-dence Graphs in Systems with Interprocessor Communication Times,”SIAM Journal of Computing, vol. 18, no. 2, pp. 244-257, Apr. 1989.

[16] Y. Kwok and I. Ahmad, “Dynamic critical-path scheduling: An effectivetechnique for allocating task graphs to multiprocessors,” IEEE Trans.Parallel and Distributed Systems, vol. 7, no. 5, pp. 506-521, May 1996.

[17] M. Wu and D. Gajski, “Hypertool: A Programming Aid for Message-Passing Systems,” IEEE Trans. Parallel and Distributed Systems, vo. 1,no. 3, pp. 330-343, 1990.

Page 12: IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. … · systems, FlexRay, in-vehicle networks, list scheduling, real-time scheduling, task graphs, time-triggered systems

IEEE TRANSACTIONS ON INDUSTRIAL INFORMATICS, VOL. X, NO. X, MONTH 201X 12

[18] A. Davare, Q. Zhu, M.D. Natale, C. Pinello, S. Kanajan, and A.S. Vin-centelli, “Period Optimization for Hard Real-time Distributed AutomotiveSystems,” Proceedings of the 44-th annual Design Automation Conference,2007.

[19] T. Pop, P. Eles, and Z. Peng, “Schedulability Analysis for DistributedHeterogeneous Time/Event Triggered Real-Time Systems,” Proceedings of15th Euromicro Conference on Real-Time Systems, 2003.

[20] P. Pop, K.H. Poulsen, V. Izosimov, and P. Eles, “Scheduling and VoltageScaling for Energy/Reliability Trade-offs in Fault-Tolerant Time-TriggeredEmbedded Systems,” In Proceedings of the 5th IEEE/ACM internationalconference on Hardware/software codesign and system synthesis, 2007.

[21] H. Jaouani, R. Bouhouch, W. Najjar, and S. Hasnaoui, “Hybrid task andmessage scheduling in hard real time distributed systems over FlexRaybus,” In IEEE International Conference on Communications and Informa-tion Technology (ICCIT), pp. 21-26, 2012.

[22] D. Peng, K.G. Shin, and T.F. Abdelzaher, “Assignment and schedulingcommunicating periodic tasks in distributed real-time systems,” IEEETrans. Software Engineering, vol. 23, no. 12, Dec. 1997, pp. 745-758.

[23] T.F. Abdelzaher, and K.G. Shin, “Combined task and message schedul-ing in distributed real-time systems,” Parallel and Distributed Systems,IEEE Trans. Parallel and Distributed Systems, vol. 10, no. 11, pp. 1179-1191, Nov., 1999.

[24] K. Ramamritham, “Allocation and Scheduling of Precedence-RelatedPeriodic Tasks,” IEEE Trans. Parallel and Distributed Systems, vol. 6, no.4, pp. 412-420, Apr. 1995.

[25] T.F. Abdelzaher, and K.G. Shin. “Period-based load partitioning andassignment for large real-time applications,” IEEE Trans. Computers, vol.49, no. 1 , pp. 81-87, Jan. 2000.

[26] B.P. Dave, G. Lakshminarayana, and N.K. Jha, “COSYN: HardwareC-Software Co-Synthesis of Heterogeneous Distributed Embedded Systems,”IEEE Trans. Very Large Scale Integration (VLSI) Systems, vol. 7, no. 1,pp. 92-104, Jan. 1999.

[27] G. Manimaran, C. Murthy, “An efficient dynamic scheduling algorithmfor multiprocessor real-time systems,” IEEE Trans. Parallel Distrib. Sys-tems. vol. 9 , pp. 312-319, Mar. 1998.

[28] E. Schmidt and K. Schmidt, “Message scheduling for the flexrayprotocol: The dynamic segment,”IEEE Trans. Vehicular Technology, vol.58, no. 5, pp. 2160-2169, 2009.

[29] M. Lukasiewycz, M. Glab, J. Teich, and P. Milbredt, “Flexray scheduleoptimization of the static segment,” Proc. CODES+ISSS, 2009.

[30] K. Schmidt and E. Schmidt, “Message scheduling for the flexray proto-col: The static segment,” IEEE Trans. Vehicular Technology, vol. 58, no.5, pp. 2170-2179, 2009.

[31] S. Ding, N. Murakami, H. Tomiyama, and H. Takada, “A GA-BasedScheduling Method for FlexRay Systems,” In Proc. International Confer-ence on Embedded Software, 2005.

[32] M. Grenier, L. Havet, and N. Navet, “Configuring the Communicationon FlexRay: the Case of the Static Segment,” In Proc. ECRTS, 2008.

[33] IBM, ILOG CPLEX, http://www.ibm.com/software/, Version 12.2.

Menglan Hu received the B.E. degree in Electronicand Information Engineering from Huazhong Uni-versity of Science and Technology, Wuhan, China,in 2007, and the Ph.D. degree in Electrical andComputer Engineering from the National Univer-sity of Singapore, Singapore, in 2012. From 2012to 2014 he was a research fellow at the Schoolof Computer Engineering, Nanyang TechnologicalUniversity, Singapore. In 2014 he joined the facultyof the Department of Electronics and InformationEngineering, Huazhong University of Science and

Technology, Wuhan, China, where he is currently an Associate Professor. Hisresearch interests includes cloud computing, parallel and distributed systems,scheduling and resource management, as well as wireless networking.

Jun Luo received the B.S. and M.S. degrees in elec-trical engineering from Tsinghua University, Beijing,China, in 1997 and 2000, respectively, and thePh.D. degree in computer science from the SwissFederal Institute of Technology in Lausanne (EPFL),Lausanne, Switzerland, in 2006. From 2006 to 2008,he has worked as a Post-Doctoral Research Fellowwith the Department of Electrical and ComputerEngineering, University of Waterloo, Waterloo, ON,Canada. In 2008, he joined the faculty of the Schoolof Computer Engineering, Nanyang Technological

University, Singapore, where he is currently an Assistant Professor. His re-search interests include wireless networking, mobile and pervasive computing,distributed systems, multimedia protocols, network modeling and performanceanalysis, applied operations research, and network security. He is a memberof the IEEE.

Yang Wang received the BS degree in appliedmathematics from the Ocean University of China in1989 and the MS and PhD degrees in computingscience from Carleton University and the Universityof Alberta in 2001 and 2008, respectively. He is cur-rently at IBM Center for Advanced Studies (CAS),Atlantic, University of New Brunswick, Fredericton,Canada. Before joining CAS Atlantic in 2012, hewas a research fellow at the National University ofSingapore from 2010 to 2012. Before that, he wasa research associate at the University of Alberta,

Canada, from August 2008 to March 2009. His research interests includescientific workflow computation and virtualization in Clouds and resourcemanagement algorithms.

Martin Lukasiewycz received the Dipl.Ing. andPh.D. degree in computer science from the Univer-sity of Erlangen-Nuremberg, Germany, in 2006 and2010, respectively. Since 2011, Martin Lukasiewyczworks as Principal Investigator on automotive Em-bedded Systems at the TUM CREATE Centre forElectromobility in Singapore. From 2006 to 2010,he worked as research assistant at AUDI AG andthe Department of Hardware-Software Co-Design,University of Erlangen-Nuremberg, before he joinedthe Institute for Real-Time Computer Systems, Tech-

nical University of Munich, as a postdoctoral researcher in 2010. His researchcovers automotive in-vehicle communication networks, system-level design ofembedded systems, and meta-heuristic optimization. Dr. Lukasiewycz serveson the program committee of major conference such as DATE and DAC. Heis a member of the IEEE.

Zeng Zeng received the Ph.D. in electrical andcomputer engineering from The National Universityof Singapore, in 2005. He received his BS andMS degrees in automatic control from HuazhongUniversity of Science and Technology, Wuhan, P.R.China, in 1997 and 2000, respectively. His researchinterests include distributed/grid computing systems,multimedia storage systems, wireless sensor net-works, and controller area networks. Currently, heworks as a senior research fellow at The NationalUniversity of Singapore and in the meanwhile, he is

the founder of GoGoWise Cloud Education Pte. Ltd, Singapore.