SlideShare a Scribd company logo
1 of 34
RTOS
Real Time Operating System

By:
VIVEK. P.PATKAR.
PRAKRUTI. JOSHI.

An example of RTOS implementation on Renesas
automotive dashboard platform.
What is RTOS?


An RTOS is multitasking operating system for
the applications needing meeting of :
a) time deadlines and
b)functioning in real time constraints
Block Diagram of RTOS
Architecture of RTOS
Architecture of RTOS
 An RTOS usually comprises only a kernel. For

more complex embedded systems, an RTOS
can be a combination of various modules,
including the kernel, networking protocol
stacks, and other components as illustrated
previously.
 An operating system generally consists of two
parts: kernel space (kernel mode) and user
space (user mode).
Kernel
The kernel of an RTOS
provides an abstraction
layer between the
application software
and hardware.
 This abstraction layer
comprises of six main
types of common
services provided by the
kernel to the
application software.

KERNEL
There are three broad categories of kernel models available

Monolithic Kernel
E.g.. Examples are Linux
and Windows

Microkernel
E.g. Examples are
AmigaOS and QNX

Exokernel
E.g.. library operating
systems (libOSes)
Classification Of RTOS
RTOS
Hard real time

Firm real time

Zero degree of
tolerance

Unacceptable
quality
reduction

E.g. Automobile engine
control system and anti
lock brake, video
transmission, each picture
frame and
audio must be transferred
at fixed rate.

Soft real time
Reduction in
quality
reduction is
acceptable.

E.g. a food processing
plant control system.
E.g. Mobile phone, digital
cameras and orchestra
playing robots.
Features Of RTOS

Task and
Multitask

Running

Scheduler

Timer
Function

Memory
Management

Dormant
Blocked

Ready

Pre emptive

Non Pre emptive

Inter Task
Communication
Task and Multitask
Context

Switch

E.g.20 MHz 68000 process
or task switch times are
roughly 20 microseconds.
In contrast, a
100 MHz ARM CPU
switches in less than 3
microseconds.
Advantages:

a)Can concentrate all the
talent at a particular task.
b)Debugging is simple.
c)Easy to understand.
Scheduler
Pre emptive Scheduler

It allows high priority task to
run first and move low
priority task which is in
running into ready state.
E.g. Solaris 2.0/SunOS
5.0, Windows NT, the Linux
kernel 2.6 and 3.x, AIX and
some BSD systems (NetBSD,
since version 5), Anroid.
Advantages:
High priority task executed
immediately.
Disadvantages:
Starvation.
Scheduler
Non Pre emptive

Scheduler

High priority task co
operate with low priority
task.
E.g. Windows3.1x, Mac
OS pre-9.

Advantages:
No starvation.
Easy to implement.
Disadvantages:
High priority task has to
wait for low priority task
to complete, thus, not
suitable for RTOS.
Timer Function
 Task delay.

E.g. In μC/OS-II, for a task to delay itself:
OSTimeDly(ticks), where ticks is the number of
clock ticks from the timer;
OSTimeDlyHMSM(H,M,S,M), with Hours, Minutes,
Seconds, Microseconds.


Task alert.

E.g. µC/OS-II use system clock, Vx Works use
watchdog timers
Memory Management
Memory allocated for
each task.
 Memory allocated for
each task control
block(TCB).
 Size of queue.
 Size of mailbox
 Size of pipe


TCB
Inter task Communication

Event

Queue Mailbox

Pipe

Shared Data Protected

Disabling
Task Switch

Semaphore

Disabling
Interrupts

Mutex
Counting
Semaphore Semaphore
Priority Inversion

Spinlock
Semaphore

Dead Lock
Event

Event objects are used when task synchronization is required without resource
sharing. They allow one or more tasks to
keep waiting for a specified event to occur.
Queue
Queue :
E.g. AVR microcontroller, Linux 2.4; Windows
NT/XP/Vista, Mac OS X uses a multilevel feedback
queue, uses a Multilevel feedback queue.
mailbox:
E.g. TI SYS/BIOS v6.33 RTOS, Keil RTX.
Pipe:
E.g. QNX RTOS, SMX RTOS.
Semaphores

E.g. ChibiOS/RT, VxWorks
Binary Semaphore









Whenever it is set, shared data is free.
whenever it is reset shared data is busy.
Whenever a task access shared data it takes
semaphore and the semaphore flag is reset.
Whenever a task exit from shared data it releases
semaphore and the flag is reset.
In this way shared data is protected.
Semaphores

