18 research outputs found

    A Framework to Quantify the Overestimations of Static WCET Analysis

    Get PDF
    International audienceTo reduce complexity while computing an upper bound on the worst-case execution time, static WCET analysis performs over-approximations. This feeds the general feeling that static WCET estimations can be far above the real WCET. This feeling is strengthened when these estimations are compared to measured execution times: generally, it is very unlikely to capture the worstcase from observations, then the difference between the highest watermark and the proven WCET upper bound might be considerable. In this paper, we introduce a framework to quantify the possible overestimation on WCET upper bounds obtained by static analysis. The objective is to derive a lower bound on the WCET to complement the upper bound

    Using SMT Solving for the Lookup of Infeasible Paths in Binary Programs

    Get PDF
    International audienceWorst-Case Execution Time (WCET) is a key component to check temporal constraints of realtime systems. WCET by static analysis provides a safe upper bound. While hardware modelling is now efficient, loss of precision stems mainly in the inclusion of infeasible execution paths in the WCET calculation. This paper proposes a new method to detect such paths based on static analysis of machine code and the feasibility test of conditions using Satisfiability Modulo Theory (SMT) solvers. The experimentation shows promising results although the expected precision was slightly lowered due to clamping operations needed to cope with complexity explosion. An important point is that the implementation has been performed in the OTAWA framework and is independent of any instruction set thanks to its semantic instructions

    Mitigating Software-Instrumentation Cache Effects in Measurement-Based Timing Analysis

    Get PDF
    Measurement-based timing analysis (MBTA) is often used to determine the timing behaviour of software programs embedded in safety-aware real-time systems deployed in various industrial domains including automotive and railway. MBTA methods rely on some form of instrumentation, either at hardware or software level, of the target program or fragments thereof to collect execution-time measurement data. A known drawback of software-level instrumentation is that instrumentation itself does affect the timing and functional behaviour of a program, resulting in the so-called probe effect: leaving the instrumentation code in the final executable can negatively affect average performance and could not be even admissible under stringent industrial qualification and certification standards; removing it before operation jeopardizes the results of timing analysis as the WCET estimates on the instrumented version of the program cannot be valid any more due, for example, to the timing effects incurred by different cache alignments. In this paper, we present a novel approach to mitigate the impact of instrumentation code on cache behaviour by reducing the instrumentation overhead while at the same time preserving and consolidating the results of timing analysis

    Dynamic Branch Resolution Based on Combined Static Analyses

    Get PDF
    Static analysis requires the full knowledge of the overall program structure. The structure of a program can be represented by a Control Flow Graph (CFG) where vertices are basic blocks (BB) and edges represent the control flow between the BB. To construct a full CFG, all the BB as well as all of their possible targets addresses must be found. In this paper, we present a method to resolve dynamic branches, that identifies the target addresses of BB created due to the switch-cases and calls on function pointers. We also implemented a slicing method to speed up the overall analysis which makes our approach applicable on large and realistic real-time programs

    Design and Implementation of a Time Predictable Processor: Evaluation With a Space Case Study

    Get PDF
    Embedded real-time systems like those found in automotive, rail and aerospace, steadily require higher levels of guaranteed computing performance (and hence time predictability) motivated by the increasing number of functionalities provided by software. However, high-performance processor design is driven by the average-performance needs of mainstream market. To make things worse, changing those designs is hard since the embedded real-time market is comparatively a small market. A path to address this mismatch is designing low-complexity hardware features that favor time predictability and can be enabled/disabled not to affect average performance when performance guarantees are not required. In this line, we present the lessons learned designing and implementing LEOPARD, a four-core processor facilitating measurement-based timing analysis (widely used in most domains). LEOPARD has been designed adding low-overhead hardware mechanisms to a LEON3 processor baseline that allow capturing the impact of jittery resources (i.e. with variable latency) in the measurements performed at analysis time. In particular, at core level we handle the jitter of caches, TLBs and variable-latency floating point units; and at the chip level, we deal with contention so that time-composable timing guarantees can be obtained. The result of our applied study with a Space application shows how per-resource jitter is controlled facilitating the computation of high-quality WCET estimates

    Tracing Hardware Monitors in the GR712RC Multicore Platform: Challenges and Lessons Learnt from a Space Case Study

    Get PDF
    The demand for increased computing performance is driving industry in critical-embedded systems (CES) domains, e.g. space, towards the use of multicores processors. Multicores, however, pose several challenges that must be addressed before their safe adoption in critical embedded domains. One of the prominent challenges is software timing analysis, a fundamental step in the verification and validation process. Monitoring and profiling solutions, traditionally used for debugging and optimization, are increasingly exploited for software timing in multicores. In particular, hardware event monitors related to requests to shared hardware resources are building block to assess and restraining multicore interference. Modern timing analysis techniques build on event monitors to track and control the contention tasks can generate each other in a multicore platform. In this paper we look into the hardware profiling problem from an industrial perspective and address both methodological and practical problems when monitoring a multicore application. We assess pros and cons of several profiling and tracing solutions, showing that several aspects need to be taken into account while considering the appropriate mechanism to collect and extract the profiling information from a multicore COTS platform. We address the profiling problem on a representative COTS platform for the aerospace domain to find that the availability of directly-accessible hardware counters is not a given, and it may be necessary to the develop specific tools that capture the needs of both the user’s and the timing analysis technique requirements. We report challenges in developing an event monitor tracing tool that works for bare-metal and RTEMS configurations and show the accuracy of the developed tool-set in profiling a real aerospace application. We also show how the profiling tools can be exploited, together with handcrafted benchmarks, to characterize the application behavior in terms of multicore timing interference.This work has been partially supported by a collaboration agreement between Thales Research and the Barcelona Supercomputing Center, and the European Research Council (ERC) under the EU’s Horizon 2020 research and innovation programme (grant agreement No. 772773). MINECO partially supported Jaume Abella under Ramon y Cajal postdoctoral fellowship (RYC2013-14717).Peer ReviewedPostprint (published version

    Détermination de propriétés de flot de données pour améliorer les estimations de temps d'exécution pire-cas

    Get PDF
    La recherche d'une borne supĂ©rieure au temps d'exĂ©cution d'un programme est une partie essentielle du processus de vĂ©rification de systĂšmes temps-rĂ©el critiques. Les programmes de tels systĂšmes ont gĂ©nĂ©ralement des temps d'exĂ©cution variables et il est difficile, voire impossible, de prĂ©dire l'ensemble de ces temps possibles. Au lieu de cela, il est prĂ©fĂ©rable de rechercher une approximation du temps d'exĂ©cution pire-cas ou Worst-Case Execution Time (WCET). Une propriĂ©tĂ© cruciale de cette approximation est qu'elle doit ĂȘtre sĂ»re, c'est-Ă -dire qu'elle doit ĂȘtre garantie de majorer le WCET. Parce que nous cherchons Ă  prouver que le systĂšme en question se termine en un temps raisonnable, une surapproximation est le seul type d'approximation acceptable. La garantie de cette propriĂ©tĂ© de sĂ»retĂ© ne saurait raisonnablement se faire sans analyse statique, un rĂ©sultat se basant sur une sĂ©rie de tests ne pouvant ĂȘtre sĂ»r sans un traitement exhaustif des cas d'exĂ©cution. De plus, en l'absence de certification du processus de compilation (et de transfert des propriĂ©tĂ©s vers le binaire), l'extraction de propriĂ©tĂ©s doit se faire directement sur le code binaire pour garantir leur fiabilitĂ©. Toutefois, cette approximation a un coĂ»t : un pessimisme - Ă©cart entre le WCET estimĂ© et le WCET rĂ©el - important entraĂźne des surcoĂ»ts superflus de matĂ©riel pour que le systĂšme respecte les contraintes temporelles qui lui sont imposĂ©es. Il s'agit donc ensuite, tout en maintenant la garantie de sĂ©curitĂ© de l'estimation du WCET, d'amĂ©liorer sa prĂ©cision en rĂ©duisant cet Ă©cart de telle sorte qu'il soit suffisamment faible pour ne pas entraĂźner des coĂ»ts supplĂ©mentaires dĂ©mesurĂ©s. Un des principaux facteurs de surestimation est la prise en compte de chemins d'exĂ©cution sĂ©mantiquement impossibles, dits infaisables, dans le calcul du WCET. Ceci est dĂ» Ă  l'analyse par Ă©numĂ©ration implicite des chemins ou Implicit Path Enumeration Technique (IPET) qui raisonne sur un surensemble des chemins d'exĂ©cution. Lorsque le chemin d'exĂ©cution pire-cas ou Worst-Case Execution Path (WCEP), correspondant au WCET estimĂ©, porte sur un chemin infaisable, la prĂ©cision de cette estimation est nĂ©gativement affectĂ©e. Afin de parer Ă  cette perte de prĂ©cision, cette thĂšse propose une technique de dĂ©tection de chemins infaisables, permettant l'amĂ©lioration de la prĂ©cision des analyses statiques (dont celles pour le WCET) en les informant de l'infaisabilitĂ© de certains chemins du programme. Cette information est passĂ©e sous la forme de propriĂ©tĂ©s de flot de donnĂ©es formatĂ©es dans un langage d'annotation portable, FFX, permettant la communication des rĂ©sultats de notre analyse de chemins infaisables vers d'autres analyses. Les mĂ©thodes prĂ©sentĂ©es dans cette thĂšse sont inclues dans le framework OTAWA, dĂ©veloppĂ© au sein de l'Ă©quipe TRACES Ă  l'IRIT. Elles usent elles-mĂȘmes d'approximations pour reprĂ©senter les Ă©tats possibles de la machine en diffĂ©rents points du programme. Ce sont des abstractions maintenues au fil de l'analyse, et dont la validitĂ© est assurĂ©e par des outils de la thĂ©orie de l'interprĂ©tation abstraite. Ces abstractions permettent de reprĂ©senter de maniĂšre efficace - mais sĂ»re - les ensembles d'Ă©tats pour une classe de chemins d'exĂ©cution jusqu'Ă  un point du programme, et de dĂ©tecter d'Ă©ventuels points du programme associĂ©s Ă  un ensemble d'Ă©tats possibles vide, traduisant un (ou plusieurs) chemin(s) infaisable(s). L'objectif de l'analyse dĂ©veloppĂ©e, la dĂ©tection de tels cas, est rendue possible par l'usage de solveurs SMT (SatisfiabilitĂ© Modulo des ThĂ©ories). Ces solveurs permettent essentiellement de dĂ©terminer la satisfiabilitĂ© d'un ensemble de contraintes, dĂ©duites Ă  partir des Ă©tats abstraits construits. Lorsqu'un ensemble de contraintes, formĂ© Ă  partir d'une conjonction de prĂ©dicats, s'avĂšre insatisfiable, aucune valuation des variables de la machine ne correspond Ă  un cas d'exĂ©cution possible, et la famille de chemins associĂ©e est donc infaisable. L'efficacitĂ© de cette technique est soutenue par une sĂ©rie d'expĂ©rimentations sur divers suites de benchmarks, reconnues dans le domaine du WCET statique et/ou issues de cas rĂ©els de l'industrie. Des heuristiques sont configurĂ©es afin d'adoucir la complexitĂ© de l'analyse, en particulier pour les applications de plus grande taille. Les chemins infaisables dĂ©tectĂ©s sont injectĂ©s sous la forme de contraintes de flot linĂ©aires dans le systĂšme de Programmation LinĂ©aire en Nombres Entiers ou Integer Linear Programming (ILP) pilotant le calcul final de l'analyse WCET d'OTAWA. Selon le programme analysĂ©, cela peut rĂ©sulter en une rĂ©duction du WCET estimĂ©, et donc une amĂ©lioration de sa prĂ©cision.The search for an upper bound of the execution time of a program is an essential part of the verification of real-time critical systems. The execution times of the programs of such systems generally vary a lot, and it is difficult, or impossible, to predict the range of the possible times. Instead, it is better to look for an approximation of the Worst-Case Execution Time (WCET). A crucial requirement of this estimate is that it must be safe, that is, it must be guaranteed above the real WCET. Because we are looking to prove that the system in question terminates reasonably quickly, an overapproximation is the only acceptable form of approximation. The guarantee of such a safety property could not sensibly be done without static analysis, as a result based on a battery of tests could not be safe without an exhaustive handling of test cases. Furthermore, in the absence of a certified compiler (and tech- nique for the safe transfer of properties to the binaries), the extraction of properties must be done directly on binary code to warrant their soundness. However, this approximation comes with a cost : an important pessimism, the gap between the estimated WCET and the real WCET, would lead to superfluous extra costs in hardware in order for the system to respect the imposed timing requirements. It is therefore important to improve the precision of the WCET by reducing this gap, while maintaining the safety property, as such that it is low enough to not lead to immoderate costs. A major cause of overestimation is the inclusion of semantically impossible paths, said infeasible paths, in the WCET computation. This is due to the use of the Implicit Path Enumeration Technique (IPET), which works on an superset of the possible execution paths. When the Worst-Case Execution Path (WCEP), corresponding to the estimated WCET, is infeasible, the precision of that estimation is negatively affected. In order to deal with this loss of precision, this thesis proposes an infeasible paths detection technique, enabling the improvement of the precision of static analyses (namely for WCET estimation) by notifying them of the infeasibility of some paths of the program. This information is then passed as data flow properties, formatted in the FFX portable annotation language, and allowing the communication of the results of our infeasible path analysis to other analyses. The methods hereafter presented are included in the OTAWA framework, developed in TRACES team at the IRIT lab. They themselves make use of approximations in order to represent the possible states of the machine in various program points. These approximations are abstractions maintained throughout the analysis, and which validity is ensured by abstract interpretation tools. They enable us to represent the set of states for a family of execution paths up to a given program point in an efficient - yet safe - way, and to detect the potential program points associated to an empty set of possible states, signalling one (or several) infeasible path(s). As the end goal of the developed analysis, the detection of such cases is made possible by the use of Satisfiability Modulo Theory (SMT) solvers. Those solvers are notably able to determine the satisfiability of a set of contraints, which we deduct from the abstract states. If a set of constraints, derived from a conjonction of predicates, is unsatisfiable, then there exists no valuation of the machine variables that match a possible execution case, and thus the associated infeasible paths are infeasible. The efficiency of this technique is asserted by a series of experiments on various benchmarks suites, some of which widely recognized in the domain of static WCET, some others derived from actual industrial applications. Heuristics are set up in order to soften the complexity of the analysis, especially for the larger applications. The detected infeasible paths are injected as Integer Linear Programming (ILP) linear data flow constraints in the final computation for the WCET estimation in OTAWA. Depending on the analysed program, this can result in a reduction of the estimated WCET, thereby improving its precision

    Design and implementation of WCET analyses : including a case study on multi-core processors with shared buses

    Get PDF
    For safety-critical real-time embedded systems, the worst-case execution time (WCET) analysis — determining an upper bound on the possible execution times of a program — is an important part of the system verification. Multi-core processors share resources (e.g. buses and caches) between multiple processor cores and, thus, complicate the WCET analysis as the execution times of a program executed on one processor core significantly depend on the programs executed in parallel on the concurrent cores. We refer to this phenomenon as shared-resource interference. This thesis proposes a novel way of modeling shared-resource interference during WCET analysis. It enables an efficient analysis — as it only considers one processor core at a time — and it is sound for hardware platforms exhibiting timing anomalies. Moreover, this thesis demonstrates how to realize a timing-compositional verification on top of the proposed modeling scheme. In this way, this thesis closes the gap between modern hardware platforms, which exhibit timing anomalies, and existing schedulability analyses, which rely on timing compositionality. In addition, this thesis proposes a novel method for calculating an upper bound on the amount of interference that a given processor core can generate in any time interval of at most a given length. Our experiments demonstrate that the novel method is more precise than existing methods.Die Analyse der maximalen AusfĂŒhrungszeit (Worst-Case-Execution-Time-Analyse, WCET-Analyse) ist fĂŒr eingebettete Echtzeit-Computer-Systeme in sicherheitskritischen Anwendungsbereichen unerlĂ€sslich. Mehrkernprozessoren erschweren die WCET-Analyse, da einige ihrer Hardware-Komponenten von mehreren Prozessorkernen gemeinsam genutzt werden und die AusfĂŒhrungszeit eines Programmes somit vom Verhalten mehrerer Kerne abhĂ€ngt. Wir bezeichnen dies als Interferenz durch gemeinsam genutzte Komponenten. Die vorliegende Arbeit schlĂ€gt eine neuartige Modellierung dieser Interferenz wĂ€hrend der WCET-Analyse vor. Der vorgestellte Ansatz ist effizient und fĂŒhrt auch fĂŒr Computer-Systeme mit Zeitanomalien zu korrekten Ergebnissen. DarĂŒber hinaus zeigt diese Arbeit, wie ein zeitkompositionales Verfahren auf Basis der vorgestellten Modellierung umgesetzt werden kann. Auf diese Weise schließt diese Arbeit die LĂŒcke zwischen modernen Mikroarchitekturen, die Zeitanomalien aufweisen, und den existierenden Planbarkeitsanalysen, die sich alle auf die KompositionalitĂ€t des Zeitverhaltens verlassen. Außerdem stellt die vorliegende Arbeit ein neues Verfahren zur Berechnung einer oberen Schranke der Menge an Interferenz vor, die ein bestimmter Prozessorkern in einem beliebigen Zeitintervall einer gegebenen LĂ€nge höchstens erzeugen kann. Unsere Experimente zeigen, dass das vorgestellte Berechnungsverfahren prĂ€ziser ist als die existierenden Verfahren.Deutsche Forschungsgemeinschaft (DFG) as part of the Transregional Collaborative Research Centre SFB/TR 14 (AVACS

    Interaction-aware analysis and optimization of real-time application and operating system

    Get PDF
    Mechanical and electronic automation was a key component of the technological advances in the last two hundred years. With the use of special-purpose machines, manual labor was replaced by mechanical motion, leaving workers with the operation of these machines, before also this task was conquered by embedded control systems. With the advances of general-purpose computing, the development of these control systems shifted more and more from a problem-specific one to a one-size-fits-all mentality as the trade-off between per-instance overheads and development costs was in favor of flexible and reusable implementations. However, with a scaling factor of thousands, if not millions, of deployed devices, overheads and inefficiencies accumulate; calling for a higher degree of specialization. For the area real-time operating systems (RTOSs), which form the base layer for many of these computerized control systems, we deploy way more flexibility than what is actually required for the applications that run on top of it. Since only the solution, but not the problem, became less specific to the control problem at hand, we have the chance to cut away inefficiencies, improve on system-analyses results, and optimize the resource consumption. However, such a tailoring will only be favorable if it can be performed without much developer interaction and in an automated fashion. Here, real-time systems are a good starting point, since we already have to have a large degree of static knowledge in order to guarantee their timeliness. Until now, this static nature is not exploited to its full extent and optimization potentials are left unused. The requirements of a system, with regard to the RTOS, manifest in the interactions between the application and the kernel. Threads request resources from the RTOS, which in return determines and enforces a scheduling order that will ensure the timely completion of all necessary computations. Since the RTOS runs only in the exception, its reaction to requests from the application (or from the environment) is its defining feature. In this thesis, I will grasp these interactions, and thereby the required RTOS semantic, in a control-flow-sensitive fashion. Extracted automatically, this knowledge about the reciprocal influence allows me to fit the implementation of a system closer to its actual requirements. The result is a system that is not only in its usage a special-purpose system, but also in its implementation and in its provided guarantees. In the development of my approach, it became clear that the focus on these interactions is not only highly fruitful for the optimization of a system, but also for its end-to-end analysis. Therefore, this thesis does not only provide methods to reduce the kernel-execution overhead and a system's memory consumption, but it also includes methods to calculate tighter response-time bounds and to give guarantees about the correct behavior of the kernel. All these contributions are enabled by my proposed interaction-aware methodology that takes the whole system, RTOS and application, into account. With this thesis, I show that a control-flow-sensitive whole-system view on the interactions is feasible and highly rewarding. With this approach, we can overcome many inefficiencies that arise from analyses that have an isolating focus on individual system components. Furthermore, the interaction-aware methods keep close to the actual implementation, and therefore are able to consider the behavioral patterns of the finally deployed real-time computing system
    corecore