Real Time Operating System 
CCM4320(NETWORK SYSTEMS AND SERVICES) , 
MIDDLESEX UNIVERSITY,LONDON 
PREPARED BY 
PAWANDEEP KAUR 
M00343421 
(RTOS)
Topics Discussed 
1 )REAL TIME OPERATING SYSTEM( INTRODUCTION 
AND CONCEPTS) 
2)DIFFERENCE BETWEEN REAL-TIME AND 
TRADITIONAL OPERATING SYSTEMS 
3) NUCLEUS AND ITS FEATURES 
4)WILL REAL TIME SYSTEMS REPLACE 
TRADITIONAL OS?(FUTURE OF TECHNOLOGY)
What is Real-Time Systems(RTOS)? 
* Real-time (software) (IEEE 610.12 - 1990): 
Response to an external process in a timely manner 
when it is performed in actual time and results are 
used to control, monitor and respond aptly. 
* It manages the hardware resources and hosts 
applications like GPOS, with precise timing and high 
degree of reliability.
Types of RTOS 
 Hard Real Time : A timeline constraint shall be satisfied or 
the task results in critical failure. 
Example: Aircraft, Autopilot plane, and Medical critical care 
system etc. 
 Firm Real time: Missing a constraint entails unacceptable 
quality reductions. 
Example : Multimedia applications. 
 Soft Real Time: Missed deadline is acceptable and it can be 
recovered with no impact on quality. 
Example: Online Transaction System, Stock price quotation 
system.
Pre-emptive Priority Scheduling 
The scheduler should be able to pre-empt any task(with the higher 
priority to the current) in the system and allocate the resource to 
the task that needs it most even at peak load. 
Task Priority 
Completed Preempted Completed 
Time 
Task 1 
Task 2 
Task 3 
Task 2 Task4
Multitasking 
 RTOS supports multitasking in real time 
applications. 
 Responding in a predictable way to multiple 
simultaneous external events (happening in an 
uncontrolled way). 
 RMS(Rate-Monotonic Scheduling) : An algorithm 
with a static-priority scheduling class 
 The static priorities are assigned on the basis of the 
cycle duration of the job.
Reliable and Sufficient Inter Task 
Communication Mechanism 
 For task synchronization Event Objects and 
Semaphore mechanism is used. 
1) Event objects are used when synchronization 
is required without resource sharing. One or 
more task is kept waiting for a specified event to 
occur. 
2)A semaphore function is a key which needs 
to be acquired task to obtain the resource, under 
resource sharing environment. 
continue…….
Inter Task Communication 
Task A 
Occupied by Task A. 
Task B is not authorized 
until released by Task A 
count=0 count=1 
Shared 
Resource 
Inter-task communication involves sharing of data among tasks 
through sharing of memory space, and transmission of data. 
Mechanisms 
• Message queues 
• Pipes 
• Remote procedural calls (RPC) 
Task B 
R1
Priority Inheritance 
 Priority inheritance is a method for eliminating priority 
inversion problem with semaphores, by increasing the priority of 
the running process holding the resource to the maximum. 
Increasing 
High priority task 
Attempts to take semaphores and blocks 
Priority Enter ready state 
Semaphore 
Takes Semaphore 
Medium priority task preempts Gives Semaphore 
low priority task 
Low priority task 
Time
Control of Memory Management 
 In RTOS memory access time should be bound(predictable). 
 In Hard Real Time systems, static memory allocation system is used at 
start up. 
 In Soft Real Time Systems, dynamic memory allocation is used without 
Virtual Memory and Compaction. 
 The Stack Management or kernel stack is the memory management 
process in RTOS, where allocation of memory is done using Task 
Control Block 
 Heap Management: When a task finishes using a memory block it 
return memory to heap. It is used by kernel for dynamic memory 
allocation.
Predefined Short Latencies 
 RTOS have accurate and shortest timing of its 
system calls for the following behaviors: 
• TASK SWITCH OR CONTEXT SWITCH 
• INTERRUPT LATENCY 
• INTERRUPT DISPATCH LATENCY
RT & non-RT systems? 
TIME CONSTRAINTS ! 
PREDICTABILITY !
Key Differences 
RTOS Traditional OS 
Deterministic timing behavior Non-Deterministic 
Goals: Predictability and time 
constraints. 
Goals : Maximum system utilization 
and throughput 
Pre-emptive Priority Scheduling Round Robin or Time-sharing 
Scheduling 
Secondary Storage is usually limited 
and missing 
Secondary Storage are required to run 
large processes.
few more ! 
Interrupt latency is bounded Interrupt latency is variant and not 
bounded. 
Static Memory allocation Dynamic memory allocation 
No Virtual Memory and Compaction Virtual Memory and Compaction is an 
integral part of Memory Management 
Mission critical dedicated applications 
and control devices 
Large Database and general purpose 
applications
NUCLEUS RTOS 
 By the Embedded Systems Division of Mentor Graphics. 
