Nano-RK

Last updated
Nano-RK
Developer Carnegie Mellon University
Written in C
Working stateDiscontinued
Source model Open-source
Initial releaseDecember 2005;18 years ago (2005-12)
Final release Revision 427 / 12 February 2008;16 years ago (2008-02-12)
Marketing target Wireless sensor networks
Available in English
Platforms Atmel FireFly, MicaZ motes, MSP430
Kernel type Real-time operating system
Default
user interface
Command line interface
License GPL or commercial

Nano-RK is a wireless sensor networking real-time operating system (RTOS) [1] [2] from Carnegie Mellon University, designed to run on microcontrollers for use in sensor networks. Nano-RK supports a fixed-priority fully preemptive scheduler with fine-grained timing primitives to support real-time task sets. "Nano" implies that the RTOS is small, using 2 KB of random-access memory (RAM) and using 18 KB of flash memory, while RK is short for resource kernel. A resource kernel provides reservations on how often system resources can be used. For example, a task might only be allowed to execute 10 ms every 150 ms (CPU reservation), or a node might only be allowed to transmit 10 network packets per minute (network reservation). These reservations form a virtual energy budget to ensure a node meets its designed battery lifetime and to prevent a failed node from generating excessive network traffic. Nano-RK is open-source software, is written in C and runs on the Atmel-based FireFly sensor networking platform, the MicaZ motes, and the MSP430 processor. [3]

Contents

Tradeoffs occur when using an RTOS in sensor networks. [4]

Advantages

NanoRK takes advantage of priority-based preemptive scheduling to help honor the real-time factor of being deterministic, thus ensuring task timeliness and synchronization. Due to the characteristic of limited battery power on the wireless node, Nano-RK provides central processing unit (CPU), network, and sensor efficiency through the use of virtual energy reservations, labeling this system as a resource kernel. These energy reservations can enforce energy and communication budgets to minimize the negative impact on the node's operational lifetime from unintentional errors or malicious behavior by other nodes within the network. It supports packet forwarding, routing and other network scheduling protocols with the help of a light-weight wireless networking stack. Compared with other current sensor operating systems, Nano-RK provides rich functionality and timeliness scheduling with a small size for its embedded resource kernel (RK). [5]

Features

Static Configuration – Nano-RK uses a static design-time approach for energy use control, and disallows dynamic task creation, requiring application developers to set both task and reservation quotas/priorities in a static testbed design. This design allows creating an energy budget for each task to maintain application requirements and energy efficiency throughout the system's lifetime. Using a static configuration approach, all of the runtime configurations, and the power requirements, are predefined and verified by the designer before the system is deployed and executed in the real world. This approach also helps to guarantee the stability and small-size characteristics relative to traditional RTOSs.

Watchdog Timer support – Watchdog is a software timer that triggers a system reset action if the system hangs on crucial faults for an extended period of time. The watchdog mechanism can bring the system back from the nonresponsive state into normal operation by waiting until the timer goes off and subsequently rebooting the device. In Nano-RK, the watchdog timer is tied directly to the processor's reset signal REBOOT ON ERROR. By default, it is enabled when the system boots and reset each time the scheduler executes. If the system fails to respond within the predefined time period, the system will reboot and run the initialization instruction sequence to hopefully regain control.

Deep Sleep Mode – For energy efficiency reasons, if there are no eligible tasks to run, the system can be powered down and given the option to enter deep sleep mode. When the system is in this mode, only the deep sleep timer can wake the system with a predefined latency period. After waking from sleep mode, the next context swap time is set to guarantee the CPU wakes in time. If a sensor node does not wish to perform deep sleep, it also is presented with the choice to go into a low energy use state while still managing its peripherals.

Ready queue

