Особливості реалізації багатозадачності на платформах Raspberry Pi та Arduino
Вантажиться...
Дата
Автори
Назва журналу
Номер ISSN
Назва тому
Анотація
The most popular platforms for developers of embedded systems among beginners are Arduino and Raspberry Pi. These platforms are different and have different purposes, but both may need to perform multiple operations in parallel. The article shows ways to implement multitasking on the above-mentioned platforms. Since Arduinos are mostly based on single-core AVR microcontrollers, with a rather low clock frequency, the multitasking of this platform is only conditional. Time-consuming operations will occupy the only core and the only thread of the microcontroller, which will not allow doing anything else. This does not apply to the hardware components of the microcontroller, such as timers, which work inde-pendently from the software part and allow the implementation of short tasks with a fixed period. There are libraries for simply writing a program that uses such controller capabilities. The most famous of them is TimedAction, which can be found on the official Arduino website. Also, most microcontrollers have a hardware input that can be used to generate soft-ware interrupts. During the interruption, operations can also be performed, after the completion of which the work of the main loop of the program will be resumed. On the Raspberry Pi, as on similar microcomputers running the Linux OS, you can fully consider threads and processes. A process is an instance of a program and is created by the operating system. Individual processes do not share a common memory. Parallel processes are used when complex calculations need to be accelerated. Threads are subtasks, which can be several within a process. There is a common amount of memory between several threads, which allows convenient data exchange. Parallel threads are used when you need to perform long I/O operations. In the Python language, which is widely used in embedded systems, the Threading library is used to implement multithreading. A feature of multitasking in Python is the Global Interpreter Lock. This mechanism ensures that the code of only one application process will be executed at a time. This feature of Python has supporters and detractors, as well as advantages and disadvantages.
Опис
Ключові слова
embedded , Arduino , Raspberry Pi , Python , microcontroller , microcomputer , embedded systems , multitasking , process , thread
УДК
Тип документа
Мова
ISSN
Бібліографічний опис
Бруско А. В. Особливості реалізації багатозадачності на платформах Raspberry Pi та Arduino [Текст] / А. В. Бруско, О. Ю. Мирончук // Вісник Вінницького політехнічного інституту. – 2022. – № 5. – С. 80–85.
Схвалення
Рецензія
Доповнено
Цитується в
Список використаної літератури (11)
- J. Marot, and S. Bourennane, “Raspberry Pi for image processing education,” 2017 25th European Signal Processing Conference (EUSIPCO), 2017, pp. 2364-2366, https://doi.org/10.23919/EUSIPCO.2017.8081633 .
- V. Bharadwaja, R. Ananmy, S. Nikhil, K. V. Vineetha, J. Shah, and D. G. Kurup, “Implementation of Artificial Neural Network on Raspberry Pi for Signal Processing Applications,” in 2018 International Conference on Advances in Computing, Communications and Informatics (ICACCI), 2018, pp. 1488-1491, https://doi.org/10.1109/ICACCI.2018.8554887 .
- A. P. Jadhav, and V. B. Malode, “Raspberry PI Based OFFLINE MEDIA SERVER,” 2019 3rd International Conference on Computing Methodologies and Communication (ICCMC), 2019, pp. 531-533, https://doi.org/10.1109/ICCMC.2019.8819718 .
- D. Eridani, and E. D. Widianto, “Performance of Sensors Monitoring System using Raspberry Pi through MQTT Proto-col,” in 2018 International Seminar on Research of Information Technology and Intelligent Systems (ISRITI), 2018, pp. 587-590, https://doi.org/10.1109/ISRITI.2018.8864473 .
- Xinmin Tian, Yen-Kuang Chen, M. Girkar, S. Ge, R. Lienhart, and S. Shah, “Exploring the use of Hyper-Threading tech-nology for multimedia applications with Intel/spl reg/ OpenMP compiler,” Proceedings International Parallel and Distributed Processing Symposium, 2003, pp. 8. https://doi.org/ 10.1109/IPDPS.2003.1213118 .
- H.-W. Huang, The Atmel AVR Microcontroller: MEGA and XMEGA in Assembly and C. Cengage Learning, 2013, 816 p.
- D. Bovet, and M. Cesati, Understanding the Linux Kernel, Janaury 2001. OŔeally & Associates, Sebastopol (2001)
- B. J. Catanzaro, Multiprocessor system architectures. Englewood Cliffs, N.J : PTR Prentice Hall, 1994.
- G. P. Duggan, and P. Young, “Precision timing on low-cost Linux microcomputers,” in 2015 Annual IEEE Systems Con-ference (SysCon) Proceedings, 2015, pp. 469-471, https://doi.org/ 10.1109/SYSCON.2015.7116795 .
- A. Martelli, and D. Ascher, Eds., 2002. Python Cookbook. Sebastopol: O'Reilly. ISBN: 0-596-00167-3 .