SlideShare a Scribd company logo
Real-time Embedded  Systems- Lecture 02 Real-time Embedded Systems Lecture 2 RT Systems Essentials Part I RTOS-Scheduling Prof. Dr. Amitava Gupta Department of Power Engineering Jadavpur University , India
What have we learnt….. What is a Real-time System? (we know this) Hard & Soft RT systems What are embedded systems? ((know this too!) Real-time Embedded systems? (know this as well!) What we learn now? OS features which make each unit or module run i.e. RTOS This is just basic RTOS stuff (Vorspeise) Real-time Embedded  Systems- Lecture 02
Real-time system:- System External World t t+ ∆t ∆ t is fixed Real-time Embedded  Systems- Lecture 02
Hard Real Time Soft Real Time Soft Real Time is a property of timeliness of a computation where the value of computation decreases according to its tardiness. EXAMPLE:   Data Acquisition Systems A Hard Real Time system is one where the computation has no value whatsoever if the time constraint is not met. EXAMPLE:  Control Systems for Industrial  Processes Real-time Embedded  Systems- Lecture 02
BLOCKED RUNNING READY Resources Become  Available Resources Become  Unavailable Higher Priority Task Is READY Task Pre-empted Real-time Embedded  Systems- Lecture 02
Scheduling in  RTOS ,[object Object],[object Object],[object Object],Real-time Embedded  Systems- Lecture 02
Round Robin Real-time Embedded  Systems- Lecture 02
Function Pointer based scheduling While(1) { If (queue not empty) execute queue head ; } void isr1( ) { Place function pointer one in queue; } Void isr2(  ) { Place function pointer two in queue; } Real-time Embedded  Systems- Lecture 02
Priority Based Real-time Embedded  Systems- Lecture 02
Priority driven scheduling algorithms   A scheduling algorithm or a ‘scheduler’ is a set of rules which determines which task in a set of tasks is executed by a processor at any particular instant. We assume a scenario where a number of tasks are executed on a single processor. Static: Task priorities are assigned once and for all (aka fixed priority based preemptive scheduling) Dynamic: Task priorities change from time to time Hybrid: Combination of both Real-time Embedded  Systems- Lecture 02
Recap: Comparison of different scheduling techniques Real-time Embedded  Systems- Lecture 02 Does not depend on code Dependent on code Dependent on code Code Dependence Context switch latency Maximum of runtimes Sum of runtimes Worst case wait time for highest priority task possible possible Not possible Prioritization Pre-emptive Function Pointer Round-robin
[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Real-time Embedded  Systems- Lecture 02
A few definitions For a set of tasks  τ 1 ,  τ 2 ,   τ 3 ,  …  τ m , let C 1 , C 2 , C 3 ,…C m  be the runtimes ( maximum time taken by a task to execute without being preempted) T 1 ,T 2 ,T 3 ,…T m  be the periods at which the tasks receive triggers (requests) (Task periodicity) Response time : Time interval between the instant  at which request for a task arrives and the instant at which the response for the request is completed. Critical Instant : The instant at which the response time for a task is maximum Task deadline : The instant at which the next request for the task arrives Critical Timezone : Interval between the critical instant and the instant at which response is completed Overflow : If a request remains unfulfilled for a deadline Real-time Embedded  Systems- Lecture 02
Theorem 1 A critical instant for a task occurs whenever the request for the task arrives along with other higher priority tasks. (proof: chalk and board) Real-time Embedded  Systems- Lecture 02
Real-time Embedded  Systems- Lecture 02 Rate Monotonic Scheduling Explained ,[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],Rate monotonic scheduling  assigns priorities to tasks in the order of their request rates( priority higher if request rate is higher) Significance: If the total processor utilization by a set of tasks in less than or equal to a limiting value, then RM scheduling will schedule all the tasks to meet their respective deadlines.
Real-time Embedded  Systems- Lecture 02 Significance of RM scheduling Let  C 1 , C 2 , ….,C n  be the execution times of a set of  n  tasks T 1 , T 2 , ….,T n  be the periodicity of a set of  n  tasks Then the task set is RM schedulable  if  C 1 /T 1  + C 2 /T 2  +…+C n /T n   ≤ m(2 1/m  – 1) Again, the RM scheduling algorithm is an  optimal one. I Thus, if any static priority scheduling algorithm can produce a feasible schedule for a  set of n tasks, so can RM scheduling. Converse is not true. Digging dipper?  Real-time Systems: C.M. Krishna & K. G. Shin   McGraw-Hill ISBN 0-07-114243-6
Real-time Embedded  Systems- Lecture 02 Multiprocessor Scheduling Algorithms Utilization balanced : The algorithm assigns tasks to processors one by one in such a way that at the end of each step, the processor utilization remains balanced. Next-fit: Works in conjunction with RM. Tasks are broken into classes and each processor handles a set of tasks belonging to a particular task. Bin-packing: Assigns tasks to processors such that the total processor threshold is never exceeded. The threshold is set in such a way that uniprocessor scheduling generates a feasible schedule. Bidding algorithm : Tasks arrive at processors. A processor which is unable to meet the demand, offloads it to others. A variant of this is the buddy strategy- an underloaded processor is a buddy to an overloaded one. Assignment with precedence constraints: Takes task precedence into account
Real-time  Embedded Systems- Lecture 12 Something which we have left out: RMS with blocking where  b i  is the blocking time associated with task T i
Real-time Embedded  Systems- Lecture 02 Goodbye till next week

More Related Content

What's hot

Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
Student
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
knowdiff
 
Hard versus Soft real time system
Hard versus Soft real time systemHard versus Soft real time system
Hard versus Soft real time system
Kamal Acharya
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
sathish sak
 
Computer arithmetic in computer architecture
Computer arithmetic in computer architectureComputer arithmetic in computer architecture
Computer arithmetic in computer architecture
ishapadhy
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CS
Thanveen
 
Reference model of real time system
Reference model of real time systemReference model of real time system
Reference model of real time system
Kamal Acharya
 
Computer Organozation
Computer OrganozationComputer Organozation
Computer Organozation
Aabha Tiwari
 
Clock driven scheduling
Clock driven schedulingClock driven scheduling
Clock driven scheduling
Kamal Acharya
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming Languages
Heman Pathak
 
Real time system
Real time systemReal time system
Real time system
Aftab Hossain
 
Real Time most famous algorithms
Real Time most famous algorithmsReal Time most famous algorithms
Real Time most famous algorithms
Andrea Tino
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classification
Narayan Kandel
 
A survey of paradigms for building and
A survey of paradigms for building andA survey of paradigms for building and
A survey of paradigms for building and
cseij
 
Approaches to real time scheduling
Approaches to real time schedulingApproaches to real time scheduling
Approaches to real time scheduling
Kamal Acharya
 
advanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelismadvanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelism
Pankaj Kumar Jain
 
Parallel Processors (SIMD)
Parallel Processors (SIMD) Parallel Processors (SIMD)
Parallel Processors (SIMD)
Ali Raza
 

What's hot (20)

Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
1.prallelism
1.prallelism1.prallelism
1.prallelism
 
Lec3 final
Lec3 finalLec3 final
Lec3 final
 
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time SystemsSara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
Sara Afshar: Scheduling and Resource Sharing in Multiprocessor Real-Time Systems
 
Hard versus Soft real time system
Hard versus Soft real time systemHard versus Soft real time system
Hard versus Soft real time system
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 
Computer arithmetic in computer architecture
Computer arithmetic in computer architectureComputer arithmetic in computer architecture
Computer arithmetic in computer architecture
 
Real time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CSReal time Scheduling in Operating System for Msc CS
Real time Scheduling in Operating System for Msc CS
 
Reference model of real time system
Reference model of real time systemReference model of real time system
Reference model of real time system
 
Computer Organozation
Computer OrganozationComputer Organozation
Computer Organozation
 
Clock driven scheduling
Clock driven schedulingClock driven scheduling
Clock driven scheduling
 
Chapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming LanguagesChapter 4: Parallel Programming Languages
Chapter 4: Parallel Programming Languages
 
Real time system
Real time systemReal time system
Real time system
 
Real Time most famous algorithms
Real Time most famous algorithmsReal Time most famous algorithms
Real Time most famous algorithms
 
Feng’s classification
Feng’s classificationFeng’s classification
Feng’s classification
 
A survey of paradigms for building and
A survey of paradigms for building andA survey of paradigms for building and
A survey of paradigms for building and
 
Approaches to real time scheduling
Approaches to real time schedulingApproaches to real time scheduling
Approaches to real time scheduling
 
advanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelismadvanced computer architesture-conditions of parallelism
advanced computer architesture-conditions of parallelism
 
CO Module 5
CO Module 5CO Module 5
CO Module 5
 
Parallel Processors (SIMD)
Parallel Processors (SIMD) Parallel Processors (SIMD)
Parallel Processors (SIMD)
 

Viewers also liked

13 software metrics
13 software metrics13 software metrics
Brzina svetlosti
Brzina svetlostiBrzina svetlosti
Brzina svetlosti
Jelena Volarov
 
The marketing opportunities in the internet of things (iot)
The marketing opportunities in the internet of things (iot)The marketing opportunities in the internet of things (iot)
The marketing opportunities in the internet of things (iot)
OgilvyOne Worldwide
 
I gov chernihiv-ihub
I gov chernihiv-ihubI gov chernihiv-ihub
I gov chernihiv-ihub
vasya_bh
 
SiriusCon 2015 - closing session
SiriusCon 2015 - closing sessionSiriusCon 2015 - closing session
SiriusCon 2015 - closing session
Etienne Juliot
 
DXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDO
DXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDODXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDO
DXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDO
Cesar Coronel
 
Presentación1 sarah
Presentación1 sarahPresentación1 sarah
Presentación1 sarah
sarayandres
 
Live rugby sharks vs bulls....
Live rugby sharks vs bulls....Live rugby sharks vs bulls....
Live rugby sharks vs bulls....keen_kadin
 
Our strange experience
Our strange experienceOur strange experience
Our strange experienceHugo Caro
 
использование принципов экодизайна (Low impact design)
использование принципов экодизайна (Low impact design)использование принципов экодизайна (Low impact design)
использование принципов экодизайна (Low impact design)Natalya Vlasova
 
Virtually linked presentation debs
Virtually linked presentation debsVirtually linked presentation debs
Virtually linked presentation debsVirtuallyLinked
 
Sunway group leadership coaching advantage
Sunway group leadership coaching advantageSunway group leadership coaching advantage
Sunway group leadership coaching advantageLeadership AdvantEdge
 
Importance of software quality metrics
Importance of software quality metricsImportance of software quality metrics
Importance of software quality metrics
Piyush Sohaney
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
Drishti Bhalla
 
Software metrics
Software metricsSoftware metrics
Software metrics
Aadarsh Sharma
 
The viability of maxis venture in coffee industry in malaysia
The viability of maxis venture in coffee industry in malaysiaThe viability of maxis venture in coffee industry in malaysia
The viability of maxis venture in coffee industry in malaysia
Sara Yeap
 

Viewers also liked (18)

13 software metrics
13 software metrics13 software metrics
13 software metrics
 
Brzina svetlosti
Brzina svetlostiBrzina svetlosti
Brzina svetlosti
 
GPM_bio_proj
GPM_bio_projGPM_bio_proj
GPM_bio_proj
 
The marketing opportunities in the internet of things (iot)
The marketing opportunities in the internet of things (iot)The marketing opportunities in the internet of things (iot)
The marketing opportunities in the internet of things (iot)
 
I gov chernihiv-ihub
I gov chernihiv-ihubI gov chernihiv-ihub
I gov chernihiv-ihub
 
SiriusCon 2015 - closing session
SiriusCon 2015 - closing sessionSiriusCon 2015 - closing session
SiriusCon 2015 - closing session
 
Učionica bez zidova
Učionica bez zidovaUčionica bez zidova
Učionica bez zidova
 
DXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDO
DXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDODXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDO
DXN COLOMBIA EQUIPO ALFA OPORTUNIDAD DE NEGOCIO EN COLOMBIA Y EL MUNDO
 
Presentación1 sarah
Presentación1 sarahPresentación1 sarah
Presentación1 sarah
 
Live rugby sharks vs bulls....
Live rugby sharks vs bulls....Live rugby sharks vs bulls....
Live rugby sharks vs bulls....
 
Our strange experience
Our strange experienceOur strange experience
Our strange experience
 
использование принципов экодизайна (Low impact design)
использование принципов экодизайна (Low impact design)использование принципов экодизайна (Low impact design)
использование принципов экодизайна (Low impact design)
 
Virtually linked presentation debs
Virtually linked presentation debsVirtually linked presentation debs
Virtually linked presentation debs
 
Sunway group leadership coaching advantage
Sunway group leadership coaching advantageSunway group leadership coaching advantage
Sunway group leadership coaching advantage
 
Importance of software quality metrics
Importance of software quality metricsImportance of software quality metrics
Importance of software quality metrics
 
Software Metrics - Software Engineering
Software Metrics - Software EngineeringSoftware Metrics - Software Engineering
Software Metrics - Software Engineering
 
Software metrics
Software metricsSoftware metrics
Software metrics
 
The viability of maxis venture in coffee industry in malaysia
The viability of maxis venture in coffee industry in malaysiaThe viability of maxis venture in coffee industry in malaysia
The viability of maxis venture in coffee industry in malaysia
 

Similar to Real time-embedded-system-lec-02

task_sched2.ppt
task_sched2.ppttask_sched2.ppt
task_sched2.ppt
SruthiReddy112
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
Sarvesh Warjurkar
 
RTOS
RTOSRTOS
Rate.docx
Rate.docxRate.docx
Rate.docx
kradha5
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling Algorithms
IOSR Journals
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
Deepak John
 
Embedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxEmbedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptx
Swati Shekapure
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptx
naghamallella
 
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 8051
Rtos 8051Rtos 8051
Scheduling algorithm in real time system
Scheduling algorithm in real time systemScheduling algorithm in real time system
Scheduling algorithm in real time system
VishalPandat2
 
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
jeronimored
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
Wayne Jones Jnr
 
Real Time System
Real Time SystemReal Time System
Real Time System
AKANSH SINGHAL
 
Task assignment and scheduling
Task assignment and schedulingTask assignment and scheduling
Task assignment and scheduling
RajalakshmiSermadurai
 
multiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptmultiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.ppt
naghamallella
 
Real-Time Systems v3.pptx
Real-Time Systems v3.pptxReal-Time Systems v3.pptx
Real-Time Systems v3.pptx
ssuser2637a1
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
Sundaresan Sundar
 

Similar to Real time-embedded-system-lec-02 (20)

task_sched2.ppt
task_sched2.ppttask_sched2.ppt
task_sched2.ppt
 
Real time system tsp
Real time system tspReal time system tsp
Real time system tsp
 
ESC UNIT 3.ppt
ESC UNIT 3.pptESC UNIT 3.ppt
ESC UNIT 3.ppt
 
RTOS
RTOSRTOS
RTOS
 
Rate.docx
Rate.docxRate.docx
Rate.docx
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling Algorithms
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Embedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxEmbedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptx
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptx
 
Process management
Process managementProcess management
Process management
 
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 8051
Rtos 8051Rtos 8051
Rtos 8051
 
Scheduling algorithm in real time system
Scheduling algorithm in real time systemScheduling algorithm in real time system
Scheduling algorithm in real time system
 
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
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time Systems
 
Real Time System
Real Time SystemReal Time System
Real Time System
 
Task assignment and scheduling
Task assignment and schedulingTask assignment and scheduling
Task assignment and scheduling
 
multiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptmultiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.ppt
 
Real-Time Systems v3.pptx
Real-Time Systems v3.pptxReal-Time Systems v3.pptx
Real-Time Systems v3.pptx
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 

More from University of Computer Science and Technology

12 software maintenance
12 software maintenance12 software maintenance
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
University of Computer Science and Technology
 
10 software testing_technique
10 software testing_technique10 software testing_technique
10 software testing_technique
University of Computer Science and Technology
 
09 coding standards_n_guidelines
09 coding standards_n_guidelines09 coding standards_n_guidelines
09 coding standards_n_guidelines
University of Computer Science and Technology
 
08 component level_design
08 component level_design08 component level_design
07 interface design
07 interface design07 interface design
06 architectural design_workout
06 architectural design_workout06 architectural design_workout
06 architectural design_workout
University of Computer Science and Technology
 
05 architectural design
05 architectural design05 architectural design
04 design concepts_n_principles
04 design concepts_n_principles04 design concepts_n_principles
04 design concepts_n_principles
University of Computer Science and Technology
 
03 requirement engineering_process
03 requirement engineering_process03 requirement engineering_process
03 requirement engineering_process
University of Computer Science and Technology
 
02 software process_models
02 software process_models02 software process_models
01 software engineering_aspects
01 software engineering_aspects01 software engineering_aspects
01 software engineering_aspects
University of Computer Science and Technology
 
14 software technical_metrics
14 software technical_metrics14 software technical_metrics
14 software technical_metrics
University of Computer Science and Technology
 

More from University of Computer Science and Technology (13)

12 software maintenance
12 software maintenance12 software maintenance
12 software maintenance
 
11 software testing_strategy
11 software testing_strategy11 software testing_strategy
11 software testing_strategy
 
10 software testing_technique
10 software testing_technique10 software testing_technique
10 software testing_technique
 
09 coding standards_n_guidelines
09 coding standards_n_guidelines09 coding standards_n_guidelines
09 coding standards_n_guidelines
 
08 component level_design
08 component level_design08 component level_design
08 component level_design
 
07 interface design
07 interface design07 interface design
07 interface design
 
06 architectural design_workout
06 architectural design_workout06 architectural design_workout
06 architectural design_workout
 
05 architectural design
05 architectural design05 architectural design
05 architectural design
 
04 design concepts_n_principles
04 design concepts_n_principles04 design concepts_n_principles
04 design concepts_n_principles
 
03 requirement engineering_process
03 requirement engineering_process03 requirement engineering_process
03 requirement engineering_process
 
02 software process_models
02 software process_models02 software process_models
02 software process_models
 
01 software engineering_aspects
01 software engineering_aspects01 software engineering_aspects
01 software engineering_aspects
 
14 software technical_metrics
14 software technical_metrics14 software technical_metrics
14 software technical_metrics
 

Recently uploaded

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
Levi Shapiro
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
MysoreMuleSoftMeetup
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
Wasim Ak
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
Jisc
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
EduSkills OECD
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
Vivekanand Anglo Vedic Academy
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
TechSoup
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Atul Kumar Singh
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
Nguyen Thanh Tu Collection
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
SACHIN R KONDAGURI
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
siemaillard
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
Balvir Singh
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
ArianaBusciglio
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
gb193092
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
tarandeep35
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
kimdan468
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
Celine George
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
Peter Windle
 

Recently uploaded (20)

June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...
 
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
Mule 4.6 & Java 17 Upgrade | MuleSoft Mysore Meetup #46
 
Normal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of LabourNormal Labour/ Stages of Labour/ Mechanism of Labour
Normal Labour/ Stages of Labour/ Mechanism of Labour
 
How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...How libraries can support authors with open access requirements for UKRI fund...
How libraries can support authors with open access requirements for UKRI fund...
 
Francesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptxFrancesca Gottschalk - How can education support child empowerment.pptx
Francesca Gottschalk - How can education support child empowerment.pptx
 
The French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free downloadThe French Revolution Class 9 Study Material pdf free download
The French Revolution Class 9 Study Material pdf free download
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Introduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp NetworkIntroduction to AI for Nonprofits with Tapp Network
Introduction to AI for Nonprofits with Tapp Network
 
Guidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th SemesterGuidance_and_Counselling.pdf B.Ed. 4th Semester
Guidance_and_Counselling.pdf B.Ed. 4th Semester
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
BÀI TẬP BỔ TRỢ TIẾNG ANH GLOBAL SUCCESS LỚP 3 - CẢ NĂM (CÓ FILE NGHE VÀ ĐÁP Á...
 
"Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe..."Protectable subject matters, Protection in biotechnology, Protection of othe...
"Protectable subject matters, Protection in biotechnology, Protection of othe...
 
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
 
Operation Blue Star - Saka Neela Tara
Operation Blue Star   -  Saka Neela TaraOperation Blue Star   -  Saka Neela Tara
Operation Blue Star - Saka Neela Tara
 
Group Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana BuscigliopptxGroup Presentation 2 Economics.Ariana Buscigliopptx
Group Presentation 2 Economics.Ariana Buscigliopptx
 
Marketing internship report file for MBA
Marketing internship report file for MBAMarketing internship report file for MBA
Marketing internship report file for MBA
 
S1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptxS1-Introduction-Biopesticides in ICM.pptx
S1-Introduction-Biopesticides in ICM.pptx
 
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBCSTRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
STRAND 3 HYGIENIC PRACTICES.pptx GRADE 7 CBC
 
How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17How to Make a Field invisible in Odoo 17
How to Make a Field invisible in Odoo 17
 
A Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in EducationA Strategic Approach: GenAI in Education
A Strategic Approach: GenAI in Education
 

Real time-embedded-system-lec-02

  • 1. Real-time Embedded Systems- Lecture 02 Real-time Embedded Systems Lecture 2 RT Systems Essentials Part I RTOS-Scheduling Prof. Dr. Amitava Gupta Department of Power Engineering Jadavpur University , India
  • 2. What have we learnt….. What is a Real-time System? (we know this) Hard & Soft RT systems What are embedded systems? ((know this too!) Real-time Embedded systems? (know this as well!) What we learn now? OS features which make each unit or module run i.e. RTOS This is just basic RTOS stuff (Vorspeise) Real-time Embedded Systems- Lecture 02
  • 3. Real-time system:- System External World t t+ ∆t ∆ t is fixed Real-time Embedded Systems- Lecture 02
  • 4. Hard Real Time Soft Real Time Soft Real Time is a property of timeliness of a computation where the value of computation decreases according to its tardiness. EXAMPLE: Data Acquisition Systems A Hard Real Time system is one where the computation has no value whatsoever if the time constraint is not met. EXAMPLE: Control Systems for Industrial Processes Real-time Embedded Systems- Lecture 02
  • 5. BLOCKED RUNNING READY Resources Become Available Resources Become Unavailable Higher Priority Task Is READY Task Pre-empted Real-time Embedded Systems- Lecture 02
  • 6.
  • 7. Round Robin Real-time Embedded Systems- Lecture 02
  • 8. Function Pointer based scheduling While(1) { If (queue not empty) execute queue head ; } void isr1( ) { Place function pointer one in queue; } Void isr2( ) { Place function pointer two in queue; } Real-time Embedded Systems- Lecture 02
  • 9. Priority Based Real-time Embedded Systems- Lecture 02
  • 10. Priority driven scheduling algorithms A scheduling algorithm or a ‘scheduler’ is a set of rules which determines which task in a set of tasks is executed by a processor at any particular instant. We assume a scenario where a number of tasks are executed on a single processor. Static: Task priorities are assigned once and for all (aka fixed priority based preemptive scheduling) Dynamic: Task priorities change from time to time Hybrid: Combination of both Real-time Embedded Systems- Lecture 02
  • 11. Recap: Comparison of different scheduling techniques Real-time Embedded Systems- Lecture 02 Does not depend on code Dependent on code Dependent on code Code Dependence Context switch latency Maximum of runtimes Sum of runtimes Worst case wait time for highest priority task possible possible Not possible Prioritization Pre-emptive Function Pointer Round-robin
  • 12.
  • 13. A few definitions For a set of tasks τ 1 , τ 2 , τ 3 , … τ m , let C 1 , C 2 , C 3 ,…C m be the runtimes ( maximum time taken by a task to execute without being preempted) T 1 ,T 2 ,T 3 ,…T m be the periods at which the tasks receive triggers (requests) (Task periodicity) Response time : Time interval between the instant at which request for a task arrives and the instant at which the response for the request is completed. Critical Instant : The instant at which the response time for a task is maximum Task deadline : The instant at which the next request for the task arrives Critical Timezone : Interval between the critical instant and the instant at which response is completed Overflow : If a request remains unfulfilled for a deadline Real-time Embedded Systems- Lecture 02
  • 14. Theorem 1 A critical instant for a task occurs whenever the request for the task arrives along with other higher priority tasks. (proof: chalk and board) Real-time Embedded Systems- Lecture 02
  • 15.
  • 16. Real-time Embedded Systems- Lecture 02 Significance of RM scheduling Let C 1 , C 2 , ….,C n be the execution times of a set of n tasks T 1 , T 2 , ….,T n be the periodicity of a set of n tasks Then the task set is RM schedulable if C 1 /T 1 + C 2 /T 2 +…+C n /T n ≤ m(2 1/m – 1) Again, the RM scheduling algorithm is an optimal one. I Thus, if any static priority scheduling algorithm can produce a feasible schedule for a set of n tasks, so can RM scheduling. Converse is not true. Digging dipper? Real-time Systems: C.M. Krishna & K. G. Shin McGraw-Hill ISBN 0-07-114243-6
  • 17. Real-time Embedded Systems- Lecture 02 Multiprocessor Scheduling Algorithms Utilization balanced : The algorithm assigns tasks to processors one by one in such a way that at the end of each step, the processor utilization remains balanced. Next-fit: Works in conjunction with RM. Tasks are broken into classes and each processor handles a set of tasks belonging to a particular task. Bin-packing: Assigns tasks to processors such that the total processor threshold is never exceeded. The threshold is set in such a way that uniprocessor scheduling generates a feasible schedule. Bidding algorithm : Tasks arrive at processors. A processor which is unable to meet the demand, offloads it to others. A variant of this is the buddy strategy- an underloaded processor is a buddy to an overloaded one. Assignment with precedence constraints: Takes task precedence into account
  • 18. Real-time Embedded Systems- Lecture 12 Something which we have left out: RMS with blocking where b i is the blocking time associated with task T i
  • 19. Real-time Embedded Systems- Lecture 02 Goodbye till next week