It is an efficient real-time operating system with 
1. Database management. 
2. USB 
3. Networking 
4. Multimedia and advanced GUI 
 It has evolved into a complete OS comprised of kernel 
services, extensions, and APIs 
 Support range of electronic products and different types 
of microprocessors.
Features 
Features 
*Hard/ Soft real-time performance 
* Dynamic task creation/deletion 
* Inter-task communication and synchronization via 
mailboxes, queues, pipes, semaphores 
* Application timers/Event flags 
* Full MMU support 
* Static/dynamic memory allocation 
* Dynamic loading of code 
* Familiar APIs including C++, ANSI C, POSIX 
* Scales to any target hardware
Supports a full range of OS services 
 Comprehensive support for networking 
 Multiple file formats 
 User Interface: Desktop-like control framework, 
bitmaps shapes, BSD, 3D interface engine 
 802.1x wireless protocols 
 Supports various modern input and output devices
Broad Hardware Support 
 Nucleus RTOS has been ported to hundreds of 
different processors across various architectures 
including however not limited to
Will Real Time Operating Systems 
replace Traditional OS ? 
HYBRID SOLUTIONS 
(THE RTOS AND GPOS ON THE SAME MACHINE, 
COMMUNICATING VIA SHARED MEMORY OR OTHER 
TECHNIQUES. THE HOST OS IS THE RICH GPOS AND 
TARGET OS IS THE DEDICATED RTOS)
•Does nBota hsaivce L aallc fkeiantugr eins oTf oGdPaOyS’s l iRkeT sOouSrce 
code control systems, back up tools. 
•Too expensive to cover vast IT market. 
•Complicated to design and harder to use. 
•An overqualified RTOS on applications have 
negative impacts on time-to-markets. 
•Increase in the usage of soft real time based 
applications. 
• Emergence in the parallel and distributed systems
Pawandeep Kaur 
M00343421 
pp590@live.mdx.ac.uk

