SlideShare a Scribd company logo
1 of 39
Real-Time SystemsReal-Time Systems
Real-Time Systems
Sessions
1. Introduction to Real-Time Concepts.
2. Real-Time Operating Systems.
Real-Time Systems
Real-Time Systems
Introduction to Real-Time Concepts.
Session 1
Real-Time Systems
Real-Time Systems
Real-Time System
• Definition
A real-time system (defined by IEEE) is a system whose
correctness includes its response time as well as its functional
correctness.
In other words, in a real-time system, it not only matters that
the answers are correct, but it matters when the answers
are produced.
A Late Answer is a Wrong Answer!
Real-Time Systems
Real-Time Systems
• A real-time system is a system whose specification includes
both logical and temporal correctness requirements.
• Logical Correctness: Produces correct outputs.
– Can by checked, for example, by Hoare logic.
• Temporal Correctness: Produces outputs at the right time.
– In this course, we spend much time on techniques and
technologies for achieving and checking temporal
correctness.
Real-Time Systems
Characteristics of Real-Time Systems
• Event-driven, reactive.
• High cost of failure.
• Concurrency/multiprogramming.
• Stand-alone/continuous operation.
• Reliability/fault-tolerance requirements.
• Predictable behavior.
Real-Time Systems
Real-Time Systems
Real-Time Systems – Categories
1. Hard Real-Time Systems
2. Soft Real-Time Systems
Real-Time Systems
Real-Time Systems
Hard Real-Time Systems
• Hard real-time means that the system (i.e., the entire system
including OS, middleware,application, HW,
communications,etc.) must be designed to GUARANTEE
that response requirements are met.
• Systems where it is absolutely imperative that
responses occur within the required deadline.
E.g. Flight control systems.
• Hard Real-Time doesn’t mean fast execution.
Real-Time Systems
Real-Time Systems
Examples
• Electronic Engines
• Automotive and Flight Control Systems
• Medical Systems
• Industrial Control Systems
• Robotics
Real-Time Systems
Real-Time Systems
Soft-Real Time Systems
• Soft real-time is exactly the same as hard real-time in its
infrastructure requirements, but it is not necessary for
system success that EVERY time constraint be met.
• Systems where deadlines are important but which will still
function correctly if deadlines are occasionally missed.
E.g. Data acquisition system.
Real-Time Systems
Real-Time Systems
Example
• Telecommunication Systems
• Internet Video
• ATM
Real-Time Systems
Real-Time Systems
The Real-Time Spectrum
Real-Time Systems
Real-Time Systems
Real-Time Design Issues
• How many things are under control?
• How “hard” are the timing constraints?
• Will there be user interaction?
• What is the mix of synchronous vs. asynchronous
threads of control?
Real-Time Systems
Real-Time Systems
Real-Time Design Approaches
• There are two primary techniques used in real-time designs
- Super- loops
One program running
-Multitasking
Many programs running, taking turns
Real-Time Systems
Real-Time Systems
Super-Loops
• Also called Foreground/Background Systems.
• There is a background loop that is always running anytime
an ISR isn’t executing.
• The CPU is always busy.
• Can be taken to the extreme of an idle loop and all of the
work being done in the ISRs.
Real-Time Systems
Real-Time Systems
Super-Loop
ISR
ISR
ISR
Background Foreground
Time
Real-Time Systems
Real-Time Systems
Multi-Tasking Operation
• With multi- tasking, multiple tasks or threads compete for the
CPU based on a scheduling policy.
• This scheduling policy is implemented in the Kernel.
• The tasks give up the CPU:
-Voluntarily: cooperative multi- tasking
Developer determined via system call.
- Involuntarily: preemptive multi- tasking
Process scheduling algorithm.
Real-Time Systems
Real-Time Systems
Multi-Tasking
Real-Time Systems
Real-Time Systems
Session 2
Real-Time Operating Systems
Real-Time Systems
Real-Time Systems
What Is An RTOS?
• A Real- Time Operating System is software that allows a
program to:
– Communicate with peripherals and other tasks.
– React in a deterministic way to external events.
– Share the CPU and resources in a rigidly
established manner between competing threads
of execution.
Real-Time Systems
Real-Time Systems
Commercial RTOSs
• VxWorks
• pSOS System
• QNX
• Nucleus
• Windows CE
• MircoC/OS-II
Real-Time Systems
Real-Time Systems
Commercial RTOS Shortcomings
• Can be very expensive
• High, per- seat costs
• Royalties
• Access to source
Real-Time Systems
Real-Time Systems
Free RTOSs
• Embedded Linux
• Real-Time Linux
• RTAI
• RTEMS
• eCOS
Real-Time Systems
Real-Time Systems
Multi-Tasking Revisited
• Multitasking is the process of scheduling and switching the
CPU between several tasks.
• Maximizes the utilization of the CPU.
• Facilitates modular construction of applications.
• Simplifies the design of application programs.
Real-Time Systems
Real-Time Systems
Task
• A task (thread) is a simple program that thinks it has the
CPU all to itself.
• A Real-Time application consists of several tasks executing
concurrently.
• Each task is assigned a priority, its own set of CPU registers,
and its own stack area.
Real-Time Systems
Real-Time Systems
Task States
Waiting
Dormant Ready Running ISR
Real-Time Systems
Real-Time Systems
Content Switch
• Occurs when a Multi-Tasking kernel decides to run a
different task.
• Steps involved in a content switch
1.Save current task’s content(CPU registers) in the
current tasks content storage area(it’s stack)
2.Restore the new task’s content from it’s storage
area(it’s stack).
3.Resume execution of the new task’s code.
Real-Time Systems
Real-Time Systems
Multiple Tasks
Task Control Block Task Control Block Task Control Block
CPU Registers
Status
SP
Priority
Status
SP
Priority
Status
SP
Priority
SP
TASK 1 TASK 2 TASK n
CPU
MEMORY
Stack Stack Stack
Real-Time Systems
Real-Time Systems
Kernel
• Definition
Kernel is the part of the multi-tasking system responsible
for the management of tasks and communication between
tasks.
• Services
- Context switching
- Inter task communication services(Semaphore management,
mail boxes, queues, time delays, etc.)
Real-Time Systems
Real-Time Systems
Scheduler
• Scheduler is the part of the kernel, responsible for
determining which task will run next.
• Most real-time kernels are priority based.
• Each task is assigned a priority based on its importance.
• The priority of each task is application specific.
• Control is always given to the highest priority task ready to
run.
Real-Time Systems
Real-Time Systems
Kernel
There are two types of priority based kernels
• Non-Preemptive Kernel
• Preemptive Kernel
Real-Time Systems
Real-Time Systems
Non-Preemptive Kernel
• Require that each task does something to explicitly give up
the control of the CPU.
• Also called cooperative multitasking.
• ISR always returns to the interrupted task.
• Advantages
- Low interrupt latency
- It can use Non-Reentrant functions
• Disadvantages
- Responsiveness is very low.
• Very few kernels are non-preemptive
Real-Time Systems
Non-Preemptive Kernel
Low Priority Task
ISR
ISR makes the higher
priority task ready
High Priority Task
Low-priority task
relinquishes the CPU
Time
Real-Time Systems
Real-Time Systems
Preemptive Kernel
• It is used when system responsiveness is important.
• High priority task ready to run is always given control of
the CPU
• Most real-time kernels are preemptive.
• Application code using a preemptive kernel should not use
non-reentrant functions or an appropriate mutual exclusion
method should be applied to prevent data corruption.
Real-Time Systems
Real-Time Systems
Preemptive Kernel
Low Priority Task
ISR
High Priority Task
ISR makes high
priority task ready Time
Real-Time Systems
Real-Time Systems
Reentrancy
• A reentrant function can be interrupted at any time and
resumed at a later time without loss of data.
• It either uses local variables or protects data when global
variables are used.
• It can be used by more than one task without fear of data
corruption.
Real-Time Systems
Real-Time Systems
Mutual Exclusion
• Mutual Exclusion is used to ensure the exclusive access to
a shared resource without data corruption.
• Common Methods are
– Disabling interrupts
– Disabling scheduling
– Using Semaphores
Real-Time Systems
Real-Time Systems
• Common Inter task Communication methods are
1. Message Queues
2. Mail Boxes
3. Semaphores
Intertask Communication
Real-Time Systems
Real-Time SystemsReal-Time Systems

