You are on page 1of 29

A case study of Real time OS

Introduction
● A real-time operating system (RTOS) is an operating
system (OS) intended to serve real-time application
requests.
● A real-time system is one whose correctness involves
both the logical correctness of outputs and their
timeliness. It must satisfy response-time constraints
or risk severe consequences including failure.
There are three types of time
constraints
● Hard: A late response is incorrect and implies a
system failure.
● Soft: Timeliness requirements are defined by using an
average response time. If a single computation is late,
it is not usually significant, although repeated late
computation can result in system failures
● Firm: Firm real-time systems have hard deadlines, but
where a certain low probability of missing a deadline
can be tolerated
Industrial applications of RTOS
● Military
● Telecommunications
● Aviation
● Automotive
● Scientific etc..
RTOS
● Real-time computing is where system correctness not only depends on
the correctness of logical result but also on the result delivery time.
● RTOS occupy little space from 10 KB to 100KB
● Using a task to perform bulk of the interrupt service allows the service
to be performed based on a priority chosen by the designer and helps
preserve the priority system of the RTOS
Basic Requirements of an RTOS
● Multi-tasking and preemptable
● Dynamic deadline identification
● Sufficient Priority Levels
● Predictable synchronization
● Memory management
● Task scheduling
Examples
● QNX RTOS v6.1
– Client-server based architecture. QNX adopts the approach of implementing an
OS with a 10 Kbytes
– The system can be distributed over several nodes, and is network transparent.
The system performance is fast and predictable and is robust. It supports Intel
x86family of processors, MIPS, PowerPC, and
StrongARM.
● Windows CE 3.0
– Windows CE 3.0 is an Operating system rich in features and is
available for a variety of hardware platforms.
– t the thread creation and deletion has periodic delays of more than 1 millisecond
occurring every second. The system is complex and highly configurable
Exemplary Devices:
Raspberry Pi / Arduino
Raspberry Pi ?
• Low cost, credit-card sized computer.

• Little device that enables people of all ages to explore

computing, and to learn how to program in languages

• Does everything you’d expect a desktop computer to do.

• Ability to interact with the outside world

• Used in a wide array of digital maker projects,


Credit goes to …
Developed in U.K. by Raspberry - Pi foundation in 2009

Concept Initiated by Eben Upton who works at Broadcom

Supported by “University of Cambridge Computer


Laboratory & Broadcom”

Has been a revolution in the market with over 15 million+ units


sold
Raspberry Pi 2 B+
• The second generation Raspberry Pi ( February 2015 ).
• A 900MHz quad-core ARM Cortex-A7 CPU
• 1GB RAM
• 4 USB ports
• 40 GPIO pins
• Full HDMI port
• Ethernet port
• Combined 3.5mm audio jack and composite video
• Camera interface
• Display interface
• Micro SD card slot
• VideoCore IV 3D graphics core
Raspberry Pi 3
• The Raspberry Pi 3 is the third generation Raspberry Pi.

• It replaced the Raspberry Pi 2 Model B in February 2016.

Compared to the Raspberry Pi 2 it has:


 A 1.2GHz 64-bit quad-core ARMv8 CPU

 802.11n Wireless LAN

 Bluetooth 4.1, Bluetooth Low Energy (BLE)


Third Party Supporting OS for RPi
Thank You…
Introduction of GPIO & Physical Computing of Raspberry Pi

• One powerful feature of the Raspberry Pi is the row of GPIO


(general purpose input/output) pins along the top edge of the
board.
• Physical Interface in between Pi & the outside world.
GPIO Numbering of 40 Pins
GPIO PROGRAMMING (LED)

import RPi.GPIO as GPIO  ## Import GPIO library


GPIO.setmode(GPIO.BOARD)  ## Use board pin numbering
GPIO.setup(7, GPIO.OUT)  ## Setup GPIO Pin 7 to OUT
GPIO.output(7,True)  ## Turn on GPIO pin 7
What is arduino
● Arduino is an open-source electronics platform
based on easy-to-use hardware and software.
● You can tell your board what to do by sending a
set of instructions to the microcontroller on the
board.

19
20
21
Features of Arduino
● Inexpensive
● Cross-platform
● Simple, clear programming environment
● Open source and extensible software
● Open source and extensible hardware

22
Arduino’s ATmega328
● Alf and Vegard's RISC processor.
● ATMEGA328P is high performance, low power
controller from Microchip.
● ATMEGA328P is an 8-bit microcontroller based on
AVR RISC architecture. It is the most popular of all
AVR controllers as it is used in ARDUINO boards.

23
Pins
Serial pin - TxO RAW– i/p volt regulator
Serial pin-RxI GND- Ground
Reset input -RST RST- Reset input
Ground-GND VCC-Dig. power supply
2- Digital i/o A3 – Reads analog sig.
3 A2
4 A1
5 A0
6 13 -Digital i/o
7 12
8 11
9 10
24
Writing Sketches
● Programs written using Arduino Software (IDE) are
called sketches.
● These sketches are written in the text editor and
are saved with the file extension .ino.
● Uploading: you need to select the correct items
from the Tools > Board and Tools > Port menus.

25
● Current Arduino boards will reset automatically and begin the
upload.
● you'll see the RX and TX LEDs blink as the sketch is uploaded.
The Arduino Software (IDE) will display a message when the
upload is complete, or show an error.
● Serial Monitor: Choose the baud rate from the drop-down menu
that matches the rate passed to Serial.begin in your sketch.

26
Arduino Program structure
● Arduino programs can be divided in three main parts:
Structure, Values (variables and constants), and
Functions.
● Software structure consist of two main functions −
– setup( ) function : initialize variables, pins, run only once
– loop( ) function : allowing your program to change and respond

27
LED BLINK Program
// the setup function runs once when you press reset or power the board
void setup() {
pinMode(LED_BUILTIN, OUTPUT); // initialize digital pin LED_BUILTIN as an output.
}
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}

28
Comparison with others
Beginners, Min.
App. Size, small Really
set of s/w, low powerful
battery app. embedded
dev.,
Internet app.

GUI App.,
Feels desktop PC

You might also like