E.g. VxWorks, UNIX
Counting Semaphore







It is semaphore in which value can be
incremented or decremented. it is unsigned
integer.
This semaphore can be taken multiple times.
Taking semaphore means decrementing the
integer.
Releasing the semaphore means incrementing
the integer.
Semaphores

E.g. ChibiOS/RT, VxWorks, CHIP-RTOS-x86 RTX
Spin lock Semaphore








This semaphore will not make running task to
blocked immediately.
Spin lock is useful in following situation:
Suppose low priority task is running and only some
time is left for its completion.
Now high priority task wants to run
Now RTOS provides spin lock semaphore to the high
priority task and so it can spin for some time. During
that time low priority task is executed and by itself it
is moved into blocked state.
Now high priority task begins to run.
RTOS Design
 Size of ISR:
If ISR is long, then there are two drawbacks:



Highest priority task is blocked for more time.
ISR is sensitive to error and so it is difficult to debug long
ISR.
Conclusion:
Size of ISR should be small.
RTOS Design
 Number

of Task:

Advantages:
 Can concentrate all talent at a particular task.
 Debugging is simple.
 Very easy to understand.
Disadvantages:
 More memory needed because each task needs memory.
 Speed is less because task switching needs more time.

Conclusion:
Number of tasks should be moderate.
RTOS Design
 Avoid

creating and destroying task:

It is time consuming and thus speed becomes less.
Conclusion:
Must avoid this.

 Task

structure:

Task designing should be such that task is blocked at the most
only one place.
RTOS Design
 Keep time slicing off:
Task should not have equal priority.

 Techniques





to save memory:

For each task provide stack memory, TCB etc. only as much
needed.
Limit RTOS services.
Do not use same function that does nearly same action.
RTOS Design
 Techniques to save power:






Idle mode.
Power down mode.
Sleep mode.
Low power mode.
Standby mode.
RTOS Design
 Encapsulate








hardware with task:

This type of task is known as sever task.
If hardware is having many tasks, then we must have
separate task to encapsulate the hardware.
This separate task is known as server task.
Whenever task has to access hardware, they give
message in the queue to the server task.
Then server task makes accessing the hardware in
proper manner.
Advantages
 Run time facilities i.e. provision of kernel services.

 Provision for interrupts.
 Task can have priority.
 This architecture can suspend low priority task

and make high priority task run immediately
when need arises.
 Scalable.
 Portable.
Disadvantages
 Cost

is more.
 License.
 Supplier stability/ longevity.
 Availability of Development tools.
Examples
 LynxOS.

 OSE
 QNX
 RTLinux
 Windows
 VxWorks

CE
Applications
 Web

server
 Microwave oven
 MRI(Magnetic Resonance Machine)
 Aircraft control
 Automotive applications:
a) automatic breaking systems.
b) fuel injection.
c) path tracking.
REAL TIME OPERATING SYSTEM

More Related Content

What's hot

Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded SystemsHimanshu Ghetia
 
Basic functions & types of RTOS ES
Basic functions & types of  RTOS ESBasic functions & types of  RTOS ES
Basic functions & types of RTOS ESJOLLUSUDARSHANREDDY
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating SystemsPawandeep Kaur
 
FreeRTOS basics (Real time Operating System)
FreeRTOS basics (Real time Operating System)FreeRTOS basics (Real time Operating System)
FreeRTOS basics (Real time Operating System)Naren Chandra
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating SystemsAshwani Garg
 
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSINTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSJOLLUSUDARSHANREDDY
 
Basic ops concept of comp
Basic ops  concept of compBasic ops  concept of comp
Basic ops concept of compgaurav jain
 
RTOS for Embedded System Design
RTOS for Embedded System DesignRTOS for Embedded System Design
RTOS for Embedded System Designanand hd
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmwareJoel P
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOSICS
 
Memory allocation for real time operating system
Memory allocation for real time operating systemMemory allocation for real time operating system
Memory allocation for real time operating systemAsma'a Lafi
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos conceptsanishgoel
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts NishmaNJ
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating SystemDr. Pankaj Zope
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Schedulingsathish sak
 

What's hot (20)

Rtos ss
Rtos ssRtos ss
Rtos ss
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
 