More Related Content

What's hot

Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage StructureVimalanathan D
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production systemHema Kashyap
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharingmyrajendra
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OSvampugani
 
Multiversion Concurrency Control Techniques
Multiversion Concurrency Control TechniquesMultiversion Concurrency Control Techniques
Multiversion Concurrency Control TechniquesRaj vardhan
 
Concepts of Real time Systems (RTS)
Concepts of Real time Systems (RTS)Concepts of Real time Systems (RTS)
Concepts of Real time Systems (RTS)EngKarrarSMuttair
 
RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems Bayar shahab
 
Production System in AI
Production System in AIProduction System in AI
Production System in AIBharat Bhushan
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsHariharan Ganesan
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptmali yogesh kumar
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic conceptsStudent
 
Swap-space Management
Swap-space ManagementSwap-space Management
Swap-space ManagementAgnas Jasmine
 
Unified process model
Unified process modelUnified process model
Unified process modelRyndaMaala
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)swapnac12
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysisDattatray Gandhmal
 

What's hot (20)

Mass Storage Structure
Mass Storage StructureMass Storage Structure
Mass Storage Structure
 
Lecture 06 production system
Lecture 06 production systemLecture 06 production system
Lecture 06 production system
 
6 multiprogramming & time sharing
6 multiprogramming & time sharing6 multiprogramming & time sharing
6 multiprogramming & time sharing
 