Nano-RK has implemented a double-linked list of ready queue nodes within a fixed-size array, termed the ready queue, that orders all ready tasks in decreasing order by whichever of the task's priorities is higher. As the number of tasks running within the Nano-RK implementation is statically configured in a testbed before deployment, the ready queue size is also fixed to this number of tasks that can be ready to run. A fixed-length array named nrk readyQ is found within the nrk defs.h file along with two pointers to reference the two most important cells within this array. The free node pointer (free node) and the head node pointer (head node) point to the next cell in the array to be allocated and the current highest priority task ready to run, respectively.

Scheduler

The core of Nano-RK is a static preemptive real-time scheduler which is priority-based and energy efficient. For priority-based preemptive scheduling, the scheduler always selects the highest priority task from the ready queue. To save energy, tasks do not poll for a resource but rather tasks will be blocked on certain events and can be unlocked when the events occur. When there is no task in the ready queue, the system can be powered down to save energy. When the system is working, one and only one task (current task), signified by the nrk cur task tcb, is running for a predefined period. So the most important job of the scheduler is to decide which task should be run next and for how long the next task should run until the scheduler is triggered to run again.

Related Research Articles

A real-time operating system (RTOS) is an operating system (OS) for real-time computing applications that processes data and events that have critically defined time constraints. An RTOS is distinct from a time-sharing operating system, such as Unix, which manages the sharing of system resources with a scheduler, data buffers, or fixed task prioritization in a multitasking or multiprogramming environment. Processing time requirements need to be fully understood and bound rather than just kept as a minimum. All processing must occur within the defined constraints. Real-time operating systems are event-driven and preemptive, meaning the OS can monitor the relevant priority of competing tasks, and make changes to the task priority. Event-driven systems switch between tasks based on their priorities, while time-sharing systems switch the task based on clock interrupts.

<span class="mw-page-title-main">Embedded system</span> Computer system with a dedicated function

An embedded system is a computer system—a combination of a computer processor, computer memory, and input/output peripheral devices—that has a dedicated function within a larger mechanical or electronic system. It is embedded as part of a complete device often including electrical or electronic hardware and mechanical parts. Because an embedded system typically controls physical operations of the machine that it is embedded within, it often has real-time computing constraints. Embedded systems control many devices in common use. In 2009, it was estimated that ninety-eight percent of all microprocessors manufactured were used in embedded systems.

In computing, scheduling is the action of assigning resources to perform tasks. The resources may be processors, network links or expansion cards. The tasks may be threads, processes or data flows.

<span class="mw-page-title-main">Contiki</span> Real-time operating system

Contiki is an operating system for networked, memory-constrained systems with a focus on low-power wireless Internet of Things (IoT) devices. Contiki is used for systems for street lighting, sound monitoring for smart cities, radiation monitoring and alarms. It is open-source software released under the BSD-3-Clause license.

Micro-Controller Operating Systems is a real-time operating system (RTOS) designed by Jean J. Labrosse in 1991. It is a priority-based preemptive real-time kernel for microprocessors, written mostly in the programming language C. It is intended for use in embedded systems.

<span class="mw-page-title-main">FreeRTOS</span> Real-time operating system

FreeRTOS is a real-time operating system kernel for embedded devices that has been ported to 35 microcontroller platforms. It is distributed under the MIT License.

Eclipse ThreadX is a highly deterministic, embedded real-time operating system (RTOS) programmed mostly in the language C.

EKA2 is the second-generation Symbian platform real-time operating system kernel, which originated in the earlier operating system EPOC.

Fixed-priority preemptive scheduling is a scheduling system commonly used in real-time systems. With fixed priority preemptive scheduling, the scheduler ensures that at any given time, the processor executes the highest priority task of all those tasks that are currently ready to execute.

<span class="mw-page-title-main">Completely Fair Scheduler</span> Linux process scheduler

The Completely Fair Scheduler (CFS) is a process scheduler that was merged into the 2.6.23 release of the Linux kernel and is the default scheduler of the tasks of the SCHED_NORMAL class. It handles CPU resource allocation for executing processes, and aims to maximize overall CPU utilization while also maximizing interactive performance.