Basic functions & types of RTOS ES
Basic functions & types of  RTOS ESBasic functions & types of  RTOS ES
Basic functions & types of RTOS ES
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
FreeRTOS basics (Real time Operating System)
FreeRTOS basics (Real time Operating System)FreeRTOS basics (Real time Operating System)
FreeRTOS basics (Real time Operating System)
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLSINTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
INTERRUPT ROUTINES IN RTOS EN VIRONMENT HANDELING OF INTERRUPT SOURCE CALLS
 
Basic ops concept of comp
Basic ops  concept of compBasic ops  concept of comp
Basic ops concept of comp
 
RTOS for Embedded System Design
RTOS for Embedded System DesignRTOS for Embedded System Design
RTOS for Embedded System Design
 
Real Time Operating Systems
Real Time Operating SystemsReal Time Operating Systems
Real Time Operating Systems
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
 
Introduction to FreeRTOS
Introduction to FreeRTOSIntroduction to FreeRTOS
Introduction to FreeRTOS
 
Memory allocation for real time operating system
Memory allocation for real time operating systemMemory allocation for real time operating system
Memory allocation for real time operating system
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 
Unit 4 Real Time Operating System
Unit 4 Real Time Operating SystemUnit 4 Real Time Operating System
Unit 4 Real Time Operating System
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 

Viewers also liked

リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介NSaitoNmiri
 
NiosII と RTOS について
NiosII と RTOS についてNiosII と RTOS について
NiosII と RTOS についてryos36
 
Real time operating-systems
Real time operating-systemsReal time operating-systems
Real time operating-systemskasi963
 
マイコンでマルチタスク
マイコンでマルチタスクマイコンでマルチタスク
マイコンでマルチタスクKatsuhiko Terawaki
 
Real Time Operating System Concepts
Real Time Operating System ConceptsReal Time Operating System Concepts
Real Time Operating System ConceptsSanjiv Malik
 

Viewers also liked (6)

リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介リアルタイムOSの必要性とTOPPERS/SSPの紹介
リアルタイムOSの必要性とTOPPERS/SSPの紹介
 
G7プレゼンrtos自作
G7プレゼンrtos自作G7プレゼンrtos自作
G7プレゼンrtos自作
 
NiosII と RTOS について
NiosII と RTOS についてNiosII と RTOS について
NiosII と RTOS について
 
Real time operating-systems
Real time operating-systemsReal time operating-systems
Real time operating-systems
 
マイコンでマルチタスク
マイコンでマルチタスクマイコンでマルチタスク
マイコンでマルチタスク
 
Real Time Operating System Concepts
Real Time Operating System ConceptsReal Time Operating System Concepts
Real Time Operating System Concepts
 

Similar to REAL TIME OPERATING SYSTEM

RTOS implementation
RTOS implementationRTOS implementation
RTOS implementationRajan Kumar
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareQuantum Leaps, LLC
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareMiro Samek
 
Real time system basic concept
Real time system basic conceptReal time system basic concept
Real time system basic conceptMOUMITA GHOSH
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating SystemSharad Pandey
 
Lecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptxLecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptxSekharSankuri1
 
rtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfrtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfreemasajin1
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time JavaDeniz Oguz
 

Similar to REAL TIME OPERATING SYSTEM (20)

RTOS implementation
RTOS implementationRTOS implementation
RTOS implementation
 
Lab6 rtos
Lab6 rtosLab6 rtos
Lab6 rtos
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
Rtos
RtosRtos
Rtos
 
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded SoftwareBeyond the RTOS: A Better Way to Design Real-Time Embedded Software
Beyond the RTOS: A Better Way to Design Real-Time Embedded Software
 
Vx works RTOS
Vx works RTOSVx works RTOS
Vx works RTOS
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Real time system basic concept
Real time system basic conceptReal time system basic concept
Real time system basic concept
 
Making Linux do Hard Real-time
Making Linux do Hard Real-timeMaking Linux do Hard Real-time
Making Linux do Hard Real-time
 
Real Time Operating System
Real Time Operating SystemReal Time Operating System
Real Time Operating System
 
Lecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptxLecture10_RealTimeOperatingSystems.pptx
Lecture10_RealTimeOperatingSystems.pptx
 
Embedded os
Embedded osEmbedded os
Embedded os
 
Lab3F22.pdf
Lab3F22.pdfLab3F22.pdf
Lab3F22.pdf
 
Rtos by shibu
Rtos by shibuRtos by shibu
Rtos by shibu
 
rtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdfrtosbyshibu-131026100746-phpapp01.pdf
rtosbyshibu-131026100746-phpapp01.pdf
 
rtos.ppt
rtos.pptrtos.ppt
rtos.ppt
 
1230 Rtf Final
1230 Rtf Final1230 Rtf Final
1230 Rtf Final
 
Introduction to Real Time Java
Introduction to Real Time JavaIntroduction to Real Time Java
Introduction to Real Time Java
 
Realtime
RealtimeRealtime
Realtime
 
Autosar Basics hand book_v1
Autosar Basics  hand book_v1Autosar Basics  hand book_v1
Autosar Basics hand book_v1
 

Recently uploaded

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptxVS Mahajan Coaching Centre
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxmanuelaromero2013
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon AUnboundStockton
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...Marc Dusseiller Dusjagr
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Educationpboyjonauth
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeThiyagu K
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsanshu789521
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersChitralekhaTherkar
 

Recently uploaded (20)

Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions  for the students and aspirants of Chemistry12th.pptxOrganic Name Reactions  for the students and aspirants of Chemistry12th.pptx
Organic Name Reactions for the students and aspirants of Chemistry12th.pptx
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
How to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptxHow to Make a Pirate ship Primary Education.pptx
How to Make a Pirate ship Primary Education.pptx
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Crayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon ACrayon Activity Handout For the Crayon A
Crayon Activity Handout For the Crayon A
 
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
“Oh GOSH! Reflecting on Hackteria's Collaborative Practices in a Global Do-It...
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Introduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher EducationIntroduction to ArtificiaI Intelligence in Higher Education
Introduction to ArtificiaI Intelligence in Higher Education
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
Measures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and ModeMeasures of Central Tendency: Mean, Median and Mode
Measures of Central Tendency: Mean, Median and Mode
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Presiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha electionsPresiding Officer Training module 2024 lok sabha elections
Presiding Officer Training module 2024 lok sabha elections
 
Micromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of PowdersMicromeritics - Fundamental and Derived Properties of Powders
Micromeritics - Fundamental and Derived Properties of Powders
 