Daa notes 1
Daa notes 1Daa notes 1
Daa notes 1
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Multiversion Concurrency Control Techniques
Multiversion Concurrency Control TechniquesMultiversion Concurrency Control Techniques
Multiversion Concurrency Control Techniques
 
Concepts of Real time Systems (RTS)
Concepts of Real time Systems (RTS)Concepts of Real time Systems (RTS)
Concepts of Real time Systems (RTS)
 
RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems RTOS- Real Time Operating Systems
RTOS- Real Time Operating Systems
 
Production System in AI
Production System in AIProduction System in AI
Production System in AI
 
Real Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systemsReal Time Operating system (RTOS) - Embedded systems
Real Time Operating system (RTOS) - Embedded systems
 
Pipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture pptPipeline hazards in computer Architecture ppt
Pipeline hazards in computer Architecture ppt
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
Heap Management
Heap ManagementHeap Management
Heap Management
 
Swap-space Management
Swap-space ManagementSwap-space Management
Swap-space Management
 
Unified process model
Unified process modelUnified process model
Unified process model
 
Real time system
Real time systemReal time system
Real time system
 
Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)Performance analysis(Time & Space Complexity)
Performance analysis(Time & Space Complexity)
 
Phases of Compiler
Phases of CompilerPhases of Compiler
Phases of Compiler
 
Finite automata-for-lexical-analysis
Finite automata-for-lexical-analysisFinite automata-for-lexical-analysis
Finite automata-for-lexical-analysis
 
software engineering
software engineeringsoftware engineering
software engineering
 

Similar to Real Time Systems

Real time operating system
Real time operating systemReal time operating system
Real time operating systemKhuram Shahzad
 
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .pptReal-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .pptlematadese670
 
Types of operating system.................
Types of operating system.................Types of operating system.................
Types of operating system.................harendersin82880
 
Operating system 10 real time operating system
Operating system 10 real time operating systemOperating system 10 real time operating system
Operating system 10 real time operating systemVaibhav Khanna
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Insider operating system
Insider   operating systemInsider   operating system
Insider operating systemAditi Saxena
 
EMBEDDED OS
EMBEDDED OSEMBEDDED OS
EMBEDDED OSAJAL A J
 
MODULE IV embedded (1).pptx
MODULE IV embedded (1).pptxMODULE IV embedded (1).pptx
MODULE IV embedded (1).pptxSajinvs4
 
Operating system 06 operating system classification
Operating system 06 operating system classificationOperating system 06 operating system classification
Operating system 06 operating system classificationVaibhav Khanna
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxakhilagajjala
 
Operating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantagesOperating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantagesOPTOM Nimra Murtaza
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systemsjeronimored
 
Classifications of OS.pptx
Classifications of OS.pptxClassifications of OS.pptx
Classifications of OS.pptxBalamurugan M
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V Real Time Operating System (RTOS)
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V  Real Time Operating System (RTOS)SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V  Real Time Operating System (RTOS)
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V Real Time Operating System (RTOS)Arti Parab Academics
 

