1. Introduction to IoT Operating Systems
The Internet of Things (IoT) operating system is a real-time, embedded operating system with network communication capabilities. Its characteristics include small system resources, low power consumption, low cost, security and reliability, and it is designed for specific hardware and functional implementations.
The IoT operating system consists of a kernel, communication support, peripheral components, and integrated development environments, based on which a series of industry-specific applications can be derived.
2. Introduction to ThreadX
ThreadX is a real-time operating system (RTOS) developed by Express Logic, which has now been acquired by Microsoft.
The founder of ThreadX, Dr. Edward L. Lamie, was a professor in the Department of Computer Science at the University of California, Santa Barbara, engaging in teaching and research in computer science for many years. Lamie is also the founder of Nucleus RTOS (Accelerated Technology). After the Nucleus evolved from version 1.0 to 1.3, it was acquired by Mentor, which continued its development. Lamie then established Express Logic and redeveloped ThreadX, with the initial version being 3.0, which has now evolved to 5.X. Although ThreadX and Nucleus share a similar overall structure and many mechanisms, Dr. Lamie made many changes.
Express Logic is located in San Diego, California, where many high-tech companies in the wireless communication and medical fields are gathered. The famous Qualcomm company is headquartered in San Diego, and major global high-tech companies such as Texas Instruments, Samsung, Intel, Motorola, and Panasonic have dedicated wireless communication R&D institutions here, which has led to extensive applications of ThreadX in the wireless communication field.
Like many other real-time operating systems, ThreadX is a multitasking system used in embedded operating systems. Most development work is done on a host running Windows or Linux, where a cross-compiler generates the machine code for the target system and then downloads it to the target board for execution.
ThreadX adopts preemptive scheduling, fast interrupt response, independent memory management, supports inter-thread communication, mutual exclusion, events, and thread synchronization. It supports priority inheritance, and this microkernel design minimizes code space usage.
ThreadX is characterized by its small scale, strong real-time performance, high reliability, royalty-free licensing, and ease of use, and it supports a wide range of processors and SoCs. It is widely used in consumer electronics, automotive electronics, industrial automation, network solutions, military, and aerospace fields.
ThreadX is a free RTOS from Express Logic designed for high real-time applications with a small footprint and fast speed. The royalty-free business model makes ThreadX highly attractive for high-capacity devices.
The simplicity and ease of use of ThreadX also enable devices with ThreadX to hit the market on time and within budget, which are the reasons for ThreadX’s success and widespread use in the market. Currently, Express Logic has deployed its ThreadX RTOS system in over 6.2 billion devices, making it one of the most widely deployed RTOS in the world.
In March 2017, Express Logic launched its own X-WARE IoT platform, which is based on Express Logic’s ThreadX RTOS and TCP/IP network stack NetX DUO, providing industrial-grade solutions for embedded devices, including file systems (FileX), GUI, TCP/IP network stack (NetX DUO), USB protocol stack, etc.
Through this acquisition, Microsoft increases the number of devices that can seamlessly connect to Azure. Express Logic’s ThreadX RTOS joining Microsoft supports IoT devices and complements Azure Sphere. Microsoft chose Express Logic’s ThreadX RTOS mainly for its good security certification and ready connection with Azure IoT Hub.
Microsoft hopes to combine ThreadX with its existing IoT system Azure Sphere, making it easier for manufacturers to create MCU-driven devices that can connect to Azure. Azure Sphere cannot be used in resource-constrained devices, including battery-powered devices and devices with less than 64KB of flash memory (such as light bulbs, air conditioners, and medical and home devices), hence the use of Express Logic’s ThreadX RTOS for real-time processing and additional security certification. When IoT solutions require edge computing capabilities, devices supported by ThreadX can also connect to Azure IoT Edge devices. Microsoft hopes to cover over 9 billion devices through this acquisition.
3. Application Cases of ThreadX
According to CMP statistics, ThreadX RTOS has captured the third largest market share in the global hard real-time operating system market.
-
NASA’s “Deep Impact”
On July 4, 2005, NASA successfully implemented the accurate impact of the “Deep Impact” spacecraft on Comet Tempel 1, in which ThreadX played a key role in controlling the operation of all three comet imaging instruments. ThreadX controlled the high-resolution camera, medium-resolution camera, and impact target sensor. Each device helped the impactor complete the impact with the comet and collected scientific research data before, during, and after the impact. Among the three controllers, to enable the cameras to perform their daunting missions, ThreadX managed the scheduling of application threads, executed interrupt services, and transmitted messages.
The reliability of aerospace computer systems is paramount, as many aerospace environments are subject to extreme temperatures and speeds. The main hardware is designed to be very durable, and the computational frequency is not highly demanding. For this simple yet highly reliable functionality, it must ensure reliable operation and undergo certification by NASA.
-
Consumer Electronics
As a consumer electronics product, ThreadX has been widely applied. Several digital cameras from HP use ThreadX RTOS and the accompanying FileX file system components. Meanwhile, HP also uses ThreadX RTOS across its entire range of printer products, with ThreadX developed for all inkjet printers;
ThreadX is equipped with Express Logic’s TCP/IP protocol stack NetX, file system FileX, USB protocol stack USBX, and GUI development package PEGX, all of which support Tensilica’s latest Diamond Standard 106Micro products. The low-power Diamond Standard 106Micro is designed for simple controller applications in SoC (system on chip) designs, making it an ideal choice for design engineers migrating products from 8-bit/16-bit controllers to 32-bit processors.
Other digital products include Panasonic’s 11Mbs wireless network card and products from Konica-Minolta, Toshiba, Ricoh, and Samsung. Currently, it is widely used in over 450 million electronic products.
-
Renesas Electronics
Currently, ThreadX is the core of Renesas Electronics’ Synergy software package, helping embedded designers accelerate development and achieve differentiation in the IoT field. In Renesas Electronics’ new RZ/N1 solution suite released in 2017, Renesas provides use case reference ports driven by ThreadX in application subsystems, offering advanced scheduling, communication, synchronization, timers, memory management, and interrupt management facilities.
-
Atmel
Express Logic’s ThreadX RTOS and middleware enable designers to use Atmel’s SAMA5 processor devices to bring their projects to market faster. ThreadX fully supports all of Atmel’s ARM-based processor devices, including the new SAMA5D3 series, and is compatible with Atmel Studio 6 and IAR Embedded Workbench IDE. This solution offers ease of use, intuitive APIs, complete source code, royalty-free licensing, and excellent documentation and support, ensuring a seamless design experience and faster prototype delivery.
-
Kinetis MCU – NXP Semiconductors
NXP Semiconductors widely uses ThreadX RTOS in its Kinetis MCU due to Express Logic’s excellent low power performance and smart function integration, as well as the scalability of peripheral collections, fully supporting IoT, consumer devices, portable industrial applications, smart grids, and smart meters.
-
CPUs supported by ThreadX include:
PowerPC, 680×0/683xx, ColdFire, ARM7, ARM/Thumb, MCORE, ARC, TriCore, X86, StrongARM, MIPS, SH, I960, V8xx, SPARC, Xscale, H8/300H, TMS320C.
-
Applications in Mobile Operating Systems: Domestic ZTE u860 phone, Coolpad F650 phone.
4. Introduction to ThreadX Products
ThreadX is a real-time operating system (RTOS), most RTOS are used for embedded systems, specifically designed to control specific hardware. It is also possible to directly develop a dedicated application for specific hardware, but the most important feature of using RTOS is determinism, meaning that for every state and input of the system, there is a specific output and next state. Additionally, RTOS meets specific timing constraints, meaning that this output must be obtained within a specific time frame.
Here are some special designs and performances of ThreadX:
(1) Priority Scheduling
ThreadX, like other RTOS and embedded operating systems, is kernelized, with context switching, time-slice rotation, priority-based scheduling, and inheritance and inversion mechanisms. A unique feature in priority scheduling is the preemption threshold, which uses a priority upper limit to eliminate certain preemptive operations. This design is a relatively enhanced and flexible priority scheduling mechanism, allowing for trade-offs in resource allocation and priority scheduling during time-slice rotation.
(2) Support for Energy Saving
Most processors can enter low-power modes, but this mode is an interrupt-wait mode, returning to normal mode via the operating system’s interrupt instructions. Therefore, an important performance indicator for the operating system is to determine low-power mode and set more precise timing, achieved through timer programming. ThreadX adjusts its timing to specified time slices through specific service programs. This can meet very stringent timing requirements to ensure the chip’s low-power switching.
(3) Memory Management
ThreadX manages resources with two types of memory management: memory byte pools and memory block pools, providing users with great flexibility.
The memory byte pool can allocate any byte-sized memory block according to thread needs, and ThreadX imposes no limits on the usage or number of byte pools. However, this continuous memory allocation can lead to fragmentation, which ThreadX’s defragmentation can minimize additional overhead.
As for the more commonly used memory block pool in real-time operating systems, ThreadX provides memory to threads in FIFO order, simplifying memory allocation addressing through linked list operations to improve real-time performance.
(4) Inter-Thread Communication and Mutual Exclusion
ThreadX provides 32-bit semaphores for communication, which not only offer mutual exclusion but also provide event notifications and thread synchronization. Mutexes are generally used for controlling critical sections, having thread ownership and higher reliability, while semaphores excel in speed.
ThreadX uses message queues for inter-thread communication, following the first-in, first-out (FIFO) principle.
(5) Exception Handling
ThreadX tightly integrates with the processing capabilities of the processor, making it simple to use yet powerful.
ThreadX initialization occurs in the main function of the application program, where a call enters the ThreadX initialization program, allowing the definition of custom system objects (threads, queues, semaphores, mutexes, timers, memory pools, etc.).
ThreadX’s thread scheduling context is very small, typically occupying only 48 bytes of space, especially reducing the context of interrupt handling to minimize system resource consumption.
ThreadX provides basic handling for all program exceptions and interrupts of the processor, with a rotational loop set for exception handling events. When an exception occurs, developers can easily set breakpoints to detect the exception immediately.
5. Market Analysis of IoT Operating Systems
The characteristics of IoT operating systems must meet requirements for kernel real-time performance, reliability, low power consumption, and scalability. Compared to PC and mobile operating systems, IoT operating systems not only possess traditional operating system functions for device resource management but also need to shield the fragmentation characteristics of IoT, provide unified programming interfaces, achieve unified cross-platform management, and reduce application development costs and time. Therefore, more complete GUI management, network management, remote operation, and storage capability requirements are needed.
Due to the unique position of operating systems in the industrial chain, the operating system is a strategic high ground in the IoT era, indicating that this is not merely a technical competition but a contest of comprehensive strength. Today’s operating system leaders in the PC and mobile era may not continue their dominance in the IoT era. The rule of the operating system industry is that once a monopoly is formed, it is very difficult for newcomers to overturn it. Traditional operating system manufacturers like Microsoft also see this huge market opportunity.
In the future, IoT operating systems will inevitably be based on cloud platforms, leading to the formation of oligopolistic markets represented by existing cloud platform giants, such as Amazon (FreeRTOS), Microsoft (ThreadX), Alibaba (YUNOS), and Huawei (LiteOS). In terms of underlying platform technology, Microsoft holds certain advantages. However, in the mobile internet era, the front-end interaction system is also very important, such as Amazon’s Alexa. At this stage, the computing platform may have an advantage over artificial intelligence interaction interfaces because only by connecting more hardware devices and achieving greater throughput and data volume can applications become richer, providing users with better experiences and solving more problems.
China’s M2M market has surpassed 100 million, and it is expected that the market size will reach 150 billion yuan by 2020, making it the largest market globally. This year, as the beginning of 5G, the IoT industry will welcome rapid growth. In the competition with international giants, due to our vast market and leading communication and cloud computing technology accumulation, our country is in the first echelon in this field. Currently, Huawei’s LiteOS and Alibaba’s YunOS are in the lead, with Huawei relying on its technical accumulation in underlying technology development and communication connections to launch the world’s lightest IoT OS kernel, rapidly expanding its ecosystem based on China’s largest communication infrastructure. Meanwhile, Alibaba, as the largest cloud service provider in China, holds an absolute market share in the cloud computing market and has laid a huge market foundation in automotive, robotics, smart hardware, and Internet+ products, occupying a favorable position before the industry’s explosion.
For small and medium-sized startups, they can develop dedicated IoT OS in different vertical segments, such as RUFF, which has developed the IoT application product Ruff Plant Insight (Device Treasure) based on the RUFF IoT development platform. Unicorn companies like Tuya Smart mainly provide IoT operating platforms for smart home products, using AWS’s intelligent voice platform and development architecture.
Small and medium-sized enterprises can also use open-source community kernels and middleware to develop their dedicated operating systems, focusing on exploring industry and customer needs, providing high-performance and low-cost solutions.
There are many various IoT operating systems both domestically and internationally, with numerous chip manufacturers (Intel, Arm), embedded system manufacturers (Vxworks, UBuntu), and IT companies (Microsoft, Google, Oracle) launching their products. The functional differences in their kernels are not significant, while there are some differences in programming languages, existing ecosystems, and application support. In the future, underlying technology will still be dominated by large enterprises, gradually forming industry standards. Small enterprises will expand their markets starting from applications in niche areas. For startups looking to enter the IoT industry, choosing a suitable operating system architecture and making some secondary development and innovations in applications also presents great opportunities.