SlideShare una empresa de 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

Más contenido relacionado

La actualidad más candente (20)

Embedded systems notes
Embedded systems notesEmbedded systems notes
Embedded systems notes
 
Software requirements
Software requirementsSoftware requirements
Software requirements
 
Real-Time Scheduling
Real-Time SchedulingReal-Time Scheduling
Real-Time Scheduling
 
Real-Time Operating Systems
Real-Time Operating SystemsReal-Time Operating Systems
Real-Time Operating Systems
 
Basic functions & types of RTOS ES
Basic functions & types of  RTOS ESBasic functions & types of  RTOS ES
Basic functions & types of RTOS ES
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
UNIT-5 IoT Reference Architecture.pdf
UNIT-5 IoT Reference Architecture.pdfUNIT-5 IoT Reference Architecture.pdf
UNIT-5 IoT Reference Architecture.pdf
 
Real Time OS For Embedded Systems
Real Time OS For Embedded SystemsReal Time OS For Embedded Systems
Real Time OS For Embedded Systems
 
Embedded System
Embedded System Embedded System
Embedded System
 
Introduction to arduino
Introduction to arduinoIntroduction to arduino
Introduction to arduino
 
Program security
Program securityProgram security
Program security
 
Devices and gateways
Devices and gatewaysDevices and gateways
Devices and gateways
 
Embedded Systems and IoT
Embedded Systems and IoTEmbedded Systems and IoT
Embedded Systems and IoT
 
MicroC/OS-II
MicroC/OS-IIMicroC/OS-II
MicroC/OS-II
 
Embedded system introduction
Embedded system introductionEmbedded system introduction
Embedded system introduction
 
The future of IOT
The future of IOTThe future of IOT
The future of IOT
 
Context switching
Context switchingContext switching
Context switching
 
Introduction to embedded systems
Introduction  to embedded systemsIntroduction  to embedded systems
Introduction to embedded systems
 
Spm unit 4
Spm unit 4Spm unit 4
Spm unit 4
 
Introduction to Parallel Computing
Introduction to Parallel ComputingIntroduction to Parallel Computing
Introduction to Parallel Computing
 

Destacado

Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
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 vijayVijay Kumar
 
ppt on embedded system
ppt on embedded systemppt on embedded system
ppt on embedded systemmanish katara
 
Embedded systems
Embedded systemsEmbedded systems
Embedded systemsjattatt
 
S emb t10-development
S emb t10-developmentS emb t10-development
S emb t10-developmentJoã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
 
Real time scheduling - basic concepts
Real time scheduling - basic conceptsReal time scheduling - basic concepts
Real time scheduling - basic conceptsStudent
 
Real Time Systems & RTOS
Real Time Systems & RTOSReal Time Systems & RTOS
Real Time Systems & RTOSVishwa Mohan
 
Real-Time Scheduling Algorithms
Real-Time Scheduling AlgorithmsReal-Time Scheduling Algorithms
Real-Time Scheduling AlgorithmsAJAL A J
 

Destacado (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
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
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
 
Embedded system
Embedded systemEmbedded system
Embedded system
 
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
 
Embedded System Basics
Embedded System BasicsEmbedded System Basics
Embedded System Basics
 
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 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
 

Similar a RTOS Scheduling Essentials for Real-Time Embedded Systems

Real Time most famous algorithms
Real Time most famous algorithmsReal Time most famous algorithms
Real Time most famous algorithmsAndrea Tino
 
Rate.docx
Rate.docxRate.docx
Rate.docxkradha5
 
Survey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsSurvey of Real Time Scheduling Algorithms
Survey of Real Time Scheduling AlgorithmsIOSR Journals
 
Embedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxEmbedded system scheduling Algorithm .pptx
Embedded system scheduling Algorithm .pptxSwati Shekapure
 
Multiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxMultiprocessor Real-Time Scheduling.pptx
Multiprocessor Real-Time Scheduling.pptxnaghamallella
 
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
 
Scheduling algorithm in real time system
Scheduling algorithm in real time systemScheduling algorithm in real time system
Scheduling algorithm in real time systemVishalPandat2
 
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
 
Chapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsChapter 19 - Real Time Systems
Chapter 19 - Real Time SystemsWayne Jones Jnr
 
multiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptmultiprocessor real_ time scheduling.ppt
multiprocessor real_ time scheduling.pptnaghamallella
 
Real-Time Systems v3.pptx
Real-Time Systems v3.pptxReal-Time Systems v3.pptx
Real-Time Systems v3.pptxssuser2637a1
 

Similar a RTOS Scheduling Essentials for Real-Time Embedded Systems (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
 
Rtos Concepts
Rtos ConceptsRtos Concepts
Rtos Concepts
 

Más de University of Computer Science and Technology

Más 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

Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
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.pdfQucHHunhnh
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhikauryashika82
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...PsychoTech Services
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Último (20)

Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
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
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in DelhiRussian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
Russian Escort Service in Delhi 11k Hotel Foreigner Russian Call Girls in Delhi
 
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
IGNOU MSCCFT and PGDCFT Exam Question Pattern: MCFT003 Counselling and Family...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

RTOS Scheduling Essentials for Real-Time Embedded Systems

  • 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