ThreadX

{{Short description|Real-time operating system}}

{{Infobox OS

|name = Eclipse ThreadX

|logo =

|logo size =

|screenshot =

|caption =

|developer = Express Logic (original)
Microsoft (former)
Eclipse (current)

|family =

|working state = Current

|source model = Open source

|released = {{Start date and age|1997}}

|latest release version = 6.4.1{{Cite web|url=https://github.com/eclipse-threadx/threadx/releases/tag/v6.4.1_rel|title = Releases · eclipse-rtos/Threadx|website = GitHub}}

|latest release date = {{Start date and age|2024|02|28}}

|repo = {{URL|https://github.com/eclipse-threadx/threadx/}}

|marketing target = Embedded systems, IoT

|programmed in = C

|language =

|update model = Re-install

|package manager = None

|supported platforms = ARC, ARM, Blackfin, CEVA, C6x, MIPS, NXP, PIC, PowerPC, RISC-V, RX, SH, SHARC, TI, V850, Xtensa, x86, Coldfire, others

|kernel type = Embedded, deterministic, real-time microkernel, picokernel

|userland =

|ui = Embedded UI support (GUIX)

|license = MIT License (as of 2023)

|website = {{URL|https://threadx.io/|threadx.io}}

}}

ThreadX is an embedded real-time operating system (RTOS) programmed mostly in the C language. It was originally released in 1997 as ThreadX when Express Logic first developed it, later it was renamed to Azure RTOS (2019) after Express Logic was purchased by Microsoft, then most recently it was renamed again to Eclipse ThreadX (2023), or "ThreadX" in its short form, after it transitioned to free open source model under the stewardship of the Eclipse Foundation.

History

In 1997, ThreadX was first released and marketed by Express Logic of San Diego, California, United States. It was developed by William Lamie,{{cite web |title=Bill Lamie: Story of a man and his real-time operating systems |url=https://embedded.com/design/operating-systems/4207336/Bill-Lamie--Story-of-a-man-and-his-real-time-operating-systems |publisher=Embedded.com |archive-url=https://web.archive.org/web/20160702142215/https://embedded.com/design/operating-systems/4207336/Bill-Lamie--Story-of-a-man-and-his-real-time-operating-systems |archive-date=July 2, 2016 |date=September 3, 2010 |url-status=dead}} who was also the original author of Nucleus and PX5 RTOS, and was President and CEO of Express Logic. ThreadX version 4 was introduced in 2001, version 5 was introduced in 2005, then version 6 was introduced in 2020 (latest major version). FileX – the embedded file system for ThreadX was introduced in 1999. NetX – the embedded TCP/IP networking stack for ThreadX was introduced in 2002. USBX – the embedded USB support for ThreadX was introduced in 2004. ThreadX SMP for SMP multi-core environments was introduced in 2009. ThreadX Modules was introduced in 2011. ThreadX achieved safety certifications for: TÜV IEC 61508 in 2013, and UL 60730 in 2014. GUIX – the embedded UI for ThreadX was introduced in 2014.

On April 18, 2019, Microsoft purchased Express Logic for an undisclosed sum and it was renamed to Azure RTOS.{{cite news |title=How Does The Express Logic Acquisition Help Microsoft And The IoT Ecosystem |url=https://www.forbes.com/sites/janakirammsv/2019/04/21/how-does-the-express-logic-acquisition-help-microsoft-and-the-iot-ecosystem/ |work=Forbes |date=April 21, 2019 |archive-url=https://web.archive.org/web/20230211175406/https://www.forbes.com/sites/janakirammsv/2019/04/21/how-does-the-express-logic-acquisition-help-microsoft-and-the-iot-ecosystem/ |archive-date=February 11, 2023 |url-status=live}}

On November 21, 2023, Microsoft announced Azure RTOS would be transitioning to an open source model under the stewardship of the Eclipse Foundation, and making the project available under the permissive MIT License.{{cite web |title=Microsoft Contributes Azure RTOS to Open Source |url=https://techcommunity.microsoft.com/blog/iotblog/microsoft-contributes-azure-rtos-to-open-source/3986318 |website=Microsoft |archive-url=https://web.archive.org/web/20241123064136/https://techcommunity.microsoft.com/blog/iotblog/microsoft-contributes-azure-rtos-to-open-source/3986318 |archive-date=November 23, 2024 |date=November 21, 2023 |url-status=live}} With Eclipse Foundation as the new home, Azure RTOS was renamed to Eclipse ThreadX, or "ThreadX" in its short form.

Overview

{{copy edit|section|date=January 2025}}

{{more citations needed|section|date=January 2025}}

The name ThreadX was derived from the threads that are used as the executable elements, and the letter X represents context switching, i.e., it switches threads.

ThreadX provides priority-based, preemptive scheduling, fast interrupt response, memory management, interthread communication, mutual exclusion, event notification, and thread synchronization features. Major distinguishing technology characteristics of ThreadX include preemption-threshold, priority inheritance, efficient timer management, fast software timers, picokernel design, event-chaining, and small size: minimal size on an ARM architecture processor is about 2 KB.

ThreadX supports multi-core processor environments via either asymmetric multiprocessing (AMP) or symmetric multiprocessing (SMP). Application thread isolation with memory management unit (MMU) or memory protection unit (MPU) memory protection is available with ThreadX Modules.

ThreadX has extensive safety certifications from Technischer Überwachungsverein (TÜV, English: Technical Inspection Association) and UL (formerly Underwriters Laboratories) and is Motor Industry Software Reliability Association MISRA C compliant.

ThreadX is the foundation of Express Logic's X-Ware Internet of things (IoT) platform, which also includes embedded file system support (FileX), embedded UI support (GUIX), embedded Internet protocol suite (TCP/IP) and cloud connectivity (NetX/NetX Duo), and Universal Serial Bus (USB) support (USBX). ThreadX has won high appraisal from developers and is a very popular RTOS.{{cite web |title=High Performance RTOS ThreadX: Express Logic |url=https://www.renesas.com/us/en/about/edge-magazine/partner/18-express-logic.html |website=Renesas Electronics |archive-url=https://web.archive.org/web/20190302222455/https://www.renesas.com/us/en/about/edge-magazine/partner/18-express-logic.html |archive-date=March 2, 2019 |date=2018 |url-status=dead}}

{{As of|2017}}, according to marketing research firm VDC Research, the ThreadX RTOS has become one of the most popular RTOSes in the world, having been deployed in over 6.2 billion devices, including consumer electronics, medical devices, data networking applications, and SoCs.{{cite web |title=IoT & Embedded Technology Report |url=https://www.vdcresearch.com/Coverage/IoT-Tech/reports/17-embedded-OS.html |website=VDC Research |archive-url=https://web.archive.org/web/20240515130848/https://www.vdcresearch.com/Coverage/IoT-Tech/reports/17-embedded-OS.html |archive-date=May 15, 2024 |date=December 2017 |url-status=live}}

=Technology=

ThreadX implements a priority-based, preemptive scheduling algorithm with a proprietary feature called preemption-threshold. The latter has been shown to provide greater granularity within critical sections, reduce context switches, and has been the subject of academic research on guaranteeing scheduling.{{cite web |title=Scheduling Fixed-Priority Tasks with Preemption Threshold |url=http://www.cs.utah.edu/~regehr/reading/open_papers/preempt_thresh.pdf |website=University of Utah - Department of Computer Science |archive-url=https://web.archive.org/web/20170330125248/http://www.cs.utah.edu/~regehr/reading/open_papers/preempt_thresh.pdf |archive-date=March 30, 2017 |date=December 1999 |url-status=dead}}

ThreadX provides a unique construct called event chaining,{{cite web |title=Event Chaining Enables Real-Time Systems to Respond to Multiple Real-Time Events More Efficiently |url=https://rtos.com/wp-content/uploads/2017/10/EL_Event_Chaining_Reduces_Overhead.pdf |website=Express Logic |archive-url=https://web.archive.org/web/20180614174211/https://rtos.com/wp-content/uploads/2017/10/EL_Event_Chaining_Reduces_Overhead.pdf |archive-date=June 14, 2018 |date=July 21, 2016 |url-status=dead}} where the application can register a callback function on all application programming interfaces (APIs) that can signal an external event. This helps applications chain together various public objects in ThreadX such that one thread can effectively block on multiple objects.

ThreadX also provides counting semaphores, mutexes with optional priority inheritance, event flags, message queues, software timers, fixed sized block memory, and variable sized block memory. All APIs in ThreadX that block on resources also have an optional timeout.

ThreadX offers multi-core processor support via either AMP or SMP. Application code isolation is available through ThreadX Modules component.

=Safety certification=

ThreadX (and FileX and NetX Duo) have been precertified by SGS-TÜV Saar to the following safety standards:

IEC 61508 SIL 4, IEC 62304 Class C, ISO 26262 ASIL D, and EN 50128 SW-SIL 4.

ThreadX (and FileX and NetX Duo) have been precertified by UL to the following safety standards:

UL/IEC 60730, UL/IEC 60335, UL 1998

ThreadX has also been certified to DO-178 standards by various military and aerospace companies. It is supported by popular Transport Layer Security (SSL/TLS) libraries such as wolfSSL.{{cite web |title=wolfSSL with Improved ThreadX/NetX Support |url=https://www.wolfssl.com/wolfssl-improved-threadx-netx-support/ |website=wolfSSL |archive-url=https://web.archive.org/web/20230330081408/https://www.wolfssl.com/wolfssl-improved-threadx-netx-support/ |archive-date=March 30, 2023 |date=January 16, 2018 |url-status=live}}

=Packaging=

As of 2017, ThreadX is packaged as part of X-Ware IoT Platform in full source code and with no runtime royalty payment.

Major components

The major ThreadX components are:

=ThreadX=

ThreadX is the real-time operating system (RTOS).

=FileX & LevelX=

FileX is an optional file system for ThreadX. It supports FAT12, FAT16, FAT32, and exFAT file systems. The latter extends FAT file sizes beyond 4 GB, which is useful for large video files.

It also offers fault tolerance and supports direct NOR and NAND flash memory media through optional flash wear leveling product called LevelX.

=GUIX=

GUIX is an optional graphical user interface (GUI) for ThreadX. It provides a 2D computer graphics system that supports multiple display devices with a variety of screen resolutions and color depths. Many predefined graphical widgets are available. A Windows WYSIWYG host tool called GUIX Studio automatically generates C code for GUIX to execute at runtime.

=NetX Duo=

NetX Duo is an optional TCP/IP network system for ThreadX. It supports both IPv4 and IPv6 networking with IPsec network security. TCP and UDP socket layers are provided by TLS / DTLS. Optional protocols include ARP, Auto IP, DHCP, DNS, DNS-SD, FTP, HTTP, ICMP, IGMP, mDNS, POP3, PPP, PPPoE, RARP, TFTP, SNTP, SMTP, SNMP, and Telnet. IoT Cloud protocol support includes CoAP, MQTT, and LWM2M. NetX Duo also supports Thread and 6LoWPAN. In 2017, ThreadX and NetX Duo became a Thread Certified Product.{{cite web |title=Thread Certified Products |url=https://www.threadgroup.org/technology/ourtechnology#certifiedproducts |website=Thread Group |archive-url=https://web.archive.org/web/20180614050125/https://www.threadgroup.org/technology/ourtechnology#certifiedproducts |archive-date=2018-06-14 |url-status=dead}}

=USBX=

USBX is an optional Universal Serial Bus (USB) system for ThreadX. It supports both host / device / on-the-go (OTG). Host controller support includes EHCI, OHCI, and proprietary USB host controllers.

It supports these USB Device Classes: Audio, Asix, CDC/ACM, CDC/ECM, DFU, GSER, HID, PIMA, Printer, Prolific, RNDIS, and Storage.

=TraceX=

TraceX is optional host software that provides a graphical view of ThreadX RTOS events. It requires Windows XP or later.

Supported ports

{{Div col|colwidth=22em}}

  • ARM classic cores (32bit){{cite web |title=Eclipse - ThreadX - ThreadX Overview |url=https://github.com/eclipse-threadx/threadx |website=GitHub |archive-url=https://web.archive.org/web/20241203085006/https://github.com/eclipse-threadx/threadx |archive-date=December 3, 2024 |url-status=live}}{{cite web |title=Eclipse - ThreadX - RTOS Docs |url=https://github.com/eclipse-threadx/rtos-docs |website=GitHub |archive-url=https://web.archive.org/web/20241203104237/https://github.com/eclipse-threadx/rtos-docs |archive-date=December 3, 2024 |url-status=live}}
  • ARM7
  • ARM9
  • ARM11

{{Div col end}}

Products using ThreadX

Some examples of products that use ThreadX:

  • Small wearable devices.
  • Hewlett-Packard inkjet printers and all-in-one devices.{{cite web |title=Hewlett Packard |url=https://www.ghs.com/customers/hp.html |website=Green Hills Software |archive-url=https://web.archive.org/web/20241208134709/https://www.ghs.com/customers/hp.html |archive-date=December 8, 2024 |url-status=live}}
  • Intel Management Engine (ME).{{cite web |title=The Intel Management Engine |url=https://bitkeks.eu/blog/2017/12/the-intel-management-engine.html |website=bitkeks.eu |archive-url=https://web.archive.org/web/20240423045055/https://bitkeks.eu/blog/2017/12/the-intel-management-engine.html |archive-date=April 23, 2024 |date=December 5, 2017 |url-status=live}}
  • NASA Deep Impact space probe.{{cite news |title=Case study: NASA's "Deep Impact" employs embedded systems to score bullseye 80 million miles away |publisher=Military Embedded Systems |date=January 13, 2006 |url=http://mil-embedded.com/article-id/?400= |access-date=March 30, 2015 |archive-url=https://web.archive.org/web/20150404014428/http://mil-embedded.com/article-id/?400= |archive-date=April 4, 2015 |url-status=dead}}
  • Raspberry Pi line of single-board computers runs ThreadX as a binary blob on the graphics processing unit (GPU). This controls initial booting, which in turn is used to boot secondary operating systems such as Linux, and continues to operate in a more privileged role even after the boot process.{{cite web|url=https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/ |title=What's Wrong with the Raspberry Pi |website=Own Your Bits |date=February 2, 2019 |archive-url=http://web.archive.org/web/20220531105341/https://ownyourbits.com/2019/02/02/whats-wrong-with-the-raspberry-pi/ |archive-date=2022-05-31 |url-status=dead |access-date=2024-03-09}}

See also

References

{{Reflist}}

Further reading

;ThreadX documentation

  • [https://download.microsoft.com/download/2/c/b/2cb3177a-fe68-4fd6-8d62-9411fb341982/Azure_RTOS_ThreadX_User_Guide.pdf ThreadX User Guide (2020)] - Microsoft
  • [https://download.microsoft.com/download/2/c/b/2cb3177a-fe68-4fd6-8d62-9411fb341982/Azure_RTOS_FileX_User_Guide.pdf FileX User Guide (2020)] - Microsoft
  • [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_GUIX_User_Guide.pdf GUIX User Guide (2020)] - Microsoft
  • [https://download.microsoft.com/download/2/c/b/2cb3177a-fe68-4fd6-8d62-9411fb341982/Azure_RTOS_NetX_Duo_User_Guide.pdf NetX User Guide (2020)] - Microsoft
  • [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_USBX_Device_Stack_User_Guide.pdf USBX Device User Guide (2020)] - Microsoft
  • [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_USBX_Host_Stack_User_Guide.pdf USBX Host User Guide (2020)] - Microsoft
  • [https://download.microsoft.com/download/5/c/a/5ca24937-7d10-4f35-a189-84dae5d5ef50/Azure_RTOS_USBX_Host_Stack_User_Guide_Supplemental.pdf USBX Host Supplemental User Guide (2020)] - Microsoft

;RTOS comparison

  • [https://github.com/user-attachments/files/17348393/Beningo-RtosPerformance-2024-Report.pdf 2024 RTOS Performance Report] (FreeRTOS / ThreadX / PX5 / Zephyr) - Beningo Embedded Group
  • [https://web.archive.org/web/20170904172524/http://www.embedded.com/design/operating-systems/4425751/2/Comparing-microcontroller-real-time-operating-systems 2013 RTOS Comparison] (Nucleus / ThreadX / ucOS / Unison) - Embedded Magazine