7 research outputs found

    Code generation for multi-phase tasks on a multi-core distributed memory platform

    Get PDF
    International audienceEnsuring temporal predictability of real-time systems on a multi-core platform is difficult, mainly due to hard to predict delays related to shared access to the main memory. Task models where computation phases and communication phases are separated (such as the PRedictable Execution Model), have been proposed to both mitigate these delays and make them easier to analyze. In this paper we present a compilation process, part of the Prelude compiler, that automatically translates a high-level synchronous data-flow system specification into a PREM-compliant C program. By automating the production of the PREM-compliant C code, low-level implementation concerns related to task communications become the responsibility of the compiler, which saves tedious and error-prone development efforts

    Tightening contention delays while scheduling parallel applications on multi-core architectures

    Get PDF
    International audienceMulti-core systems are increasingly interesting candidates for executing parallel real-time applications, in avionic, space or automotive industries, as they provide both computing capabilities and power efficiency. However, ensuring that timing constraints are met on such platforms is challenging, because some hardware resources are shared between cores. Assuming worst-case contentions when analyzing the schedulability of applications may result in systems mistakenly declared unschedulable, although the worst-case level of contentions can never occur in practice. In this paper, we present two contention-aware scheduling strategies that produce a time-triggered schedule of the application's tasks. Based on knowledge of the application's structure, our scheduling strategies precisely estimate the effective contentions, in order to minimize the overall makespan of the schedule. An Integer Linear Programming (ILP) solution of the scheduling problem is presented, as well as a heuristic solution that generates schedules very close to ones of the ILP (5 % longer on average), with a much lower time complexity. Our heuristic improves by 19% the overall makespan of the resulting schedules compared to a worst-case contention baseline

    Dynamic Memory Bandwidth Allocation for Real-Time GPU-Based SoC Platforms

    Get PDF
    Heterogeneous SoC platforms, comprising both general purpose CPUs and accelerators such as a GPU, are becoming increasingly attractive for real-time and mixed-criticality systems to cope with the computational demand of data parallel applications. However, contention for access to shared main memory can lead to significant performance degradation on both CPU and GPU. Existing work has shown that memory bandwidth throttling is effective in protecting real-time applications from memory-intensive, best-effort ones; however, due to the inherent pessimism involved in worst-case execution time estimation, such approaches can unduly restrict the bandwidth available to best-effort applications. In this work, we propose a novel memory bandwidth allocation scheme where we dynamically monitor the progress of a real-time application and increase the bandwidth share of best-effort ones whenever it is safe to do so. Specifically, we demonstrate our approach by protecting a real-time GPU kernel from best-effort CPU tasks. Based on profiling information, we first build a worst case execution time estimation model for the GPU kernel. Using such model, we then show how to dynamically recompute on-line the maximum memory budget that can be allocated to best-effort tasks without exceeding the kernel’s assigned execution budget. We implement our proposed technique on NVIDIA embedded SoC and demonstrate its effectiveness on a variety of GPU and CPU benchmarks

    Implementación y evaluación de técnicas de planificación en sistemas de tiempo real crítico

    Full text link
    [CA] En els sistemes de temps real crític no poden produir-se errors, ja que estos es consideren catastròfics. Des del punt de vista dels requisits temporals, això vol dir que cap tasca pot perdre el seu termini. Per tant, és molt important desenvolupar tècniques de planificació que produïsquen plans d’execució correctes. Durant els últims anys, les tècniques d’optimització matemàtica com la programació lineal sencera han millorat amb l’aparició de nous solvers d’optimització que obtenen la solució òptima a un problema amb major rapidesa i fiabilitat. Esta millora permet explorar l’ús de models de programació lineal sencera per resoldre el problema de la planificació de tasques en sistemes de temps real crític. L'objectiu del projecte és desenvolupar el model matemàtic i implementar la solució amb dues de les eines d'optimització més utilitzades, la qual cosa a més servirà per a comparar aquestes dues eines en termes de temps i qualitat de la solució.[ES] En los sistemas de tiempo real críticos no pueden producirse errores ya que estos se consideran catastróficos. Desde el punto de vista de los requisitos temporales, esto significa que ninguna tarea puede perder su plazo. Por ello, es muy importante desarrollar técnicas de planificación que produzcan planes de ejecución correctos. En los últimos años, las técnicas de optimización matemática como la programación lineal entera (ILP) han mejorado con la aparición de nuevos solvers de optimización que logran obtener la solución óptima a un problema con mayor rapidez y fiabilidad. Esto permite explorar el uso de modelos de programación lineal entera para resolver el problema de la planificación de tareas en sistemas de tiempo real crítico. El objetivo del proyecto es desarrollar el modelo matemático e implementar la solución con dos de las herramientas de optimización más utilizadas, lo cual además servirá para comparar estas dos herramientas en términos de tiempo y calidad de la solución.[EN] In critical real-time systems, errors cannot occur as they are considered catastrophic. From the point of view of the temporal requirements, this means that no task can lose its deadline. Therefore, it is very important to develop scheduling techniques that produce correct execution plans. In recent years, mathematical optimization techniques such as Integer Linear Programming (ILP) have improved with the emergence of new optimization solvers that achieve the optimal solution to a problem more quickly and reliably. This allows to explore the use of linear integer programming models to solve the problem of task scheduling in critical real time systems. The objective of the project is to develop the mathematical model and implement the solution with two of the most used optimization tools, which will also serve to compare these two tools in terms of time and quality of the solution.Moreno Candela, M. (2021). Implementación y evaluación de técnicas de planificación en sistemas de tiempo real crítico. Universitat Politècnica de València. http://hdl.handle.net/10251/173624TFG

    Automated Compilation Framework for Scratchpad-based Real-Time Systems

    Get PDF
    ScratchPad Memory (SPM) is highly adopted in real-time systems as it exhibits a predictable behaviour. SPM is software-managed by explicitly inserting instructions to move code and data transfers between the SPM and the main memory. However, it is a tedious job to decide how to manage the SPM and to manually modify the code to insert memory transfers. Hence, an automated compilation tool is essential to efficiently utilize the SPM. Another key problem with SPM is the latency suffered by the system due to memory transfers. Hiding this latency is important for high-performance systems. In this thesis, we address the problems of managing SPM and reducing the impact of memory latency. To realize the automation of our work, we develop a compilation framework based on the LLVM compiler to analyze and transform the program code. We exploit our framework to improve the performance of the execution of single and multi-tasks in real-time systems. For the single task execution, Worst-Case Execution Time (WCET) is of great importance to assure correct and safe behaviour of the system. So, we propose a WCET-driven allocation technique for data SPM that employs software prefetching to efficiently manage the SPM and to overlap the memory transfer and the task execution in a predictable way. On the other hand, multi-tasking requires the system to be schedulable such that all the tasks can meet their timing requirements. However, executing multiple tasks on a multi-processor platform suffers from the contention of the accesses to the shared main memory. To avoid the contention, several scheduling techniques adopted the 3-phase execution model which executes the task as a sequence of memory and computation phases. This provides the means to avoid the contention as well as to hide the memory latency by using a Direct Memory Access (DMA) engine. Executing memory transfers using the DMA allows overlapping the memory transfers with the computations on the processor. Using the 3-phase model in systems with limited sizes of local SPM may necessitate a segmentation of the task. Automating the segmentation process is necessary especially for systems with large task sets. Hence, we propose a set of efficient segmentation algorithms that follow the 3-phase execution model. The application of these algorithms shows a significant improvement in the system schedulability. For our segmentation algorithms to be more applicable, we extend the 3-phase model to allow programs with multiple paths represented as conditional Directed Acyclic Graphs (DAGs), unlike the previous works that targeted sequential programs. We also introduce a multi-steaming model to exploit the benefits of prefetching by overlapping the memory and computation phases of the same task, which was not allowed in the previous approaches. By combining the automated compilation with the proposed algorithms, we are able to achieve our goal to efficiently manage data SPM in real-time systems

    Compileroptimierung und parallele Code-Generierung für zeitkritische eingebettete Multiprozessorsysteme

    Get PDF
    Durch den voranschreitenden Trend der Digitalisierung gewinnen intelligente digitale Systeme in vielen Bereichen des täglichen Lebens zunehmend an Bedeutung. Dies betrifft insbesondere auch den Bereich sicherheitskritischer Echtzeitsysteme, für deren sicheren Betrieb die Echtzeitfähigkeit nachgewiesen werden muss. Im Gegensatz zu Anwendungsfeldern ohne diese Anforderung sind effiziente Mehrkernprozessoren in Echtzeitsystemen derzeit noch kaum verbreitet. Der Hauptgrund für die bisherige Dominanz der Einzelkernprozessoren sind fehlende Methoden und Werkzeuge, um parallele Echtzeit-Software für Mehrkernprozessoren zu entwickeln und selbst im ungünstigsten Fall noch eine maximale Ausführungszeit (englisch Worst Case Execution Time, kurz WCET) garantieren zu können. In diesem Kontext besteht eines der wesentlichen Probleme darin, dass sich parallel ablaufende Software-Routinen im Hinblick auf ihre Laufzeit gegenseitig beeinflussen können. In Mehrkernprozessoren geschieht dies vor allem bei gleichzeitigen Zugriffen mehrerer Kerne auf eine gemeinsam genutzte Hardware-Ressource. Geeignete Methoden, um den Einfluss dieser als Interferenz bezeichneten Effekte bei der Software-Entwicklung präzise vorherzusagen und sichere Garantien für die Ausführungszeit abzuleiten, sind Gegenstand aktueller Forschung. Gleiches gilt für Software-Werkzeuge zur automatischen Parallelisierung, die auf harte Echtzeitanwendungen spezialisiert sind. Diese Arbeit zielt darauf ab, die Anwendbarkeit von Mehrkernprozessoren in Echtzeitsystemen durch Beiträge in den Bereichen der automatischen Software-Parallelisierung, Code-Optimierung und Hardware-Modellierung signifikant zu verbessern. Als Bestandteil einer Werkzeugkette zur automatischen Parallelisierung von sequentieller Echtzeit-Software wird in dieser Arbeit ein Compiler-Werkzeug zur WCET-optimierten parallelen Code-Generierung und ein zugehöriges paralleles Programmiermodell vorgestellt. Hierdurch können -- weitgehend ohne Zutun eines Endanwenders -- gut vorhersagbare parallele Programme erzeugt werden. Durch das Programmiermodell wird dabei sichergestellt, dass die Ausführungszeit, einschließlich der Interferenzeffekte, mit Hilfe einer statischen WCET-Analyse sicher nach oben abgeschätzt werden kann. Als Teil der Code-Generierung stellt die vorliegende Arbeit zwei Optimierungsmethoden vor, die zum einen den Kommunikations- und Synchronisationsaufwand zwischen den Prozessorkernen reduzieren und zum anderen die optimierte Allokation verteilter Speicher in heterogenen Speicherhierarchien ermöglichen. Erstere ist auf des parallele Programmiermodell abgestimmt und erlaubt die optimierte Platzierung von Kommunikations- und Synchronisationsoperationen sowie das Entfernen redundanter Synchronisation auf einer feingranularen Ebene. Die Optimierung der Speicherallokation ergänzt den Ansatz um ein formales Optimierungsmodell zur Zuweisung der Datenfelder eines generierten Programms zu den Speicherbereichen der Zielplattform. Das Modell bezieht dabei sowohl die Kosten für Interferenzeffekte als auch die Speicherhierarchie von Zielplattformen mit verteilten und heterogenen Speichern mit ein. Um die Schritte zur Generierung, Optimierung und Analyse von paralleler Echtzeit-Software weitgehend plattformunabhängig aufbauen zu können, beinhaltet die vorliegende Arbeit außerdem einen Ansatz zur generischen Modellierung von Mehrkernprozessorarchitekturen. Dieser erlaubt es, die Zielplattform mit Hilfe einer entsprechend erweiterten Architekturbeschreibungssprache (ADL) zu beschreiben, wodurch sich die darauf aufbauenden Entwicklungswerkzeuge mit überschaubarem Aufwand auf ein breites Spektrum von Hardware-Plattformen anwenden lassen. Mit dieser neuartigen Kombination erweitert die vorliegende Arbeit den Stand der Technik um einige wesentliche Bausteine, die die weitgehend automatisierte Parallelisierung von Echtzeit-Software ohne stark einschränkende Annahmen bezüglich der Struktur des Eingabeprogramms ermöglichen. Zu den weiteren Neuerungen dieser Arbeit zählen die Plattformunabhängigkeit bei der WCET-optimierten Software-Parallelisierung und die Berücksichtigung von Interferenzeffekten bei der Speicherallokation in Echtzeitsystemen. Die experimentelle Evaluation der vorgestellten Methoden und deren prototypischer Umsetzung zeigt, dass die WCET aller betrachteten Testanwendungen von der Parallelisierung profitieren kann. Auf einer Plattform mit vier Prozessorkernen konnte z.B. die WCET einer Anwendung aus dem Bereich der Bildverarbeitung durch die Parallelisierung im Vergleich zum sequentiellen Eingabeprogramm um Faktor 3,21 verbessert werden. Auch die Optimierungsansätze für Kommunikation und Speicherallokation führen größtenteils zu einer deutlichen Verbesserung der WCET. So konnten die durch Interferenzen verursachten Kosten im Zuge der Speicherallokation z.B. um bis zu 49% reduziert werden. Insgesamt haben die Ergebnisse dieser Arbeit damit das Potential, die effiziente und kostengünstige Nutzung von Mehrkernprozessoren im Bereich harter Echtzeitsysteme wesentlich voranzutreiben
    corecore