You are on page 1of 12

Embedded Operating systems WorkShops

1. Workshop 1: Introduction to Embedded operating systems


a. Embedded systems context
i. WSN
ii. IoT
b. Operating systems
c. Embedded Operating systems
d. Operating systems for IoT
2. Workshop 2: Introduction to RIOT
a. Introduction
b. Running your first application as Linux process
c. Run your first application on real hardware
3. Workshop 3: RIOT Custom shell handlers
a. Introduction
b. A simple echo command handler
c. Control the hardware
4. Workshop 4: Multithreading on RIOT
a. Introduction
i. Scheduling
ii. Threading
b. Create a thread
c. Run a thread
5. Workshop 5: RIOT Timers
a. Introduction
b. Xtimer
i. APIs
ii. Example
c. Ztimer
i. APIs
ii. Example
6. Workshop 6: Using network devices on RIOT
a. RIOT's Networking architecture
b. Virtual network interface on native
c. First networking application
d. Use application on real hardware
7. Workshop 7: RIOT UDP Client / Server
a. Introduction
b. Use UDP for messaging
c. Communicate with Linux
d. Exchange UDP packets with your neighbors
Chapter 1
Introduction to Embedded operating
systems

Plan:
1. Workshop 1: Introduction to Embedded operating systems
a. Embedded systems context
i. WSN
ii. IoT
b. Operating systems
c. Embedded Operating systems
d. Operating systems for IoT

Objective: The subject of this chapter is to be familiarized with the


embedded operating systems designed for constrained devices which
are increasingly deployed on the IoT applications.

1. Course basics
1.1. Embedded systems context
An embedded system is a microprocessor-based computer hardware
system with software that is designed to perform a dedicated function,
either as an independent system or as a part of a large system. At the
core is an integrated circuit designed to carry out computation for real-
time operations.
Complexities range from a single microcontroller to a suite of
processors with connected peripherals and networks; from no user
interface to complex graphical user interfaces. The complexity of an
embedded system varies significantly depending on the task for which
it is designed.
Embedded system applications range from digital watches and
microwaves to hybrid vehicles and avionics. As much as 98 percent of
all microprocessors manufactured are used in embedded systems.
1.1.1 WSN
Wireless sensor network (WSN) refers to a group of spatially dispersed
and dedicated sensors for monitoring and recording the physical
conditions of the environment and organizing the collected data at a
central location. WSNs measure environmental conditions like
temperature, sound, pollution levels, humidity, wind, and so on.
These are similar to wireless ad hoc networks in the sense that they rely
on wireless connectivity and spontaneous formation of networks so that
sensor data can be transported wirelessly. WSNs are spatially
distributed autonomous sensors to monitor physical or environmental
conditions, such as temperature, sound, pressure, etc. and to
cooperatively pass their data through the network to a main location.
The more modern networks are bi-directional, both collecting data from
distributed sensors and enabling control of sensor activity. The
development of wireless sensor networks was motivated by military
applications such as battlefield surveillance; today such networks are
used in many industrial and consumer applications, such as industrial
process monitoring and control, machine health monitoring, and so on.

1.1.2 IoT
Wireless sensor networks (WSN) are generating increasing interest
from industry and research. This is driven by the availability of
inexpensive, low-powered miniature components such as processors,
radios and sensors which are sometimes integrated on a single chip.
The idea of the Internet of Things (IoT) developed in parallel to WSNs.
While IoT doesn’t assume a specific communication technology,
wireless communication technologies will play a major role in the roll-
out of IoT.
The Internet of things (IoT) describes the network of physical objects—
“things” or objects—that are embedded with sensors, software, and
other technologies for the purpose of connecting and exchanging data
with other devices and systems over the Internet.
1.2 Operating systems
An Operating System (OS) is an interface between a computer user and
computer hardware. An operating system is a software which performs
all the basic tasks like file management, memory management, process
management, handling input and output, and controlling peripheral
devices such as disk drives and printers.

The components of an operating system play a key role to make a


