THREADX Modules

The THREADX Module technology enables THREADX-based applications to dynamically load and run additional application threads beyond those linked with the THREADX kernel. Applications gain increased functionality without the cost of an increased footprint or additional memory. This technique also provides on-demand reconfiguration and application updates for deployed systems. The THREADX Module technology perfectly suits situations where application code size exceeds available memory, when new modules need to be added after a product is deployed, or when partial firmware updates are required.

In addition, each module can be protected from access by other modules, and/or prevented from accessing other modules or the kernel. This adds a powerful yet efficient mechanism for protecting application threads and their stacks from corruption by other threads.

Most “small footprint” RTOSes employ an architecture based on a single executable image, where the application code is directly linked with the RTOS services it uses. This “monolithic” approach is efficient in both time and space, but it lacks flexibility. Any changes to the application require re-linking with the RTOS and a new download of the entire image to the target.

In contrast, a two-piece “OS/Application” structure is commonly found in desktop operating systems such as Windows and Linux, and in larger RTOSes, such as VxWorks and QNX. This approach is also used in mobile devices such as the iPhone and iPad, where new “apps” can be downloaded over the wireless network. Such architecture and functionality are not commonly found in small-footprint RTOSes like THREADX.

THREADX Module technology provides a breakthrough way for small-footprint applications which require the reliability and responsiveness of THREADX to achieve an even greater range of features, maintainability, and modularity in their designs. Furthermore, with Memory Protection, any desired level of granularity – from one to an unlimited number of threads – can be protected from unintended access, eliminating a common cause of difficult-to-diagnose program crashes.

THREADX Modules are collections of application threads – not linked with the THREADX kernel, but instead loaded into target memory when needed. Such Modules use THREADX kernel services via an interface with the Module Manager, an “agent,” within the THREADX kernel that loads and initiates a module, as well as fields and interfaces all module requests for THREADX API services.

Although there is only one copy of the Module Manager, there is no limit to the number of modules that can be loaded at the same time, and no limit to the number of threads in any one module. In this manner, the THREADX kernel becomes a distinct execution entity, running continuously to serve Module requests.

If desired, for maximum efficiency, application threads can alternatively be linked with the THREADX kernel and reside in target memory as part of its executable image. While this option avoids the need to reload the modules containing these threads, it increases the size of the resident kernel image, leaving less memory for use by Modules.

Subscribe to our news