Similar to Real Time Systems (20)

Real time operating system
Real time operating systemReal time operating system
Real time operating system
 
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .pptReal-Time Operating Systems Real-Time Operating Systems RTOS .ppt
Real-Time Operating Systems Real-Time Operating Systems RTOS .ppt
 
Types of operating system.................
Types of operating system.................Types of operating system.................
Types of operating system.................
 
Operating system 10 real time operating system
Operating system 10 real time operating systemOperating system 10 real time operating system
Operating system 10 real time operating system
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Insider operating system
Insider   operating systemInsider   operating system
Insider operating system
 
Operating System Overview.pdf
Operating System Overview.pdfOperating System Overview.pdf
Operating System Overview.pdf
 
EMBEDDED OS
EMBEDDED OSEMBEDDED OS
EMBEDDED OS
 
OS.pptx
OS.pptxOS.pptx
OS.pptx
 
MODULE IV embedded (1).pptx
MODULE IV embedded (1).pptxMODULE IV embedded (1).pptx
MODULE IV embedded (1).pptx
 
Operating system 06 operating system classification
Operating system 06 operating system classificationOperating system 06 operating system classification
Operating system 06 operating system classification
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptx
 
Operating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantagesOperating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantages
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
EE469-ch1.pptx
EE469-ch1.pptxEE469-ch1.pptx
EE469-ch1.pptx
 
EE469-ch1.pptx
EE469-ch1.pptxEE469-ch1.pptx
EE469-ch1.pptx
 
Resource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time SystemsResource Management in (Embedded) Real-Time Systems
Resource Management in (Embedded) Real-Time Systems
 
Classifications of OS.pptx
Classifications of OS.pptxClassifications of OS.pptx
Classifications of OS.pptx
 
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V Real Time Operating System (RTOS)
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V  Real Time Operating System (RTOS)SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V  Real Time Operating System (RTOS)
SYBSC IT SEM IV EMBEDDED SYSTEMS UNIT V Real Time Operating System (RTOS)
 
Os1
Os1Os1
Os1
 

Recently uploaded

vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Bookvip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Bookmanojkuma9823
 
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsappssapnasaifi408
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)861c7ca49a02
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...ttt fff
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberMs Riya
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...srsj9000
 
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一C SSS
 
Vip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts ServiceVip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts Serviceankitnayak356677
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile servicerehmti665
 
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一ss ss
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一diploma 1
 