variety of computer system parts work together. The basic operating
system components are:
• The kernel:
The kernel in the OS provides the basic level of control on all the
computer peripherals. In the operating system, the kernel is an essential
component that loads firstly and remains within the main memory.
• Process execution:
The OS gives an interface between the hardware as well as an
application program so that the program can connect through the
hardware device by simply following procedures & principles
configured into the OS
• Interrupt:
In the operating system, interrupts are essential because they give a
reliable technique for the OS to communicate & react to their
surroundings. An interrupt is nothing but one kind of signal between a
device as well as a computer system otherwise from a program in the
computer that requires the OS to leave and decide accurately what to do
subsequently.
• Memory management:
The functionality of an OS is nothing but memory management which
manages main memory & moves processes backward and forward
between disk & main memory during implementation. Memory
management work can be divided into three important groups like
memory management of hardware, OS and application memory
management.
• Multitasking:
It describes the working of several independent computer programs on
a similar computer system. Multitasking in an OS allows an operator to
execute one or more computer tasks at a time.
• Networking:
Networking can be defined as when the processor interacts with each
other through communication lines. The design of communication-
network must consider routing, connection methods, safety, the
problems of opinion & security.
• Security:
If a computer has numerous individuals to allow the immediate process
of various processes, then the many processes have to be protected from
other activities. This system security mainly depends upon a variety of
technologies that work effectively.
• User Interface:
A GUI or user interface (UI) is the part of an OS that permits an operator
to get the information. A user interface based on text displays the text
as well as its commands which are typed over a command line with the
help of a keyboard.
1.3 Embedded Operating systems
An embedded operating system is an operating system for embedded
computer systems. This type of operating system is typically designed
to be resource-efficient and reliable. Resource efficiency comes at the
cost of losing some functionality or granularity that larger computer
operating systems provide, including functions which may not be used
by the specialized applications they run. Depending on the method used
for multitasking, this type of OS is frequently considered to be a real-
time operating system, or RTOS.
The hardware running an embedded operating system can be very
limited in resources such as RAM and ROM, therefore embedded
design of these operating systems may have a narrow scope tailored to
a specific application in order to achieve desired operation under these
constraints. In order to take better advantage of the processing power of
the CPU, software developers may write critical code directly in
assembly. This machine efficient language can potentially result in
gains in speed and determinism at the cost of portability and
maintainability. Often, embedded operating systems are written entirely
in more portable languages, like C, however.
An important difference between most embedded operating systems
and desktop operating systems is that the application, including the
operating system, is usually statically linked together into a single
executable image. Unlike a desktop operating system, the embedded
operating system does not load and execute applications. This means
that the system is only able to run a single application.
The first modern, real-time embedded computing system was the
Apollo Guidance Computer, developed in the 1960s by Dr. Charles
Stark Draper at the Massachusetts Institute of Technology for the
Apollo Program. The Apollo Guidance Computer was designed to
collect data automatically and provide mission-critical calculations for
the Apollo Command Module and Lunar Module.
In 1971, Intel released the first commercially available microprocessor
unit -- the Intel 4004 -- an early microprocessor that still required
support chips and external memory; in 1978 the National Engineering
Manufacturers Association released a standard for programmable
microcontrollers, improving the embedded system design; and by the
early 1980s, memory, input and output system components had been
integrated into the same chip as the processor, forming a
microcontroller.
The microcontroller-based embedded system would go on to be
incorporated into every aspect of consumers’ daily lives, from credit
card readers and cell phones, to traffic lights and thermostats.
1.4 Operating systems for IoT
Leading vendors are pushing further down into small-footprint OSs and
focusing on Real-Time Operating System (RTOS) and Fully-
Functional Operating System (FFOS). With the RTOS and FFOS
markets coexisting in parallel, the embedded OS industry has remained
relatively static over the past few years. Currently, the IoT OS market
is experiencing a rapid paradigm shift essentially due to the maturation
of Linux and the need to rethink value creation and revenue generation.
The next figure portrays survey results when respondents are asked to
identify which operating systems, they employ for IoT.
More then 70% of IoT devices use Linux and most other mainstream
OS range in the single digit percentages. Linux dominates the IoT OS
market for gateways devices. For low-end IoT devices, traditional OSs
are not suitable as they cannot run on the limited resources afforded
by the hardware.
Simultaneously, some functions like wireless support are difficult to
build from scratch without an operating system.
For these situations, low footprint real-time operating systems have
become the answer in recent years, and they are now increasingly
being deployed in applications that previously had no formal OS.
The advantages of openness have fuelled the growth of several open-
source variants of IoT OSs. Basing on Eclipse IoT developer surveys,
this article presents a comparative analysis of most used open source
low-end IoT OSs in last three years and will be organized into two parts.
The first one details
the major concerns for an IoT operating system which are architecture,
scheduling, real-time capabilities, programming model, memory
footprint, network connectivity, hardware support and energy
efficiency. The second part is dedicated to the description and
comparison of the OSs: FreeRTOS, Mbed, Contiki, Tiny and RIOT
according to the characteristics presented in the first part.
1.5 Comparison of IoT OSs
According to the survey [1], differents OSs have been presented and
selected according to their newness and usage in the IoT domain
between 2015 and 2017. The selected OSs are Tiny OS and Contiki
OS as most known and used event driven model and FreeRTOS,
Mbed OS and RIOT OS as RTOS OSs.
Many open challenges can motivate an IoT OS. Among these
challenges the light-weight kernel architecture that should reduce OS
services and have a small footprint with an efficient task execution, the
Real-Time compatibility and the minimising of the energy consumption
by using different power modes. Seven major concerns are presented
for an IoT OS which are OS architecture, scheduler and realtime
capabilities, programming model, memory footprint, network,
connectivity, hardware support and energy effeciency. The choosed
OSs were compared according to every concern.
While the question ’Which is the most used IoT OS’s ?’ is clear, the
answer is rather vague for a few good reasons.
First IoT is a new field of specialization although the idea is old.
Second, IoT OS’s are new and limited because the field is new and third
IoT specialists are few and most developers, researchers, and even
companies are in the learning phase.
Leading with these three reasons, it is difficult to find a correct answer
for the question. While the answer is difficult, it could be misleading to
assume that:
• Linux is the most used kernel, Linux-based OS’s are the
dominant IoT OS’s and minimalistic OS’s will dominate the
embedded world of Internet of Things.
• There are mainly three design categories of OSs that have
the potential to become the most suitable for IoT.
For multithreaded OSs, RIOT is identified as the most promising one,
while for Event-driven OSs, Contiki is proposed as the best choice and
FreeRTOS is selected as the most real-time IoT OS.
Although the optimal operating system expected to the IoT is not yet
born, it must take into account that many other challenges either studied
in this article must be considered as security in operating system level
and personalization of the OS with some specific OS services for
Internet of Things applications.
2. Workshop
You are invited to do research on the most used operating systems
designed for the IoT in the last three years. The research must focus on:
• Challenges for the IoT OSs.
• Top 5 known and used IoT OSs.
• Comparison of the selected OSs to the cited challenges.

References
[1] C. Sabri, L. Kriaa and S. Azzouz, "Comparison of IoT Constrained Devices
Operating Systems: A Survey", 2017 IEEE/ACS 14th International
Conference on Computer Systems and Applications (AICCSA), 2017.
Available: 10.1109/aiccsa.2017.187

You might also like