REAL TIME OPERATING SYSTEM

  • 1. RTOS Real Time Operating System By: VIVEK. P.PATKAR. PRAKRUTI. JOSHI. An example of RTOS implementation on Renesas automotive dashboard platform.
  • 2. What is RTOS?  An RTOS is multitasking operating system for the applications needing meeting of : a) time deadlines and b)functioning in real time constraints
  • 5. Architecture of RTOS  An RTOS usually comprises only a kernel. For more complex embedded systems, an RTOS can be a combination of various modules, including the kernel, networking protocol stacks, and other components as illustrated previously.  An operating system generally consists of two parts: kernel space (kernel mode) and user space (user mode).
  • 6. Kernel The kernel of an RTOS provides an abstraction layer between the application software and hardware.  This abstraction layer comprises of six main types of common services provided by the kernel to the application software. 
  • 7. KERNEL There are three broad categories of kernel models available Monolithic Kernel E.g.. Examples are Linux and Windows Microkernel E.g. Examples are AmigaOS and QNX Exokernel E.g.. library operating systems (libOSes)
  • 8. Classification Of RTOS RTOS Hard real time Firm real time Zero degree of tolerance Unacceptable quality reduction E.g. Automobile engine control system and anti lock brake, video transmission, each picture frame and audio must be transferred at fixed rate. Soft real time Reduction in quality reduction is acceptable. E.g. a food processing plant control system. E.g. Mobile phone, digital cameras and orchestra playing robots.
  • 9. Features Of RTOS Task and Multitask Running Scheduler Timer Function Memory Management Dormant Blocked Ready Pre emptive Non Pre emptive Inter Task Communication
  • 10. Task and Multitask Context Switch E.g.20 MHz 68000 process or task switch times are roughly 20 microseconds. In contrast, a 100 MHz ARM CPU switches in less than 3 microseconds. Advantages: a)Can concentrate all the talent at a particular task. b)Debugging is simple. c)Easy to understand.
  • 11. Scheduler Pre emptive Scheduler It allows high priority task to run first and move low priority task which is in running into ready state. E.g. Solaris 2.0/SunOS 5.0, Windows NT, the Linux kernel 2.6 and 3.x, AIX and some BSD systems (NetBSD, since version 5), Anroid. Advantages: High priority task executed immediately. Disadvantages: Starvation.
  • 12. Scheduler Non Pre emptive Scheduler High priority task co operate with low priority task. E.g. Windows3.1x, Mac OS pre-9. Advantages: No starvation. Easy to implement. Disadvantages: High priority task has to wait for low priority task to complete, thus, not suitable for RTOS.
  • 13. Timer Function  Task delay. E.g. In μC/OS-II, for a task to delay itself: OSTimeDly(ticks), where ticks is the number of clock ticks from the timer; OSTimeDlyHMSM(H,M,S,M), with Hours, Minutes, Seconds, Microseconds.  Task alert. E.g. µC/OS-II use system clock, Vx Works use watchdog timers
  • 14. Memory Management Memory allocated for each task.  Memory allocated for each task control block(TCB).  Size of queue.  Size of mailbox  Size of pipe  TCB
  • 15. Inter task Communication Event Queue Mailbox Pipe Shared Data Protected Disabling Task Switch Semaphore Disabling Interrupts Mutex Counting Semaphore Semaphore Priority Inversion Spinlock Semaphore Dead Lock
  • 16. Event Event objects are used when task synchronization is required without resource sharing. They allow one or more tasks to keep waiting for a specified event to occur.
  • 17. Queue Queue : E.g. AVR microcontroller, Linux 2.4; Windows NT/XP/Vista, Mac OS X uses a multilevel feedback queue, uses a Multilevel feedback queue. mailbox: E.g. TI SYS/BIOS v6.33 RTOS, Keil RTX. Pipe: E.g. QNX RTOS, SMX RTOS.
  • 19. Binary Semaphore      Whenever it is set, shared data is free. whenever it is reset shared data is busy. Whenever a task access shared data it takes semaphore and the semaphore flag is reset. Whenever a task exit from shared data it releases semaphore and the flag is reset. In this way shared data is protected.
  • 21. Counting Semaphore     It is semaphore in which value can be incremented or decremented. it is unsigned integer. This semaphore can be taken multiple times. Taking semaphore means decrementing the integer. Releasing the semaphore means incrementing the integer.
  • 23. Spin lock Semaphore       This semaphore will not make running task to blocked immediately. Spin lock is useful in following situation: Suppose low priority task is running and only some time is left for its completion. Now high priority task wants to run Now RTOS provides spin lock semaphore to the high priority task and so it can spin for some time. During that time low priority task is executed and by itself it is moved into blocked state. Now high priority task begins to run.
  • 24. RTOS Design  Size of ISR: If ISR is long, then there are two drawbacks:   Highest priority task is blocked for more time. ISR is sensitive to error and so it is difficult to debug long ISR. Conclusion: Size of ISR should be small.
  • 25. RTOS Design  Number of Task: Advantages:  Can concentrate all talent at a particular task.  Debugging is simple.  Very easy to understand. Disadvantages:  More memory needed because each task needs memory.  Speed is less because task switching needs more time. Conclusion: Number of tasks should be moderate.
  • 26. RTOS Design  Avoid creating and destroying task: It is time consuming and thus speed becomes less. Conclusion: Must avoid this.  Task structure: Task designing should be such that task is blocked at the most only one place.
  • 27. RTOS Design  Keep time slicing off: Task should not have equal priority.  Techniques    to save memory: For each task provide stack memory, TCB etc. only as much needed. Limit RTOS services. Do not use same function that does nearly same action.
  • 28. RTOS Design  Techniques to save power:      Idle mode. Power down mode. Sleep mode. Low power mode. Standby mode.
  • 29. RTOS Design  Encapsulate     hardware with task: This type of task is known as sever task. If hardware is having many tasks, then we must have separate task to encapsulate the hardware. This separate task is known as server task. Whenever task has to access hardware, they give message in the queue to the server task. Then server task makes accessing the hardware in proper manner.
  • 30. Advantages  Run time facilities i.e. provision of kernel services.  Provision for interrupts.  Task can have priority.  This architecture can suspend low priority task and make high priority task run immediately when need arises.  Scalable.  Portable.
  • 31. Disadvantages  Cost is more.  License.  Supplier stability/ longevity.  Availability of Development tools.
  • 32. Examples  LynxOS.  OSE  QNX  RTLinux  Windows  VxWorks CE
  • 33. Applications  Web server  Microwave oven  MRI(Magnetic Resonance Machine)  Aircraft control  Automotive applications: a) automatic breaking systems. b) fuel injection. c) path tracking.