Comparación de estrategias para mejorar la latencia de planificación en sistemas Linux
Comparison of strategies to improve scheduling latency in Linux systems
Ver/ Abrir
Identificadores
URI: http://hdl.handle.net/10902/16862Registro completo
Mostrar el registro completo DCAutoría
Revuelta Fernández, IvánFecha
2019-06-21Derechos
Atribución-NoComercial-SinDerivadas 3.0 España
Palabras clave
Linux
Tiempo Real
Android
PREEMPT_RT
Raspberry PI
Resumen/Abstract
RESUMEN: Las aplicaciones de tiempo real son imprescindibles en la sociedad actual, esto es debido al gran número aplicaciones que se le está dando a la tecnología en entornos que tienen requisitos temporales, algunos de estos ejemplos son los llamados “coches sin piloto”, implantes auditivos o sistemas de aviación.
En este trabajo, se ha querido estudiar las diferentes alternativas para mejorar el comportamiento temporal de Linux en las aplicaciones de tiempo real y evaluar su rendimiento. Además, debido a lo extendido que está Android en los diversos dispositivos móviles, se ha querido ampliar el estudio a este sistema operativo dado que está basado en el kernel de Linux y las soluciones que se han aplicado son compatibles. Las alternativas para Linux en las que se centra este trabajo son el parche PREEMPT_RT, una popular solución para mejorar el comportamiento temporal de Linux, y una solución propuesta por el grupo de Ingeniería Software y de Tiempo Real de la Universidad de Cantabria, que se basa en un mecanismo disponible en Linux/Android que permite aislar un núcleo del procesador para ejecutar las aplicaciones de tiempo real y disminuir las interferencias con el resto del sistema.
Se ha elegido la Raspberry Pi 3 B como dispositivo para realizar el análisis de las diferentes soluciones, el motivo es que se querían llevar a cabo todas las pruebas en las mismas condiciones y en la Raspberry se puede instalar tanto una distribución de Linux como una de Android. Para estas pruebas se ha estresado el sistema con benchmarks como Antutu o Geekbench y se han medido los tiempos de latencia y algunas funciones propias del sistema operativo relacionadas con las aplicaciones de tiempo real. Estás funciones son los bloqueos de mutex, cambios de prioridad y mediciones con el timer.
Se han realizado unas primeras pruebas donde se han evitado las interferencias con otras aplicaciones de tiempo real, donde el sistema se estresa con los benchmarks nombrados anteriormente. Con este experimento lo que se mide es cómo influye el kernel de Linux y las interrupciones que no se pueden enmascarar en las aplicaciones de tiempo real.
Por otro lado, se han realizado unas pruebas estresando con el sistema con una simulación de una aplicación de mayor prioridad que con la que se realizan las medidas. El objetivo de este segundo experimento es demostrar que el mecanismo de aislamiento es útil cuando hay interferencias con otras aplicaciones de tiempo real.
ABSTRACT: Real-time applications are essential in today's society, this is due to the large number of applications that are being given to technology in environments that have temporary requirements, some of these examples are the so-called "cars without a pilot", hearing implants or aviation systems.
In this work, we wanted to study the different alternatives to improve the temporal behaviour of Linux in real-time applications and evaluate its performance. In addition, due to Android is extremely used in the different mobile devices, we wanted to extend the study to this operative system since it is based on the Linux kernel and the solutions that have been applied are compatible. The alternatives for Linux that this work focuses on are the PREEMPT_RT patch, a popular solution to improve the temporal behaviour of Linux, and a solution proposed by the Software Engineering and Real Time group of the University of Cantabria, which is based on in a mechanism available in Linux / Android that allows to isolate a nucleus of the processor to execute the applications in real time and to reduce the interferences with the rest of the system.
The Raspberry Pi 3 B has been chosen as a device to perform the analysis of the different solutions, the reason is that they wanted to carry out all the tests in the same conditions and in the Raspberry you can install both a Linux distribution and one of Android For these tests, the system has been stressed with benchmarks such as Antutu or Geekbench, and the latency times and some functions of the operating system related to real-time applications have been measured. These functions are the mutex locks, priority changes and measurements with the timer.
First tests have been carried out where interference with other real-time applications has been avoided, where the system is stressed with the benchmarks mentioned above. With this experiment what is measured is how the Linux kernel influences and the interruptions that can´t be masked in real-time applications.
On the other hand, tests have been performed stressing with the system with a simulation of an application of higher priority than with which the measurements are made. The objective of this second experiment is to demonstrate that the isolation mechanism is useful when there is interference with other real-time applications.