Beyond the Threaded Programming Model on Real-Time Operating Systems

E. Jellum, Shaokai Lin, P. Donovan, Efsane Soyer, Fuzail Shakir, T. Bryne, M. Orlandić, Marten Lohstroh, Edward A. Lee
{"title":"Beyond the Threaded Programming Model on Real-Time Operating Systems","authors":"E. Jellum, Shaokai Lin, P. Donovan, Efsane Soyer, Fuzail Shakir, T. Bryne, M. Orlandić, Marten Lohstroh, Edward A. Lee","doi":"10.4230/OASIcs.NG-RES.2023.3","DOIUrl":null,"url":null,"abstract":"The use of a real-time operating system (RTOS) raises the abstraction level for embedded systems design when compared to traditional bare-metal programming, resulting in simpler and more reusable application code. Modern RTOSes for resource-constrained platforms, like Zephyr and FreeRTOS, also offer threading support, but this kind of shared memory concurrency is a poor fit for expressing the reactive and interactive behaviors that are common in embedded systems. To address this, alternative concurrency models like the actor model or communicating sequential processes have been proposed. While those alternatives enable reactive design patterns, they fail to deliver determinism and do not address timing. This makes it difficult to verify that implemented behavior is as intended and impossible to specify timing constraints in a portable way. This makes it hard to create reusable library components out of common embedded design patterns, forcing developers to keep reinventing the wheel for each application and each platform. In this paper, we introduce the embedded target of Lingua Franca (LF) as a means to move beyond the threaded programming model provided by RTOSes and improve the state of the art in embedded programming. LF is based on the reactor model of computation, which is reactive, deterministic, and timed, providing a means to express concurrency and timing in a platform-independent way. We compare the performance of LF versus threaded C code – both running on Zephyr – in terms of response time, timing precision, throughput, and memory footprint.","PeriodicalId":151755,"journal":{"name":"NG-RES@HiPEAC","volume":"103 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"1900-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"2","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"NG-RES@HiPEAC","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.4230/OASIcs.NG-RES.2023.3","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 2

Abstract

The use of a real-time operating system (RTOS) raises the abstraction level for embedded systems design when compared to traditional bare-metal programming, resulting in simpler and more reusable application code. Modern RTOSes for resource-constrained platforms, like Zephyr and FreeRTOS, also offer threading support, but this kind of shared memory concurrency is a poor fit for expressing the reactive and interactive behaviors that are common in embedded systems. To address this, alternative concurrency models like the actor model or communicating sequential processes have been proposed. While those alternatives enable reactive design patterns, they fail to deliver determinism and do not address timing. This makes it difficult to verify that implemented behavior is as intended and impossible to specify timing constraints in a portable way. This makes it hard to create reusable library components out of common embedded design patterns, forcing developers to keep reinventing the wheel for each application and each platform. In this paper, we introduce the embedded target of Lingua Franca (LF) as a means to move beyond the threaded programming model provided by RTOSes and improve the state of the art in embedded programming. LF is based on the reactor model of computation, which is reactive, deterministic, and timed, providing a means to express concurrency and timing in a platform-independent way. We compare the performance of LF versus threaded C code – both running on Zephyr – in terms of response time, timing precision, throughput, and memory footprint.
超越实时操作系统上的线程编程模型
与传统的裸机编程相比,实时操作系统(RTOS)的使用提高了嵌入式系统设计的抽象级别,从而产生更简单、更可重用的应用程序代码。面向资源受限平台的现代rtos,如Zephyr和FreeRTOS,也提供线程支持,但这种共享内存并发性并不适合表达嵌入式系统中常见的反应性和交互行为。为了解决这个问题,已经提出了其他并发模型,如参与者模型或通信顺序过程。虽然这些替代方案支持响应式设计模式,但它们不能提供确定性,也不能解决时间问题。这使得很难验证实现的行为是否如预期的那样,也不可能以可移植的方式指定时间约束。这使得从常见的嵌入式设计模式中创建可重用的库组件变得困难,迫使开发人员不断为每个应用程序和每个平台重新发明轮子。在本文中,我们介绍了Lingua Franca (LF)的嵌入式目标,作为超越rtos提供的线程编程模型的一种手段,并提高了嵌入式编程的技术水平。LF基于反应式计算模型,该模型具有反应性、确定性和计时性,提供了一种以平台无关的方式表达并发性和计时性的方法。我们在响应时间、计时精度、吞吐量和内存占用方面比较了LF和线程C代码的性能(两者都在Zephyr上运行)。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
0
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信