SynthOS and task-oriented programming

February 2, 2016 OpenSystems Media

Since the early days of computers, programmers have endeavored to develop more efficient software through simplicity and reusability of code. Programming languages and design methodologies were developed to manage the growing complexity of software systems. In many cases, this made development more efficient but came at the expense of system efficiency, with increased demand for hardware resources like memory and CPU time. While Moore’s Law continues to bring hardware costs down, embedded systems in particular are still cost-sensitive as they’re being introduced in more price-sensitive consumer goods.
Overall system requirements are more complicated when it comes to embedded systems. In addition to the typical challenges of memory and processing power, embedded systems have other constraints such as cost, size, and power consumption. So, it’s imperative to strive for a highly efficient system from both the hardware and software perspectives.
In the past 30 years, the leading approach to software development has been object-oriented programming (OOP) and the leading language has been C++. OOP works well when it comes to applications that have a high content of user interfaces, graphics, and databases. However, when it comes to low-level embedded systems, a more procedural development approach will usually generate more efficient and simple code; we call this approach task-oriented programming (TOP).
When you look at the design of an embedded system, unlike a typical large-scale system like enterprise software or a database, the functionality is well defined. In industrial controls, robots, home appliances, or automobile control systems, we can describe the software running those devices as a list of tasks that must be performed within specific time constraints. This behavior can be described in the form of a flowchart.
The key for a successful embedded design is performing the required tasks in the correct order and with the mandatory timing. It also requires the ability to overcome problems with inputs or environmental effects without failing or needing human intervention. To help with the design and implementation of complex systems and, especially embedded systems, TOP starts by considering the basic flowchart and defining the tasks a system needs to perform.
TOP first considers the main tasks that the system needs to perform, the relationships between those tasks, and the priorities and relative timing of those tasks. Once they are defined, the system can be implemented. The programmers create each task independently and test them for functional performance. Then a system can be built that schedules, synchronizes, and executes those tasks. In essence, a kernel and the infrastructure for the system are built from the requirements that are defined by the system constraints, as outlined in the flowchart, and the requirements of each task. For this, SynthOS is a tool that takes as input the source code for the tasks the system needs to perform and a configuration file that defines the system and the relations between the tasks. SynthOS analyzes the task code and configuration information and synthesizes a complete system including tasks and a task scheduler. We call the system built by SynthOS an application-specific operation system (ASOS).
It’s obvious when you look at any system and try to analyze it using a TOP methodology that not all tasks are created equal. Some are at the core of the system and run continually as long as the system is running, while others are short-term activities that perform some operation and then exit. The tasks’ timing is also critical; different tasks can have different priorities for execution, while others run based on some external activities like timers or communication input.
All of those aspects are defined in the code itself using SynthOS-specific commands called “primitives” and in the system’s configuration file. SynthOS has only three types of tasks and five primitives that can be used to completely define a task-oriented system and generate the ASOS for it.
Jacob Harel is the Vice President of Business Development/Product Management at Zeidman Technologies. He is the named inventor on several patents. He holds a BA in Computer Science and Economics from Tel Aviv University.
Zeidman Technologies

Jacob Harel, Zeidman Technologies
Previous Article
Embedded World 2016: The 'connected framework' driving IoT innovation

Analogous to the challenges of integrating often inherently disparate systems to form a functional IoT end-...

Next Article
Prevent defects in automotive software with three static analysis rule types

It's well understood that electronic systems in automobiles are not only becoming more complex, but they're...