Delkin Blog

Taking a Look at Real Time Embedded & Operating Systems (RTOS)

 

Real-Time Embedded & Operating Systems (RTOS) are operating systems (OS) for applications that process data in real-time with critically defined deadlines. Both event-driven and preemptive, real-time operating systems are able to prioritize tasks within specific time constraints. RTOS schedulers provide predictable patterns for embedded systems to meet the requirements of the deterministic thread of executions.

 

Delkin Devices provides rugged industrial embedded storage for all industries, from aerospace and automotive to gaming and medical. Delkin’s state-of-the-art flash memory solutions include customized options engineered by our expert customer support team for standard OS systems, as well as RTOS that meet data integrity requirements while promising host architecture compatibility and matching application workload requirements.

 

RTOS Firmware

Real-time systems consist of both software and hardware, both referred to as firmware. The firmware for RTOS include as follows:

 

Hardware:

 

  • Central Processing Units (CPU) of varying types including Reduced Instruction Set Computer (RISC), Complex Instruction Set Computer (CISC), single core, multi-core, and fully integrated application-specific integrated circuit (ASIC) type controllers, which administer instructions in applications by the system programmer.
  • RAM Memory and Dynamic Random Access Memory (DRAM) controllers to run programs and store transient data. DRAM controllers typically make up a part of the CPU, flash memory, or Read-Only Memory (ROM), holding the low-level boot code, loader code, and on occasion, the Basic IO System (BIOS) which can be found in PC designs where the BIOS assists in low-level HW initialization while performing initial hardware scans and handling software interruption calls while featuring low-level device driver hooks.
  • Interrupt controllers, which by standard make up a part of the CPU.
  • System HW timers, which are system tick counters for time-constrained events that are also a component of the CPU. System HW timers that feature finer resolutions are more accurate in timing.
  • Parallel and Serial I/Os
  • Power monitors, also part of the CPU, which produce interrupt and reset at voltage drops.
  • Mass Storage Interfaces, including SATA, MSATA, SD cards, microSD cards, CFAST cards, and USBs. Traditionally optional, these storage solutions are rapidly becoming a mandatory component of RTOS hardware for highly-integrated CPU and ASIC devices.
  • High-speed Ethernet for networking and possibly also wireless communication capabilities.

 

Real-Time Operating Systems (RTOS) Defined

Real-time systems deviate from your standard OS systems, for example PCs, in that they must respond to external stimulants in real time within a specific set of time restraints. The response time of real-time systems needs to be deterministic, meaning they must be both repeatable and verifiable in order to function properly and meet their necessary demands—a challenging task for even the most cutting-edge systems.

 

Real-time systems can be divided into two categories: Hard Real Time and Soft Real Time.

 

Hard Real-Time systems result in catastrophic consequences when their detailed requirements are not carried out. Examples of Hard Real-Time systems include airbags that are not deployed upon sensory triggers, heart defibrillators that fail to activate after an arrhythmia is detected, or brake pedals that don’t respond to sudden full pressure imposed by the driver.

 

There are various Hard Real-Time system requirements, especially in applications like vehicles, which can be met and maintained thanks to multiple CPU-based modules linked by a bus topology like optical, fast Ethernet, or even CAN bus. Typically, Hard Real-Time System requirements can’t be met with one CPU module alone.

 

Soft Real-Time systems, on the other hand, still result in penalties when failing to meet the time-restrained requirements of their host applications, but without the drastic effects that their counterparts face, thanks to their built-in tolerances and easy implementation strategies. Soft Real-Time system examples include low fuel display warnings in vehicles or less-than-severe tire pressure losses.

 

About Firmware and the Operating System (OS) and Real-Time Operating System (RTOS)

Contrary to what you may think, non-critical applications don’t require operating systems in order to program them—especially with low memory and budgetary constraints. Actually, through the proper use of interrupts, even hard real-time requirements are capable of being met in this way, especially when they lack heavy storage access or high speed communications requirements.

 

While the above mentioned practice was the norm in the past, it’s faded out over time due to several factors. First and foremost, as the cost of memory has dropped significantly, many companies can afford to integrate the support of OS systems into their budgets. Even real-time operating systems are priced far under what they used to be, and feature smaller footprints when it comes to their memory requirements.

 

