6 research outputs found

    An implementation of the earliest deadline first algorithm in Linux

    No full text

    An Implementation of the Earliest Deadline First Algorithm in Linux

    No full text
    Recently, many projects have been started to introduce some real-time mechanisms into general purpose operating systems (GPOS) in order to make them capable of providing the users with some temporal guarantees. Many of these projects focused especially on Linux for its capillary and widespread adoption throughout many different research and industrial environments.By tracking the kernel release cycle, we propose an efficient Earliest Deadline First implementation in the form of a patch-set against the 2.6.27 version, that is the latest released one, as of now. Our implementation provides the user with the possibility to choose SCHED_EDF as one of the possible scheduling policies for a task, with an enhanced version of the standard algorithm. In fact, we propose a new approach to shared resources' access which, differently from many other previous existing works, does not require the user to specify any parameters about the critical sections every task will enter during its execution

    Caracterização da execução de tarefas no Linux PREEMPT-RT através de uma ferramenta de trace

    Get PDF
    Dissertação (mestrado) - Universidade Federal de Santa Catarina, Centro Tecnológico, Programa de Pós-Graduação em Engenharia de Automação e Sistemas, Florianópolis, 2014.Sistemas de tempo real são sistemas computacionais que respondem a eventos, os quais requerem um tempo limite máximo de resposta. O não cumprimento do tempo limite de resposta faz com que o sistema perca de maneira parcial ou total o seu valor. O patch PREEMPT-RT é o padrão de facto para Linux de tempo real, sendo utilizado tanto em pesquisas quanto na indústria. Apesar disto, são frequentes as discussões sobre as diferenças entre o Linux de tempo real e a teoria de sistemas de tempo real. Dentre os pontos de divergência, estão o método de análise e a métrica utilizada para avaliar o sistema. A principal métrica de análise do Linux de tempo real é a latência de escalonamento, principalmente no PREEMPT-RT. Apesar de eficiente, ao ponto de tornar o Linux capaz de atender requisitos temporais de diversas aplicações, este método é simplista se comparado com a teoria de sistemas de tempo real. Na teoria busca-se analiticamente comprovar que um conjunto de tarefas irá cumprir os seus deadlines, apesar das interferências e bloqueios que estas podem sofrer durante a sua execução. Este trabalho apresenta a relação entre as abstrações utilizadas no método de análise de tempo de resposta com as funções do kernel do Linux, no que diz respeito às funções que afetam temporalmente a execução das tarefas de tempo real. A partir desta relação, uma nova ferramenta de trace é apresentada. Esta ferramenta cria uma nova forma de visualizar a execução das tarefas de tempo real, que permita monitorar os eventos que afetam o comportamento temporal das tarefas, utilizando as abstrações do método de análise de tempo de resposta. A partir da utilização da ferramenta proposta foi possível, para as tarefas com um comportamento típico de tarefas de tempo real na teoria, caracterizar a execução das tarefas de tempo real no Linux e desenvolver um conjunto as equações que determinam qual a origem dos tempos de respostas.Abstract : Real-time systems are computational systems that respond to events which require a maximum response time. A failure in the attempt to satisfy the timing requirements makes system to lose partially or entirely their value. The PREEMPT-RT patch is the de facto standard for real-time Linux, being used for both industry and research. Despite this, there are frequent discussions about the differences between the real-time Linux and theory of real-time systems. Among the points of contention are the method of analysis and the metrics used to evaluate the system. The main metric for the analysis of the real-time Linux is the scheduling latency, mainly in the PREEMPT-RT. Despite efficient, at the point of being able to meet timing requirements of various real time applications on Linux, this method is simplistic if compared with the theory of real-time systems. The real-time theory tries to analytically prove that a set of tasks will meet their deadlines, despite the interference and locks it can suffer during its execution. This work presents the relationship between the abstractions used in the response time analysis and the functions of Linux kernel, with regard to the functions that affects the timing behavior of the real-time tasks. From this relationship, a new tool for trace is presented. This tool creates a new way to trace the real-time tasks, enabling the monitoring of the events that affect the timing behavior of tasks, using the abstractions used in the response time-analysis method. From the use of the proposed tool was possible, for tasks with a typical behavior of real-time tasks, to characterize the execution of real-time tasks on Linux and develop a set equations that determine the origin of the response time

    Scheduling and locking in multiprocessor real-time operating systems

    Get PDF
    With the widespread adoption of multicore architectures, multiprocessors are now a standard deployment platform for (soft) real-time applications. This dissertation addresses two questions fundamental to the design of multicore-ready real-time operating systems: (1) Which scheduling policies offer the greatest flexibility in satisfying temporal constraints; and (2) which locking algorithms should be used to avoid unpredictable delays? With regard to Question 1, LITMUSRT, a real-time extension of the Linux kernel, is presented and its design is discussed in detail. Notably, LITMUSRT implements link-based scheduling, a novel approach to controlling blocking due to non-preemptive sections. Each implemented scheduler (22 configurations in total) is evaluated under consideration of overheads on a 24-core Intel Xeon platform. The experiments show that partitioned earliest-deadline first (EDF) scheduling is generally preferable in a hard real-time setting, whereas global and clustered EDF scheduling are effective in a soft real-time setting. With regard to Question 2, real-time locking protocols are required to ensure that the maximum delay due to priority inversion can be bounded a priori. Several spinlock- and semaphore-based multiprocessor real-time locking protocols for mutual exclusion (mutex), reader-writer (RW) exclusion, and k-exclusion are proposed and analyzed. A new category of RW locks suited to worst-case analysis, termed phase-fair locks, is proposed and three efficient phase-fair spinlock implementations are provided (one with few atomic operations, one with low space requirements, and one with constant RMR complexity). Maximum priority-inversion blocking is proposed as a natural complexity measure for semaphore protocols. It is shown that there are two classes of schedulability analysis, namely suspension-oblivious and suspension-aware analysis, that yield two different lower bounds on blocking. Five asymptotically optimal locking protocols are designed and analyzed: a family of mutex, RW, and k-exclusion protocols for global, partitioned, and clustered scheduling that are asymptotically optimal in the suspension-oblivious case, and a mutex protocol for partitioned scheduling that is asymptotically optimal in the suspension-aware case. A LITMUSRT-based empirical evaluation is presented that shows these protocols to be practical
    corecore