0% found this document useful (0 votes)
30 views13 pages

Real Time Scheduling Algorithm

The document presents a project on real-time scheduling algorithms for safety-critical automotive systems, emphasizing the importance of immediate response to emergencies. It outlines the system's architecture, task flows, and algorithms like Earliest Deadline First (EDF) and Rate Monotonic Scheduling (RMS) used for prioritizing tasks. The project aims to demonstrate how intelligent scheduling can enhance safety by ensuring critical tasks are executed promptly during emergencies.

Uploaded by

Harsh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views13 pages

Real Time Scheduling Algorithm

The document presents a project on real-time scheduling algorithms for safety-critical automotive systems, emphasizing the importance of immediate response to emergencies. It outlines the system's architecture, task flows, and algorithms like Earliest Deadline First (EDF) and Rate Monotonic Scheduling (RMS) used for prioritizing tasks. The project aims to demonstrate how intelligent scheduling can enhance safety by ensuring critical tasks are executed promptly during emergencies.

Uploaded by

Harsh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

BMS COLLEGE OF ENGINEERING

REAL TIME SCHEDULING


ALGORITHM
23IS6OEDSA

HARSH KUMAR 1BM22EC296


STEEPHEN RAJ K 1BM22EC299
ISHAAN REVANKAR 1BM22ME040

UNDER THE GUIDANCE OF


Dr. SUBHA RAO V
Associate Professor
CONTENT
01 Introduction

02 System Overview

03 Task flows

04 Algorithms

05 Data Structures

06 Future work and Conclusion


INTRODUCTION

In automotive systems, safety-critical components


Safety-critical automotive systems are responsible for ensuring the protection of
must respond instantly to
emergencies to protect lives. These
passengers, pedestrians, and the vehicle itself.
systems include airbags, emergency These include systems like:
braking, and collision detection. Airbag deployment
Real-time task scheduling ensures
that critical tasks override non-
Anti-lock braking systems (ABS)
urgent functions like music or AC. Adaptive cruise control
This project simulates dynamic Collision detection and avoidance
rescheduling in C++ when
Any delay or failure in such systems can result
emergencies occur. The goal is to
demonstrate how intelligent in catastrophic consequences, which makes
scheduling can save lives during timing and correctness non-negotiable.
critical moments.
WHY SCHEDULING MATTERS

Deadline Bound Immediate Response Resolve conflicts


Execution

Simulates the execution of When emergencies like lane If a higher-priority emergency


routine automotive tasks like changes occur, the system like collision detection occurs
music, AC, and wiper systems. dynamically reschedules to during an ongoing emergency,
These tasks are scheduled prioritize critical safety it preempts the current task.
based on deadlines and functions. Non-urgent tasks are The scheduler ensures the
execution times in a calm paused or delayed to make most life-saving task is always
driving environment. room for emergency handling. executed first.
SYSTEM
OVERVIEW

The system consists of a


central real-time scheduler
managing various automotive
tasks. It interfaces with
sensors (for emergencies) and
user modules (for comfort
functions) and dynamically
prioritizes task execution
based on urgency.
FLOW CHART

A flowchart visually
represents the step-by-step
process of the scheduling
algorithm, making it easier to
understand the decision
points and task flows. It helps
in identifying potential
bottlenecks and ensures
clarity in the dynamic task
rescheduling during
emergencies.
NORMAL VS EMERGENCY TASK FLOWS Thynk Unlimited

Normal Flow Dynamic Switching

Periodic tasks like music, AC, and wipers are scheduled System shifts from normal to emergency mode in
regularly. real-time.
Scheduler follows a predictable time-driven execution Once emergencies are resolved, control returns to
order. normal task flow
Ensures passenger comfort and routine vehicle
functions.

Emergency Flow
Safety first Principle
Triggered by critical inputs (e.g., collision sensor, lane
Highest-priority tasks always override lower-priority
departure).
ones to ensure driver safety.
Current tasks are preempted to handle urgent
operations.
Emergency tasks like lane control or airbag deployment
take immediate precedence.
ALGORITHMS 1. Earliest Deadline First (EDF)

Dynamic Priority Scheduling: Tasks are sorted by


the closest deadline.
How it works:
At each time slot, the scheduler picks the task
with the earliest deadline.
Deadlines can change dynamically (especially
for emergencies).
Advantages:
Highly efficient for aperiodic and mixed
criticality tasks.
Optimal for uniprocessor systems when task
deadlines vary.
Use Case: Emergency collision response scheduled
before AC or music tasks.
ALGORITHMS 2. Rate Monotonic Scheduling (RMS)

Static Priority Scheduling: Tasks with shorter periods are


given higher priority.
How it works:
Priority is assigned at design time based on task
frequency.
Periodic tasks (like wiper and AC) are scheduled
predictably.
Advantages:
Simple to implement, with proven schedulability
test.
Ideal for periodic and predictable environments.
Limitation:
Not suitable when emergencies or aperiodic tasks
dominate.
Use Case: Wiper runs every 5 seconds gets higher
priority than music playback every 15 seconds.
Static Array (Task emergencies[])
DATA Used to store a fixed list of emergency tasks with known size.
Provides fast index-based access during emergency insertions.
STRUCTURES
Dynamic Array (std::vector<Task>)
Used for base and updated task schedules due to its dynamic size.
Allows efficient insertion, iteration, and sorting of tasks.

Data structures are essential Comparator Function (compareTasks)


for organizing, managing, and Custom function to sort tasks based on priority and start time.
accessing data efficiently in a Helps in ordering tasks for correct execution in the schedule.
program. In real-time
Conceptual Priority Queue (via std::sort)
scheduling systems, they
Not a true priority_queue but mimics it using sorted vectors.
enable quick task selection,
Ensures higher-priority tasks preempt lower-priority ones.
dynamic updates, and
priority-based execution Gantt-like Timeline (via Task Fields)
handling. The task's start_time and end_time fields model execution intervals.
Used to print a time-based schedule like a Gantt chart.

Min-Heap ( ideal for EDF)


Could be used for efficient task selection based on earliest deadline.
Implementable via std::priority_queue for real-time systems.
OPEN
Accurate Emergency Detection and Prediction
CHALLENGES
Dynamic Resource Allocation During Emergencies

Minimizing Latency Under High System Load


Open challenges in real-time
emergency task scheduling
include accurately detecting Scalability Across Multicore Systems
emergencies and dynamically
reallocating system resources
Handling Priority Inversion Efficiently
to prioritize critical tasks
without causing delays.
Additionally, ensuring Avoiding Task Starvation During Frequent Emergencies
scalability, handling priority
inversions, and maintaining Formal Verification and Certification (e.g., ISO 26262)
system reliability under high
load remain complex issues
requiring advanced solutions. Integration of AI-Based Emergency Detection Modules
THANK YOU
FOR YOUR ATTENTION

You might also like