36 research outputs found

    Evaluating and Optimizing Real-Time Software Transactional Memory

    Get PDF
    Software transactional memory (STM) is a proposed solution to the challenge of developing correct concurrent code. STM allows programmers to annotate sections of their code that need to be synchronized, and the STM implementation resolves synchronization issues behind the scenes. One application domain where STM can be particularly useful is real-time systems, where schedulability is a crucial metric is system certification. However, STM usually relies on retries to resolve contention, which makes theoretical worst-case behavior, and thus schedulability, highly pessimistic and therefore impractical in the real-time application domain. Previous work on real-time STM has failed to give both theoretical and practical solutions to this problem. Work in this thesis is part of a large effort to present real-time STM that is both schedulable and high-performing, achieved using a retry-free, and thus entirely lock-based, STM implementation. This work details multiple metrics for evaluating retry-free STM compared to a known retry-based lock-based solution, as well as presents optimizations to a locking protocol for increased performance in this context. Evaluations show a retry-free STM implementation with optimized locking protocols is significantly more schedulable and higher performing on single-socket machines than other lock-based STM.Bachelor of Scienc

    Multi-core devices for safety-critical systems: a survey

    Get PDF
    Multi-core devices are envisioned to support the development of next-generation safety-critical systems, enabling the on-chip integration of functions of different criticality. This integration provides multiple system-level potential benefits such as cost, size, power, and weight reduction. However, safety certification becomes a challenge and several fundamental safety technical requirements must be addressed, such as temporal and spatial independence, reliability, and diagnostic coverage. This survey provides a categorization and overview at different device abstraction levels (nanoscale, component, and device) of selected key research contributions that support the compliance with these fundamental safety requirements.This work has been partially supported by the Spanish Ministry of Economy and Competitiveness under grant TIN2015-65316-P, Basque Government under grant KK-2019-00035 and the HiPEAC Network of Excellence. The Spanish Ministry of Economy and Competitiveness has also partially supported Jaume Abella under Ramon y Cajal postdoctoral fellowship (RYC-2013-14717).Peer ReviewedPostprint (author's final draft

    Schedulability, Response Time Analysis and New Models of P-FRP Systems

    Get PDF
    Functional Reactive Programming (FRP) is a declarative approach for modeling and building reactive systems. FRP has been shown to be an expressive formalism for building applications of computer graphics, computer vision, robotics, etc. Priority-based FRP (P-FRP) is a formalism that allows preemption of executing programs and guarantees real-time response. Since functional programs cannot maintain state and mutable data, changes made by programs that are preempted have to be rolled back. Hence in P-FRP, a higher priority task can preempt the execution of a lower priority task, but the preempted lower priority task will have to restart after the higher priority task has completed execution. This execution paradigm is called Abort-and-Restart (AR). Current real-time research is focused on preemptive of non-preemptive models of execution and several state-of-the-art methods have been developed to analyze the real-time guarantees of these models. Unfortunately, due to its transactional nature where preempted tasks are aborted and have to restart, the execution semantics of P-FRP does not fit into the standard definitions of preemptive or non-preemptive execution, and the research on the standard preemptive and non-preemptive may not applicable for the P-FRP AR model. Out of many research areas that P-FRP may demands, we focus on task scheduling which includes task and system modeling, priority assignment, schedulability analysis, response time analysis, improved P-FRP AR models, algorithms and corresponding software. In this work, we review existing results on P-FRP task scheduling and then present our research contributions: (1) a tighter feasibility test interval regarding the task release offsets as well as a linked list based algorithm and implementation for scheduling simulation; (2) P-FRP with software transactional memory-lazy conflict detection (STM-LCD); (3) a non-work-conserving scheduling model called Deferred Start; (4) a multi-mode P-FRP task model; (5) SimSo-PFRP, the P-FRP extension of SimSo - a SimPy-based, highly extensible and user friendly task generator and task scheduling simulator.Computer Science, Department o

    Safe code transfromations for speculative execution in real-time systems

    Get PDF
    Although compiler optimization techniques are standard and successful in non-real-time systems, if naively applied, they can destroy safety guarantees and deadlines in hard real-time systems. For this reason, real-time systems developers have tended to avoid automatic compiler optimization of their code. However, real-time applications in several areas have been growing substantially in size and complexity in recent years. This size and complexity makes it impossible for real-time programmers to write optimal code, and consequently indicates a need for compiler optimization. Recently researchers have developed or modified analyses and transformations to improve performance without degrading worst-case execution times. Moreover, these optimization techniques can sometimes transform programs which may not meet constraints/deadlines, or which result in timeouts, into deadline-satisfying programs. One such technique, speculative execution, also used for example in parallel computing and databases, can enhance performance by executing parts of the code whose execution may or may not be needed. In some cases, rollback is necessary if the computation turns out to be invalid. However, speculative execution must be applied carefully to real-time systems so that the worst-case execution path is not extended. Deterministic worst-case execution for satisfying hard real-time constraints, and speculative execution with rollback for improving average-case throughput, appear to lie on opposite ends of a spectrum of performance requirements and strategies. Deterministic worst-case execution for satisfying hard real-time constraints, and speculative execution with rollback for improving average-case throughput, appear to lie on opposite ends of a spectrum of performance requirements and strategies. Nonetheless, this thesis shows that there are situations in which speculative execution can improve the performance of a hard real-time system, either by enhancing average performance while not affecting the worst-case, or by actually decreasing the worst-case execution time. The thesis proposes a set of compiler transformation rules to identify opportunities for speculative execution and to transform the code. Proofs for semantic correctness and timeliness preservation are provided to verify safety of applying transformation rules to real-time systems. Moreover, an extensive experiment using simulation of randomly generated real-time programs have been conducted to evaluate applicability and profitability of speculative execution. The simulation results indicate that speculative execution improves average execution time and program timeliness. Finally, a prototype implementation is described in which these transformations can be evaluated for realistic applications

    Improving Responsiveness of Time-Sensitive Applications by Exploiting Dynamic Task Dependencies

    Get PDF
    In this paper, a mechanism is presented for reducing priority inversion in multi-programmed computing systems. Contrarily to well-known approaches from the literature, this paper tackles cases where the dependency relationships among tasks cannot be known in advance to the operating system (OS). The presented mechanism allows tasks to explicitly declare said relationships, enabling the OS scheduler to take advantage of such information and trigger priority inheritance, resulting in reduced priority inversion. We present the prototype implementation of the concept within the Linux kernel, in the form of modifications to the standard POSIX condition variables code, along with an extensive evaluation including a quantitative assessment of the benefits for applications making use of the technique, as well as comprehensive overhead measurements. Also, we present an associated technique for theoretical schedulability analysis of a system using the new mechanism, which is useful to determine whether all tasks can meet their deadlines or not, in the specific scenario of tasks interacting only through remote procedure calls, and under partitioned scheduling

    Supporting Time-Based QoS Requirements in Software Transactional Memory

    Get PDF
    International audienceSoftware Transactional Memory (STM) is an optimistic concurrency control mechanism that simplifies parallel programming. Still, there has been little interest in its applicability for reactive applications in which there is a required response time for certain operations. We propose supporting such applications by allowing programmers to associate time with atomic blocks in the forms of deadlines and QoS requirements. Based on statistics of past executions, we adjust the execution mode of transactions by decreasing the level of optimism as the deadline approaches. In the presence of concurrent deadlines, we propose different conflict resolution policies. Execution mode switching mechanisms allow meeting multiple deadlines in a consistent manner, with potential QoS degradations being split fairly among several threads as contention increases, and avoiding starvation. Our implementation consists of extensions to a STM runtime that allow gathering statistics and switching execution modes. We also propose novel contention managers adapted to transactional workloads subject to deadlines. The experimental evaluation shows that our approaches significantly improve the likelihood of a transaction meeting its deadline and QoS requirement, even in cases where progress is hampered by conflicts and other concurrent transactions with deadlines

    Virtual Platform for the ARM Cortex-M0 Processor

    Get PDF
    Modern microcontrollers provide a 32 bit core, a rich set of peripherals and on chip memories. However, due to the recent slowing down of the exponential increase in RAM performance, memory has become the main cost factor of low-end MCUs. For enabling the IoT evolution, and until a technological breakthrough improves memory performance, inexpensive sensing and actuation nodes will be heavily memory constrained. Ell-i Open Source Co-operative developed an Open Source Hardware prototype PoE enabled IoT node, which targets to use the smallest ARM Cortex-M0 MCU, with a maximum of 4kB of RAM. Although multiple Open Source Real-Time Operating Systems were available, none of them satisfied the requirements. These included fitting into the memory footprint without minimal configuration, properly handling of the hardware interrupt controller, or adequate alignment with the company’s business plan. This work provides a memory constrained scheduler that rivals in performance and memory footprint the evaluated Open Source RTOSs alternatives. Additionally, it provides safety features not present in other systems, while providing the necessary alignment to Ell-i Co-Operative. A comprehensive evaluation of popular RTOSs for the Cortex-M0 architecture is included, as it allows the benchmarking of the developed system

    Towards achieving execution time predictability in web services middleware

    Get PDF
    Web services middleware are typically designed optimised for throughput. Requests are accepted unconditionally and no differentiation is made in processing. Many use the thread-pool pattern to execute requests in parallel using processor sharing. Clusters hosting web services dispatch requests only to balance out the load among the executors. Such optimisations for throughput work out negatively on the predictability of execution. Processor sharing results in the increase of execution time with the number of concurrent requests, making it impossible to predict or control the execution of a request. Existing works fail to address the need for predictability in web service execution. Some achieve a level of differentiated processing, but fail to consider predictability as their main quality attribute. Some give a probabilistic guarantee on service levels. However, from a predictability perspective they are inconsistent. A few achieve predictable execution times, though only in closed systems where request properties are known at system design time. Web services operate on the Internet, where request properties are relatively unknown. This thesis investigates the problem of achieving predictable times in web service executions. We introduce the notion of a processing deadline for service execution, which the web services engine must adhere to in completing the request in a repeatable and a consistent manner. Reaching such execution deadlines by the services engine is made possible by three main features. Firstly a deadline based scheduling algorithm introduced, ensures the processing deadlines are followed. A laxity based analytical model and an admission control algorithm it is based on, selects requests for execution, resulting in a wider range of laxities to enable more requests with overlapping executions to be scheduled together. Finally, a real-time scheduler component introduced in to the server uses a priority model to schedule the execution of requests by controlling the execution of individual worker threads in custom-made thread pools. Predictability of execution in cluster based deployments is further facilitated by four dispatching algorithms that consider the request deadlines and laxity property in the dispatching process. A performance model derived for a similar system approximates the waiting time where requests with smaller deadlines (having higher priority) experience smaller waiting times than requests with longer deadlines. These techniques are implemented in web services middleware in standalone and cluster-based configurations. They are evaluated against their unmodified versions and techniques such as round-robin and class based dispatching, to measure their predictability gain. Empirical evidence indicate the enhancements enable the middleware to achieve more than 90% of the deadlines, while accepting at least 20% of the requests in high traffic conditions. The enhancements additionally prevent the middleware from reaching overloaded conditions in heavy traffic, while maintaining comparable throughput rates to the unmodified versions of the middleware. Analytical and simulation results for the performance model confirms that deadline based preemptive scheduling results in a better balance of waiting times where high priority requests experience lower waiting times while lower priority requests are not over-starved compared to other techniques such as static priority ordering, First-Come-First-Served, Round-Robin and non-preemptive deadline based scheduling
    corecore