To add to their desirable price points, both OS and RTOS systems simplify development tasks while forcing modular programming in order to handle complex requirements with ease. Furthermore, high level system calls reduce I/O and device drivers manage underlying low level operations for seamless functionality. Processes and tasks in RTOS inter-task communication facilities are able to communicate freely and break down requirements into processes, tasks, and threads to guarantee reliable and high performance levels.

 

What Differentiates RTOS From Standard OS Systems?

Real-time operating systems are OS systems but with specified time-constrained requirements. These systems allow applications to process data the moment they are received. Contemporary RTOS systems are highly sophisticated, and able to process interrupts within milliseconds and without buffer delays.

 

RTOS systems are either event-driven or time-sliced, or occasionally a combination of the two. While event-driven RTOS systems prioritize which tasks to perform first, time slice systems, also known as Round Robin scheduling, instead allot clock interrupts per task from the hardware timer powered by the OS kernel.

 

The key reason an RTOS is so effective in implementing the tasks of applications in real time is its consistency. However, Soft Real-Time systems feature slightly less reliable functions than Hard Real-Time systems. By measuring variable factors known as “jitters,” designers test the systems to determine if they’re consistent enough for Soft Real-Time systems or deterministically reliable to be used with the high demands of Hard Real-Time systems.

 

Real-Time OS systems operate around a tight task schedule powered by its algorithms, and they feature a minimal amount of interrupt and thread/task switching latency. Typically in OS systems, scheduler flexibility is more efficient as it can prioritize tasks based on immediate needs, but the RTOS is valued more for its predictable and fast-acting responses, rather than how many tasks it can complete.

 

The RTOS Design

At the heart of an RTOS lies the kernel, a task scheduling manager also referred to as a scheduler, which delegates tasks according to priority and status. Other elements of the kernel include inter-task messaging, memory management, interrupt management, timer management, and resource sharing.

 

As previously mentioned, Real-Time OS systems operate based on task reliability determined by their algorithms. The kernel is able to implement this by suspending a task upon detection that another is more urgent, and promptly invoking and executing the task that holds greater priority. This method is called context switching and involves the suspension of the first task with the loading and execution of the higher priority one. The task context of the suspended task—including the information and memory it uses to perform its function—is then pushed onto the stack.

 

Apart from the main features of a kernel are a variety of additional service options including:

 

  • Device I/O
  • File System
  • Networking Stacks
  • Device Drivers
  • Debugging Facilities

 

Real-Time OS systems will vary in size depending on how many services they include. Delkin Devices offers customized RTOS systems that are specifically designed to meet the unique needs of your application.

 

Popular Real-Time Operating Systems

Among the most popular Real-Times OS systems are Linux variants and Windows Embedded variants. Linux is favored for its open source features, which include but are not limited to device drivers, kernels, communication stacks, mass storage support, and much more. They can be accessed for free and include source codes. However, when compared to paid systems like the ones provided by Delkin, they lack the profound customer support needed to ensure data integrity and healthy life cycles.

 

The Windows Embedded and Linux RTOS both include multi-processing and multi-task threading support. In Windows Embedded, this process is called an application program, which runs multiple applications according to kernel scheduler controls and is capable of running multiple tasks in each program or process. This doesn’t mean two processes will run simultaneously, however. Instead, the scheduler switches between the two based on commands driven by its algorithm. While one application runs, the other tasks remain running under the scheduler control and communicate to one another through the kernel.

 

While Linux and Windows are popular choices for an RTOS, they weren’t originally designed for use in real time. However, their variants, RTLinux and Windows Embedded, were created specifically with real-time task delegation in mind.

 

Other popular RTOS include:

 

  • QNX
  • QNX Neutrino (featuring a smaller footprint than the original)
  • Timesys
  • LynxOS
  • LynxOS – 178
  • LynxSECURE
  • FreeRTOS

 

When selecting an RTOS for your application, you must carefully consider its key goals and whether you will need a Hard Real Time or Soft Real-Time system. Other factors to weigh in include the RTOS compliance to Portable Operating System Interface (POSIX) standards, if a certification is required, and also the memory footprint. In the case of smaller handheld devices, we suggest opting for micro-kernels. Always make sure the source code is provided for the kernel.

 