(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一C SSS
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一Fi sss
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一ss ss
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightKomal Khan
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Servicesnajka9823
 

Recently uploaded (20)

vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Bookvip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
vip Model Basti Call Girls 9999965857 Call or WhatsApp Now Book
 
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /WhatsappsBeautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
Beautiful Sapna Call Girls CP 9711199012 ☎ Call /Whatsapps
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
 
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
5S - House keeping (Seiri, Seiton, Seiso, Seiketsu, Shitsuke)
 
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
毕业文凭制作#回国入职#diploma#degree美国威斯康星大学麦迪逊分校毕业证成绩单pdf电子版制作修改#毕业文凭制作#回国入职#diploma#d...
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up NumberCall Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
Call Girls Delhi {Rs-10000 Laxmi Nagar] 9711199012 Whats Up Number
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
 
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
(办理学位证)韩国汉阳大学毕业证成绩单原版一比一
 
Vip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts ServiceVip Noida Escorts 9873940964 Greater Noida Escorts Service
Vip Noida Escorts 9873940964 Greater Noida Escorts Service
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile service
 
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
定制(Salford学位证)索尔福德大学毕业证成绩单原版一比一
 
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
young call girls in  Khanpur,🔝 9953056974 🔝 escort Serviceyoung call girls in  Khanpur,🔝 9953056974 🔝 escort Service
young call girls in Khanpur,🔝 9953056974 🔝 escort Service
 
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
办理(CSU毕业证书)澳洲查理斯特大学毕业证成绩单原版一比一
 
CIVIL ENGINEERING
CIVIL ENGINEERINGCIVIL ENGINEERING
CIVIL ENGINEERING
 
(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一(办理学位证)多伦多大学毕业证成绩单原版一比一
(办理学位证)多伦多大学毕业证成绩单原版一比一
 
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
(办理学位证)加州州立大学北岭分校毕业证成绩单原版一比一
 
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一定制(USF学位证)旧金山大学毕业证成绩单原版一比一
定制(USF学位证)旧金山大学毕业证成绩单原版一比一
 
Hifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun TonightHifi Babe North Delhi Call Girl Service Fun Tonight
Hifi Babe North Delhi Call Girl Service Fun Tonight
 
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best ServicesVip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
Vip Udupi Call Girls 7001305949 WhatsApp Number 24x7 Best Services
 

Real Time Systems

  • 2. Real-Time Systems Sessions 1. Introduction to Real-Time Concepts. 2. Real-Time Operating Systems. Real-Time Systems
  • 3. Real-Time Systems Introduction to Real-Time Concepts. Session 1 Real-Time Systems
  • 4. Real-Time Systems Real-Time System • Definition A real-time system (defined by IEEE) is a system whose correctness includes its response time as well as its functional correctness. In other words, in a real-time system, it not only matters that the answers are correct, but it matters when the answers are produced. A Late Answer is a Wrong Answer! Real-Time Systems
  • 5. Real-Time Systems • A real-time system is a system whose specification includes both logical and temporal correctness requirements. • Logical Correctness: Produces correct outputs. – Can by checked, for example, by Hoare logic. • Temporal Correctness: Produces outputs at the right time. – In this course, we spend much time on techniques and technologies for achieving and checking temporal correctness. Real-Time Systems
  • 6. Characteristics of Real-Time Systems • Event-driven, reactive. • High cost of failure. • Concurrency/multiprogramming. • Stand-alone/continuous operation. • Reliability/fault-tolerance requirements. • Predictable behavior. Real-Time Systems
  • 7. Real-Time Systems Real-Time Systems – Categories 1. Hard Real-Time Systems 2. Soft Real-Time Systems Real-Time Systems
  • 8. Real-Time Systems Hard Real-Time Systems • Hard real-time means that the system (i.e., the entire system including OS, middleware,application, HW, communications,etc.) must be designed to GUARANTEE that response requirements are met. • Systems where it is absolutely imperative that responses occur within the required deadline. E.g. Flight control systems. • Hard Real-Time doesn’t mean fast execution. Real-Time Systems
  • 9. Real-Time Systems Examples • Electronic Engines • Automotive and Flight Control Systems • Medical Systems • Industrial Control Systems • Robotics Real-Time Systems
  • 10. Real-Time Systems Soft-Real Time Systems • Soft real-time is exactly the same as hard real-time in its infrastructure requirements, but it is not necessary for system success that EVERY time constraint be met. • Systems where deadlines are important but which will still function correctly if deadlines are occasionally missed. E.g. Data acquisition system. Real-Time Systems
  • 11. Real-Time Systems Example • Telecommunication Systems • Internet Video • ATM Real-Time Systems
  • 12. Real-Time Systems The Real-Time Spectrum Real-Time Systems
  • 13. Real-Time Systems Real-Time Design Issues • How many things are under control? • How “hard” are the timing constraints? • Will there be user interaction? • What is the mix of synchronous vs. asynchronous threads of control? Real-Time Systems
  • 14. Real-Time Systems Real-Time Design Approaches • There are two primary techniques used in real-time designs - Super- loops One program running -Multitasking Many programs running, taking turns Real-Time Systems
  • 15. Real-Time Systems Super-Loops • Also called Foreground/Background Systems. • There is a background loop that is always running anytime an ISR isn’t executing. • The CPU is always busy. • Can be taken to the extreme of an idle loop and all of the work being done in the ISRs. Real-Time Systems
  • 17. Real-Time Systems Multi-Tasking Operation • With multi- tasking, multiple tasks or threads compete for the CPU based on a scheduling policy. • This scheduling policy is implemented in the Kernel. • The tasks give up the CPU: -Voluntarily: cooperative multi- tasking Developer determined via system call. - Involuntarily: preemptive multi- tasking Process scheduling algorithm. Real-Time Systems
  • 19. Real-Time Systems Session 2 Real-Time Operating Systems Real-Time Systems
  • 20. Real-Time Systems What Is An RTOS? • A Real- Time Operating System is software that allows a program to: – Communicate with peripherals and other tasks. – React in a deterministic way to external events. – Share the CPU and resources in a rigidly established manner between competing threads of execution. Real-Time Systems
  • 21. Real-Time Systems Commercial RTOSs • VxWorks • pSOS System • QNX • Nucleus • Windows CE • MircoC/OS-II Real-Time Systems
  • 22. Real-Time Systems Commercial RTOS Shortcomings • Can be very expensive • High, per- seat costs • Royalties • Access to source Real-Time Systems
  • 23. Real-Time Systems Free RTOSs • Embedded Linux • Real-Time Linux • RTAI • RTEMS • eCOS Real-Time Systems
  • 24. Real-Time Systems Multi-Tasking Revisited • Multitasking is the process of scheduling and switching the CPU between several tasks. • Maximizes the utilization of the CPU. • Facilitates modular construction of applications. • Simplifies the design of application programs. Real-Time Systems
  • 25. Real-Time Systems Task • A task (thread) is a simple program that thinks it has the CPU all to itself. • A Real-Time application consists of several tasks executing concurrently. • Each task is assigned a priority, its own set of CPU registers, and its own stack area. Real-Time Systems
  • 26. Real-Time Systems Task States Waiting Dormant Ready Running ISR Real-Time Systems
  • 27. Real-Time Systems Content Switch • Occurs when a Multi-Tasking kernel decides to run a different task. • Steps involved in a content switch 1.Save current task’s content(CPU registers) in the current tasks content storage area(it’s stack) 2.Restore the new task’s content from it’s storage area(it’s stack). 3.Resume execution of the new task’s code. Real-Time Systems
  • 28. Real-Time Systems Multiple Tasks Task Control Block Task Control Block Task Control Block CPU Registers Status SP Priority Status SP Priority Status SP Priority SP TASK 1 TASK 2 TASK n CPU MEMORY Stack Stack Stack Real-Time Systems
  • 29. Real-Time Systems Kernel • Definition Kernel is the part of the multi-tasking system responsible for the management of tasks and communication between tasks. • Services - Context switching - Inter task communication services(Semaphore management, mail boxes, queues, time delays, etc.) Real-Time Systems
  • 30. Real-Time Systems Scheduler • Scheduler is the part of the kernel, responsible for determining which task will run next. • Most real-time kernels are priority based. • Each task is assigned a priority based on its importance. • The priority of each task is application specific. • Control is always given to the highest priority task ready to run. Real-Time Systems
  • 31. Real-Time Systems Kernel There are two types of priority based kernels • Non-Preemptive Kernel • Preemptive Kernel Real-Time Systems
  • 32. Real-Time Systems Non-Preemptive Kernel • Require that each task does something to explicitly give up the control of the CPU. • Also called cooperative multitasking. • ISR always returns to the interrupted task. • Advantages - Low interrupt latency - It can use Non-Reentrant functions • Disadvantages - Responsiveness is very low. • Very few kernels are non-preemptive Real-Time Systems
  • 33. Non-Preemptive Kernel Low Priority Task ISR ISR makes the higher priority task ready High Priority Task Low-priority task relinquishes the CPU Time Real-Time Systems
  • 34. Real-Time Systems Preemptive Kernel • It is used when system responsiveness is important. • High priority task ready to run is always given control of the CPU • Most real-time kernels are preemptive. • Application code using a preemptive kernel should not use non-reentrant functions or an appropriate mutual exclusion method should be applied to prevent data corruption. Real-Time Systems
  • 35. Real-Time Systems Preemptive Kernel Low Priority Task ISR High Priority Task ISR makes high priority task ready Time Real-Time Systems
  • 36. Real-Time Systems Reentrancy • A reentrant function can be interrupted at any time and resumed at a later time without loss of data. • It either uses local variables or protects data when global variables are used. • It can be used by more than one task without fear of data corruption. Real-Time Systems
  • 37. Real-Time Systems Mutual Exclusion • Mutual Exclusion is used to ensure the exclusive access to a shared resource without data corruption. • Common Methods are – Disabling interrupts – Disabling scheduling – Using Semaphores Real-Time Systems
  • 38. Real-Time Systems • Common Inter task Communication methods are 1. Message Queues 2. Mail Boxes 3. Semaphores Intertask Communication Real-Time Systems

Editor's Notes

  1. drfggg