You are on page 1of 25

Seminar on-

Real time scheduling policy for


Embedded system domain
RCERT,Chandrapur
Dept of computer technology

Head of Dept. - Prof. N. J. Janwe

Seminar Incharge Seminar Guide


Prof.Vrushali Bongirwar Prof.Arshiya Juhi
Prof.Kapesh Raghaghate

Presented By-
Mr. Milind S. Salve
Contents
• Introduction
• Embedded System
• An RTOS
• Scheduler
• Types of scheduling
• NMLFQ
• NMLQ
• Advantages
• Conclusion
• Bibliography
Advantages
Conclusion
Bibliography
Introduction
• The Scheduling algorithm is one of the most
important portions of embedded operating systems.

• Influence the performance of the whole system.

• Needs better response time for real-time process.

• Makes embedded operating system more efficient.


• Most of the mainstream scheduling algorithms are able
to ensure response time for most processes.

• But for specific real-time applications for embedded


system , a specialized real-time scheduling algorithm is
required to ensure real-time response.

• This algorithm divides all tasks into different Sets and


schedules the tasks according to the features of the Set.
Embedded System-
What is an embedded system ?
• A computer hardware with software embedded in it
as one of the its most important component.

• It is an dedicated computer-based system for an


application or product.

• Three component of system-


1. It has hardware
2. Main application software
3. An real time operating system
An RTOS-
•It supervises the application software and provides a
mechanism to let the processor run a process as per the
scheduling.

• It do the context switch between the various task.

• RTOS defines the way the system works.

• It oraganizes the access to a resource in sequence of


series of task of the system.

• It sets the rules during the execution of application


software.
Types Of RTOS -
1. Hard Real time system :
-Treat task with explicit timing constraints, such as periods and deadlines.

2. Soft Real time system :


-Strict adherence to the timing constraints of task is not always quaranteed.
Features –
•Multitasking

• Priority based scheduling.

• Ability to quickly respond to external interrupts.

•Support real time clock as internal time interface.


Characteristics -
• Most of the times, a real time system will be an
embedded system.
eg . cellular phone , laser printer ,washing machine etc.

• Rtos will be embedded along with the application code


in the system.

• The Rtos code must be written very efficiently to


respond process needs.
Scheduler-
Scheduler is a part of RTOS. It keeps the track of each task.
 Three different task states are as-
• Ready
• Running
• Blocked

Figure 1: States of process

Figure 1: States of process


Criteria for good scheduling strategy-
• Utilization/Efficiency

• Throughput

• Turnaround time

• Waiting time

• Response time

• Fairness
Analysis for real time scheduling-

A number of optimal scheduling algorithm exist for cpu loads


of up to 100%.

 The two optimal algorithms are as-

• Earliest deadline first(EDF)

• Least laxity first(LLF)


CPU Load(Processor utilization
factor) is-

U =Σ Ci/Ti
For each of n concurrent tasks in the system,
• Ci-tasks computation time(cost)
• Ti-tasks period

The processor utilization is used as a


schedulability test -for U<=1.0 , the task under
consideration can be scheduled using any of the optimal
algorithms.
Types of scheduling-

Task Scheduling

Task 1 # Task 2 #
EDF scheduling-
Following assumptions are made -
• Only periodic task exist.
• Each task i has period of Ti.
• Each task has worst case execution Ci.
• Each task has deadline di.
• Task period =the deadline for each task(Di=Ti)
• No interprocess communication.

considering assumptions ,following condition


holds-
if utilization of system is not more than 100% then all
deadlines will be met.
U=∑Ci/Ti<=1
RM Scheduling-
Rate monotonic scheduling is a scheme for assigning priorities
to tasks that that timing requirements are met when
preemptive fixed priority scheduling is used.

With a system with n tasks ,all tasks


will meet their deadlines if the total utilization of the system is
below a certain bound.

Σ Ci/Ti<=n(2^1\n -1)
As n-> the utilization bound ->0.693.if the total utilization is
Less than 69% then all deadlines are met.
New multilevel feedback queue -
It works by dividing the cpu time into epochs.
considering the priority of each process , the NMLFQ
Scheduler select a process. The priorities as-
1. Static
2. Dynamic

Figure 4: Priority Levels of Newc Multilevel-


feedback-queue scheduler
New multilevel queue scheduler-
The scheduler keeps a list of process queues. Every queue gets
a priority assigned. Processes start in a given priority queue.

Highest priority
System processes

Interactive processes

Batch processes

User processes
Lowest priority

Figure :- Distinguishing processes in queues


Advantages-
• The scheduling algorithm guarantee that all processes will
receive a minimum amount of each important resource in order
to prevent starvation of processes.

• The optimal scheduling algorithms exist for CPU loads of up


to 100%.

• This algorithm arrive at a common solution to simulate a


new scheduling policy.

• The NMLFQ does permit the current task to lock scheduler


if necessary.
Conclusion-
• The scheduling policies of the different schedulers are
studied and their performance has been compared.

• We have seen an algorithm that guarantees low deadline miss


ratios in systems.

• This algorithm uses a new approach for defining the


optimized quantum of each queue and number of queues.

• The NMLFQ algorithm gives 10% better performance


compared to MLQ real time scheduling.
Bibliography
• An Embedded software primer
- David E . Simon
• Task scheduling
-C .J . Ganier
• A research paper on real time scheduling policy
-k .c . Shet and other.
• Real-Time Systems
-Jane W.S.Liu
References
 www.clei.cl/cleiej/papers/v12i2p4.pdf

www.ece.cmu.edu/~koopman/des_s99/
real_time/

www.artist-embedded.org/.../Real-Time-
Techniques-in-Control.html

You might also like