Abstract
we developed an input subsystem for the Baget microkernel real-time operating system (RTOS). We studied the adaptation of graphical environments, including the X Window System, to real-time systems and identified the non-deterministic behavior of conventional solutions based on the udev/libinput stack as a major challenge. To address this issue, we developed a hot-plug mechanism for input devices that operates independently of udev, is integrated into a dedicated X server input thread, and provides predictable response times. The proposed mechanism relies on periodic scanning of the /dev file system and interaction with the X server application programming interface (API) through callbacks and synchronization mechanisms. We also developed an input subsystem for user applications that abstracts low-level device interfaces and can be used independently of the X server. In addition, we implemented a touchscreen calibration application based on a five-point calibration procedure and the least-squares method to determine the parameters of an affine transformation. The application automatically generates the corresponding X server configuration. We evaluated all developed components through a series of tests. The results confirm their operability, deterministic behavior, and practical applicability, including integration with the Nuklear graphical user interface framework. The study demonstrates the feasibility of adapting complex software systems for use in specialized deterministic environments.
References
Feske N., Hartig H. DOpE — A Window Server for Real-Time and Embedded Systems. Proceedings of the 24th IEEE International Real-Time Systems Symposium (RTSS 2003, Cancun, Mexico). 2003:74–77. DOI: 10.1109/REAL.2003.1253255.
Giatsintov A. M., Mamrosenko K. A., Bazhenov P. A. Architecture of Graphics System with 3D Acceleration Support for Embedded Operating Systems. Tsinghua Science and Technology. 2024;29(3):863–873. DOI: 10.26599/TST.2023.9010045.
Zhadchenko A. V., Mamrosenko K. A., Giatsintov A. M. Porting X Windows System to Operating System Compliant with Portable Operating System Interface. International Journal of Advanced Computer Science and Applications. 2020;11(7):17–22.
Von Arnim C., Gessner G., Jarwitz M., Lechler A., Riedel O. Updating the Linux TAPRIO Scheduler in Deterministic Time. Proceedings of the 2022 IEEE 27th International Conference on Emerging Technologies and Factory Automation (ETFA, Stuttgart, Germany). 2022:1–7. DOI: 10.1109/ETFA52439.2022.9921594.
Yang C.-F., Shinjo Y. Obtaining Hard Real-Time Performance and Rich Linux Features in a Compounded Real-Time Operating System by a Partitioning Hypervisor. Proceedings of the 16th ACM SIGPLAN/SIGOPS International Conference on Virtual Execution Environments (VEE 2020, Lausanne, Switzerland). 2020:59–72. DOI: 10.1145/3381052.3381329.
Manrique D. X Window System Architecture Overview. Режим доступа: https://tldp.org/HOWTO/pdf/XWindow-Overview-HOWTO.pdf.
Wayland Architecture. Режим доступа: https://wayland.freedesktop.org/architecture.html.
Dørum M. Wayland Input Latency. GitLab Blog. 2025. Режим доступа: https://gitlab.com/mort96/blog/-/blob/published/content/00000-home/00016-wayland-input-latency.md.
Input Subsystem Architecture. The Linux Kernel Documentation. Режим доступа: https://docs.kernel.org/input/input.html.
Udev. ALT Linux Wiki. Режим доступа: https://www.altlinux.org/Udev.
What Is libinput? libinput Documentation. Режим доступа: https://wayland.freedesktop.org/libinput/doc/latest/what-is-libinput.html.
ЭРЕМЕКС. Разработка встроенных операционных систем реального времени. Режим доступа: https://www.eremex.ru/upload/iblock/eb6/rtos_dev_book.pdf.
Enea Linux Open Source Report. Режим доступа: https://linux.enea.com/4.0/documentation/html/book-enea-linux-open-source/index.html.
Fang W., Chang T. Calibration in Touch-Screen Systems. Режим доступа: https://www.ti.com/lit/an/slyy137/slyy137.pdf.
Lewis F. L. Optimal Estimation: With an Introduction to Stochastic Control Theory. New York: John Wiley & Sons; 1986. 376 p.