The Mass Storage Requirements for Embedded System Solid State Drives (SSDs)

Nearly all but the simplest of embedded systems need mass storage devices to contain file systems, storage of the system, and boot codes. The more complex systems also require disks including data logging systems with or without encryption.

 

Typically, Solid State Drives (SSDs) based NAND flash are selected for an RTOS instead of the commonly used mechanical drives favored for OS systems. These devices must be of industrial-grade quality to sustain the strenuous life cycle requirements of the system. You can use one or more of the following selections: USB sticks, SATA drives, MSATA drives, CF cards, CFAST cards, or SD/MMC cards.

 

Routers, which are embedded MMC (eMMC), are popular as they’re designed with NAND flash and flash controller devices in their hardware. These hold the RTOS image and boot and log router tables to data contained on the drive. To do so effectively, the routers must be robust, feature long life cycles, function at high speed, and be able to endure occasional power failures during a read/write cycle.

 

While the systems support disk activities in a power failure, that does not mean that the SSD should present corrupted data at a system startup so that it is easier to pick up data writing as soon as the power restarts. In the event of a power failure, however, power fail interrupts are provided by the kernel in event-driven Real-Time Operating Systems. They are triggered as the highest priority task, saving as much write in progress as they can.

 

SSDs are typically shared resources across multiple tasks, meaning they don’t feature long latencies as to not degrade system performance blocking a process as it waits to get written. In this case, block-based mapping proves to be ineffective as the NAND flash is written at page level and erased at block level. Instead, page-based mapping is advised to boost speed while preventing the failure of random writes.

 

As with all OS systems, but particularly an RTOS, long life cycles are vital. To ensure durable and reliable life cycles, SLC flash is advantageous. Another key element of a high-functioning RTOS is efficient wear leveling, especially in cases where STATIC is used as it moves data around all parts of the SSD. The best Real-Time Embedded & Operating Systems feature Error Correction Code (ECC) algorithms to protect against read and program disturb errors.

 

SSDs are an essential part of the embedded system and should be selected by top-quality flash controller manufacturers like Delkin.

 

Choose Delkin for Your RTOS

Delkin Devices provides state-of-the-art, industrial-grade flash storage solutions for your RTOS. We feature customizable designs spearheaded by our professional customer support team. To learn more, contact Delkin today.

 

ORDER DELKIN INDUSTRIAL FLASH STORAGE TODAY through our distribution partners:

Digi-Key

Newark

For Europe Contact Our Partner Farnell

 

Contact

  • This field is for validation purposes and should be left unchanged.

 

Related Posts

Delkin Support Evaluating pSLC
Understanding PseudoSLC (pSLC)

  Pseudo NAND (pSLC) technology is the latest cutting-edge solution in NAND flash storage. It...

What Is Write Amplification in True Embedded Applications?

  Embedded computing systems are designed to perform specific tasks, like writing data to the...

Our Comprehensive Application Engineering Support

   Delkin Devices is a state-of-the-art flash memory and storage SSD provider for OEMs for...

Delkin Devices Technical Success Stories- Female Engineer- Businesswoman
A Case Study in Flash Endurance and SMART Commands

  At Delkin, we don’t just pride ourselves on our state-of-the-art flash memory and storage...

The Answers to Common Questions About Flash-Based Memory

  At Delkin Devices, our experts design and manufacture state-of-the-art data storage options, including flash-based...

Temperature Considerations for SSD- Hot Climate
The Benefits of Industrial Temperature for Industrial Applications

  Flash storage solutions come in two categories—commercial and industrial. These two product grades are...

Digital Gaming Applications
Industrial CompactFlash (CF) Cards: The Perfect Fit for Gaming Applications

  Behind the bright lights and ringing sounds of casinos are the flash storage cards...

A Case Study in Application Design That Considers Technological Advancements

  When designing state-of-the-art technological applications, designers and engineers are faced with a major challenge—creating...

Healthcare Industrial Flash Storage
Modernize Your Healthcare Data Storage with Industrial Flash

  The healthcare community relies heavily on tech for daily functions, from reading test results...

Delkin Industrial Application Lifecycle Management
Product Life Cycle Management FAQs

  When it comes to flash storage, developing a world-class application isn’t enough. Life cycle...