Real Time Operating Systems

  • 1.
    Real Time OperatingSystem CCM4320(NETWORK SYSTEMS AND SERVICES) , MIDDLESEX UNIVERSITY,LONDON PREPARED BY PAWANDEEP KAUR M00343421 (RTOS)
  • 2.
    Topics Discussed 1)REAL TIME OPERATING SYSTEM( INTRODUCTION AND CONCEPTS) 2)DIFFERENCE BETWEEN REAL-TIME AND TRADITIONAL OPERATING SYSTEMS 3) NUCLEUS AND ITS FEATURES 4)WILL REAL TIME SYSTEMS REPLACE TRADITIONAL OS?(FUTURE OF TECHNOLOGY)
  • 3.
    What is Real-TimeSystems(RTOS)? * Real-time (software) (IEEE 610.12 - 1990): Response to an external process in a timely manner when it is performed in actual time and results are used to control, monitor and respond aptly. * It manages the hardware resources and hosts applications like GPOS, with precise timing and high degree of reliability.
  • 4.
    Types of RTOS  Hard Real Time : A timeline constraint shall be satisfied or the task results in critical failure. Example: Aircraft, Autopilot plane, and Medical critical care system etc.  Firm Real time: Missing a constraint entails unacceptable quality reductions. Example : Multimedia applications.  Soft Real Time: Missed deadline is acceptable and it can be recovered with no impact on quality. Example: Online Transaction System, Stock price quotation system.
  • 6.
    Pre-emptive Priority Scheduling The scheduler should be able to pre-empt any task(with the higher priority to the current) in the system and allocate the resource to the task that needs it most even at peak load. Task Priority Completed Preempted Completed Time Task 1 Task 2 Task 3 Task 2 Task4
  • 7.
    Multitasking  RTOSsupports multitasking in real time applications.  Responding in a predictable way to multiple simultaneous external events (happening in an uncontrolled way).  RMS(Rate-Monotonic Scheduling) : An algorithm with a static-priority scheduling class  The static priorities are assigned on the basis of the cycle duration of the job.
  • 8.
    Reliable and SufficientInter Task Communication Mechanism  For task synchronization Event Objects and Semaphore mechanism is used. 1) Event objects are used when synchronization is required without resource sharing. One or more task is kept waiting for a specified event to occur. 2)A semaphore function is a key which needs to be acquired task to obtain the resource, under resource sharing environment. continue…….
  • 9.
    Inter Task Communication Task A Occupied by Task A. Task B is not authorized until released by Task A count=0 count=1 Shared Resource Inter-task communication involves sharing of data among tasks through sharing of memory space, and transmission of data. Mechanisms • Message queues • Pipes • Remote procedural calls (RPC) Task B R1
  • 10.
    Priority Inheritance Priority inheritance is a method for eliminating priority inversion problem with semaphores, by increasing the priority of the running process holding the resource to the maximum. Increasing High priority task Attempts to take semaphores and blocks Priority Enter ready state Semaphore Takes Semaphore Medium priority task preempts Gives Semaphore low priority task Low priority task Time
  • 11.
    Control of MemoryManagement  In RTOS memory access time should be bound(predictable).  In Hard Real Time systems, static memory allocation system is used at start up.  In Soft Real Time Systems, dynamic memory allocation is used without Virtual Memory and Compaction.  The Stack Management or kernel stack is the memory management process in RTOS, where allocation of memory is done using Task Control Block  Heap Management: When a task finishes using a memory block it return memory to heap. It is used by kernel for dynamic memory allocation.
  • 12.
    Predefined Short Latencies  RTOS have accurate and shortest timing of its system calls for the following behaviors: • TASK SWITCH OR CONTEXT SWITCH • INTERRUPT LATENCY • INTERRUPT DISPATCH LATENCY
  • 13.
    RT & non-RTsystems? TIME CONSTRAINTS ! PREDICTABILITY !
  • 14.
    Key Differences RTOSTraditional OS Deterministic timing behavior Non-Deterministic Goals: Predictability and time constraints. Goals : Maximum system utilization and throughput Pre-emptive Priority Scheduling Round Robin or Time-sharing Scheduling Secondary Storage is usually limited and missing Secondary Storage are required to run large processes.
  • 15.
    few more ! Interrupt latency is bounded Interrupt latency is variant and not bounded. Static Memory allocation Dynamic memory allocation No Virtual Memory and Compaction Virtual Memory and Compaction is an integral part of Memory Management Mission critical dedicated applications and control devices Large Database and general purpose applications
  • 16.
    NUCLEUS RTOS By the Embedded Systems Division of Mentor Graphics. It is an efficient real-time operating system with 1. Database management. 2. USB 3. Networking 4. Multimedia and advanced GUI  It has evolved into a complete OS comprised of kernel services, extensions, and APIs  Support range of electronic products and different types of microprocessors.
  • 17.
    Features Features *Hard/Soft real-time performance * Dynamic task creation/deletion * Inter-task communication and synchronization via mailboxes, queues, pipes, semaphores * Application timers/Event flags * Full MMU support * Static/dynamic memory allocation * Dynamic loading of code * Familiar APIs including C++, ANSI C, POSIX * Scales to any target hardware
  • 18.
    Supports a fullrange of OS services  Comprehensive support for networking  Multiple file formats  User Interface: Desktop-like control framework, bitmaps shapes, BSD, 3D interface engine  802.1x wireless protocols  Supports various modern input and output devices
  • 19.
    Broad Hardware Support  Nucleus RTOS has been ported to hundreds of different processors across various architectures including however not limited to
  • 20.
    Will Real TimeOperating Systems replace Traditional OS ? HYBRID SOLUTIONS (THE RTOS AND GPOS ON THE SAME MACHINE, COMMUNICATING VIA SHARED MEMORY OR OTHER TECHNIQUES. THE HOST OS IS THE RICH GPOS AND TARGET OS IS THE DEDICATED RTOS)
  • 21.
    •Does nBota hsaivceL aallc fkeiantugr eins oTf oGdPaOyS’s l iRkeT sOouSrce code control systems, back up tools. •Too expensive to cover vast IT market. •Complicated to design and harder to use. •An overqualified RTOS on applications have negative impacts on time-to-markets. •Increase in the usage of soft real time based applications. • Emergence in the parallel and distributed systems
  • 22.
    Pawandeep Kaur M00343421 pp590@live.mdx.ac.uk