SlideShare uma empresa Scribd logo
1 de 19
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

Mais conteúdo relacionado

Mais procurados

Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
Rayees CK
 

Mais procurados (20)

RTOS Basic Concepts
RTOS Basic ConceptsRTOS Basic Concepts
RTOS Basic Concepts
 
Device drivers and interrupt service mechanism
Device drivers and interrupt service mechanismDevice drivers and interrupt service mechanism
Device drivers and interrupt service mechanism
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
Design challenges in embedded systems
Design challenges in embedded systemsDesign challenges in embedded systems
Design challenges in embedded systems
 
Embedded firmware
Embedded firmwareEmbedded firmware
Embedded firmware
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
Rtos concepts
Rtos conceptsRtos concepts
Rtos concepts
 
Rtos by shibu
Rtos by shibuRtos by shibu
Rtos by shibu
 
Embedded systems ppt
Embedded systems pptEmbedded systems ppt
Embedded systems ppt
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
Introduction to Embedded System
Introduction to Embedded SystemIntroduction to Embedded System
Introduction to Embedded System
 
Arm modes
Arm modesArm modes
Arm modes
 
Embedded System Presentation
Embedded System PresentationEmbedded System Presentation
Embedded System Presentation
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
Introduction to Real-Time Operating Systems
Introduction to Real-Time Operating SystemsIntroduction to Real-Time Operating Systems
Introduction to Real-Time Operating Systems
 
Unit 1 intro-embedded
Unit 1 intro-embeddedUnit 1 intro-embedded
Unit 1 intro-embedded
 
Introduction to Embedded Systems
Introduction to Embedded SystemsIntroduction to Embedded Systems
Introduction to Embedded Systems
 
Embedded Systems (18EC62) – Embedded System Components (Module 3)
Embedded Systems (18EC62) – Embedded System Components (Module 3)Embedded Systems (18EC62) – Embedded System Components (Module 3)
Embedded Systems (18EC62) – Embedded System Components (Module 3)
 
Chapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain SpecificChapter 4 Embedded System: Application and Domain Specific
Chapter 4 Embedded System: Application and Domain Specific
 
ARM Exception and interrupts
ARM Exception and interrupts ARM Exception and interrupts
ARM Exception and interrupts
 

Destaque

ppt on embedded system
ppt on embedded systemppt on embedded system
ppt on embedded system
manish katara
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
jattatt
 
S emb t10-development
S emb t10-developmentS emb t10-development
S emb t10-development
João Moreira
 
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Andrea Tino
 

Destaque (20)

Real time-embedded-system-lec-05
Real time-embedded-system-lec-05Real time-embedded-system-lec-05
Real time-embedded-system-lec-05
 
Real time-embedded-system-lec-06
Real time-embedded-system-lec-06Real time-embedded-system-lec-06
Real time-embedded-system-lec-06
 
Real time-embedded-system-lec-03
Real time-embedded-system-lec-03Real time-embedded-system-lec-03
Real time-embedded-system-lec-03
 
Embedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijayEmbedded System Real Time Operating System (ERTS) I unit by vijay
Embedded System Real Time Operating System (ERTS) I unit by vijay
 
Real Time Systems
Real Time SystemsReal Time Systems
Real Time Systems
 
ppt on embedded system
ppt on embedded systemppt on embedded system
ppt on embedded system
 
Real time-embedded-system-lec-07
Real time-embedded-system-lec-07Real time-embedded-system-lec-07
Real time-embedded-system-lec-07
 
Real time-embedded-system-lec-04
Real time-embedded-system-lec-04Real time-embedded-system-lec-04
Real time-embedded-system-lec-04
 
S emb t2-definition
S emb t2-definitionS emb t2-definition
S emb t2-definition
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systems
 
S emb t10-development
S emb t10-developmentS emb t10-development
S emb t10-development
 
Embedded
EmbeddedEmbedded
Embedded
 
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
Improved implementation of a Deadline Monotonic algorithm for aperiodic traff...
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic concepts
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOS
 
FreeRTOS
FreeRTOSFreeRTOS
FreeRTOS
 
Real-Time Scheduling Algorithms
Real-Time Scheduling AlgorithmsReal-Time Scheduling Algorithms
Real-Time Scheduling Algorithms
 
Real Time Operating System Concepts
Real Time Operating System ConceptsReal Time Operating System Concepts
Real Time Operating System Concepts
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 

Semelhante a Real time-embedded-system-lec-02

Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptx
naghamallella
 
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
 

Semelhante a Real time-embedded-system-lec-02 (20)

task_sched2.ppt
task_sched2.ppttask_sched2.ppt
task_sched2.ppt
 
Real Time most famous algorithms
Real Time most famous algorithmsReal Time most famous algorithms
Real Time most famous algorithms
 
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
 
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
 
Chap 4.ppt
Chap 4.pptChap 4.ppt
Chap 4.ppt
 

Mais de University of Computer Science and Technology

Mais de University of Computer Science and Technology (15)

Real time-embedded-system-lec-02
Real time-embedded-system-lec-02Real time-embedded-system-lec-02
Real time-embedded-system-lec-02
 
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
 
13 software metrics
13 software metrics13 software metrics
13 software metrics
 

Último

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
QucHHunhnh
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
ssuserdda66b
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 

Último (20)

1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdfVishram Singh - Textbook of Anatomy  Upper Limb and Thorax.. Volume 1 (1).pdf
Vishram Singh - Textbook of Anatomy Upper Limb and Thorax.. Volume 1 (1).pdf
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Hongkong ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Understanding Accommodations and Modifications
Understanding  Accommodations and ModificationsUnderstanding  Accommodations and Modifications
Understanding Accommodations and Modifications
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Unit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptxUnit-IV; Professional Sales Representative (PSR).pptx
Unit-IV; Professional Sales Representative (PSR).pptx
 
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptxHMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
HMCS Max Bernays Pre-Deployment Brief (May 2024).pptx
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 

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