TI-RTOS is an embedded tools ecosystem created and offered by Texas Instruments (TI) for use across a range of their embedded system processors. It includes a real-time operating system (RTOS) component named TI-RTOS Kernel, networking connectivity stacks, power management, file systems, instrumentation, and inter-processor communications like DSP/BIOS Link. It is free and open-source software, released under a BSD license.

<span class="mw-page-title-main">ChibiOS/RT</span> Real-time operating system

ChibiOS/RT is a compact and fast real-time operating system supporting multiple architectures and released under a mix of the GNU General Public License version 3 (GPL3) and the Apache License 2.0. It is developed by Giovanni Di Sirio.

<span class="mw-page-title-main">XtratuM</span> Hypervisor

XtratuM is a bare-metal hypervisor specially designed for embedded real-time systems available for the instruction sets LEON2/3/4, ARM v7 and V8 processors and RISC-V processor.

<span class="mw-page-title-main">Brain Fuck Scheduler</span> Process scheduler in Linux

The Brain Fuck Scheduler (BFS) is a process scheduler designed for the Linux kernel in August 2009 based on earliest eligible virtual deadline first scheduling (EEVDF), as an alternative to the Completely Fair Scheduler (CFS) and the O(1) scheduler. BFS was created by Con Kolivas.

<span class="mw-page-title-main">Slurm Workload Manager</span> Free and open-source job scheduler for Linux and similar computers

The Slurm Workload Manager, formerly known as Simple Linux Utility for Resource Management (SLURM), or simply Slurm, is a free and open-source job scheduler for Linux and Unix-like kernels, used by many of the world's supercomputers and computer clusters.

Earliest deadline first (EDF) or least time to go is a dynamic priority scheduling algorithm used in real-time operating systems to place processes in a priority queue. Whenever a scheduling event occurs the queue will be searched for the process closest to its deadline. This process is the next to be scheduled for execution.

OpenTag is a DASH7 protocol stack and minimal Real-Time Operating System (RTOS), written in the C programming language. It is designed to run on microcontrollers or radio Systems on a Chip (SoC). OpenTag was engineered to be a very compact software package. However, with proper configuration, it can also run in any POSIX environment. OpenTag can also provide all functionality required for any type of DASH7 Mode 2 device, rather than just the eponymous “tag”-type endpoint device.

<span class="mw-page-title-main">Rodos (operating system)</span> Real-time operating system

Rodos is a real-time operating system for embedded systems and was designed for application domains demanding high dependability.

Time-Sensitive Networking (TSN) is a set of standards under development by the Time-Sensitive Networking task group of the IEEE 802.1 working group. The TSN task group was formed in November 2012 by renaming the existing Audio Video Bridging Task Group and continuing its work. The name changed as a result of the extension of the working area of the standardization group. The standards define mechanisms for the time-sensitive transmission of data over deterministic Ethernet networks.

<span class="mw-page-title-main">Apache Mynewt</span> Real-time operating system

Apache Mynewt is a modular real-time operating system for connected Internet of things (IoT) devices that must operate for long times under power, memory, and storage constraints. It is free and open-source software incubating under the Apache Software Foundation, with source code distributed under the Apache License 2.0, a permissive license that is conducive to commercial adoption of open-source software.

References

  1. nano-RK Nano-RK: A Wireless Sensor Networking Real-Time Operating System (RTOS) Archived 2008-05-11 at the Wayback Machine
  2. A. Eswaran, A. Rowe and R. Rajkumar, "Nano-RK: An Energy-Aware Resource-Centric Operating System for Sensor Networks," IEEE Real-Time Systems Symposium, December 2005.
  3. Anand Eswaran and Anthony Rowe and Raj Rajkumar, “FireFly: A Time Synchronized Real-Time Sensor Networking Platform”
  4. embedded.com
  5. [3] Anand Eswaran and Anthony Rowe and Raj Rajkumar, “Nano-RK: an Energy-aware Resource-centric RTOS for Sensor Networks,” 2005.