0% found this document useful (0 votes)
36 views3 pages

ECEN432 OS Project Paper IEEE

This document presents a comparative study of three scheduling algorithms used in real-time operating systems (RTOS): Earliest Deadline First (EDF), Rate Monotonic Scheduling (RMS), and Fixed Priority (FP) scheduling. The authors will implement the three algorithms in C code and burn them on an ATMEGA-32 microcontroller. They will then use test cases to compare the performance of the algorithms and determine which most efficiently meets timing constraints and deadlines for tasks. The document provides background information on RTOS scheduling and classifies the three algorithms as static versus dynamic priority scheduling.

Uploaded by

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

ECEN432 OS Project Paper IEEE

This document presents a comparative study of three scheduling algorithms used in real-time operating systems (RTOS): Earliest Deadline First (EDF), Rate Monotonic Scheduling (RMS), and Fixed Priority (FP) scheduling. The authors will implement the three algorithms in C code and burn them on an ATMEGA-32 microcontroller. They will then use test cases to compare the performance of the algorithms and determine which most efficiently meets timing constraints and deadlines for tasks. The document provides background information on RTOS scheduling and classifies the three algorithms as static versus dynamic priority scheduling.

Uploaded by

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

RTOS Scheduling: Comparative Study

An “Operating Systems” (ECEN 427)” Project Report by

Nayera Hisham Elsaady 18100036


Nourhan Salim 18101619
Ahmed Ayman Abo Elmagd 18100767
Ahmed Amr Elwardany 18100644

Submitted in partial fulfilment for the requirements of the ECEN 427 project to

Dr. Eman Gewish

Fall 2021
2

RTOS Scheduling: Comparative Study


Ahmed Abo Elmagd, Ahmed Elwardany, Nayera Elsaady & Nourhan Salim
School of Engineering and Applied Sciences, Nile University, Cairo, Egypt

Abstract— With the advancements in the industry of and other technicalities. External could be as defined in [6]
operating systems and embedded systems, the complexity of where the tasks are given a user-defined priority depending
the functionality and the criticality of logical results while on his preference. Scheduling algorithms are classified
meeting hard deadlines makes real-time operating systems based on various parameters, location-based algorithms
(RTOS) the best well-structured systems to meet all these could be centralized, decentralized, global, distributed,
market criteria. RTOS targets high performance while dealing
with time constraints in the most efficient way. Scheduling
partitioned, ..etc. [7,8]. The also could be classified based
focuses on the how all tasks are queued and in what order are on how the resources are allocated for each process, and
they executed, and thus the performance is based on providing how processes are dealt with, switched and queued with the
the right sequence and time for each task. This paper will serve execution time. The two main types in this category are
as a comparative study between the most used scheduling preemptive and non-preemptive [8].
algorithms in RTOS: Earliest Deadline First (EDF), Rate For RTOS however, due to the critically of meeting the
Monotonic Scheduling (RMS) and Fixed Priority (FP) specified hard deadlines, priority policies are classified into
scheduling. The written C code for each algorithm with be static and dynamic priority scheduling. In static priority,
burned on an ATMEGA-32 and then test cases will be used for
each task is given a specific priority that is fixed throughout
performance comparison.
the processing. Dynamic priority changes each task’s
Keywords— RTOS, Scheduler, Scheduling algorithm, EDF, priority based [9-11]. The most famous RTOS static
RMS, FP. scheduling techniques are the rate-monotonic scheduling
(RMS) and the fixed-priority (FP) preemptive scheduling.
I. INTRODUCTION
The most used dynamic technique is the Earliest Deadline
The advancement in technology leads to an increased First (EDF) scheduling. For RTOS scheduling, static
dependency on embedded systems, and it becomes more algorithms are more used as the system’s main priority is
essential every day to focus studies and research efforts on time delivery optimization.
that field. Real-Time Operating Systems (RTOS) are used in The paper’s target is to implement the chosen three
real-time applications for embedded systems and targets scheduling algorithms in C, and provide a comparative
versatile task functionality. Any Operating System (OS) study based on their performance. The written codes will
provides a platform between the hardware and the software then be burned on an ATMEGA-32, and real-life test cases
and consists of multiple functions to tie between them, but will be used to compare their performance.
unlike the common operating systems, RTOS focuses on
real-time results achieved within hard deadlines, like it’s II. SCHEDULING ALGORITHMS
usage in the automobile industry [1-3]. Thus, the main EDF is the most used dynamic scheduling technique.
system function in RTOS is scheduling. For each required Such claim is further fortified due to some specific
task, based on its given priority and deadline, the system’s properties which the EDF scheduling algorithm has, which
scheduler uses different algorithms to provide the best include:
efficiency, while prioritizing the delivery time constraints  EDF scheduling algorithm is an optimal dynamic
and the achieving logical and critical results [4]. priority scheduling algorithm.
Scheduling in RTOS targets high performance with  It assigns tasks with a shorter deadline and a higher
minimum delays and interrupt latencies, and while the priority.
processor/microcontroller of the embedded system is  It executes the job that has the earliest deadline.[4]
concerned with the execution time, the OS scheduling is
 The non-preemptive type of the EDF (NP-EDF)
concerned with [5]:
scheduling algorithm does not allow the preemptions,
 Throughput: the number of processes done within a meaning that a job with the earliest deadline is executed
time unit. first which results, leading to missing deadlines. If the
 Turnaround time: the time the process takes from its preemptions are not allowed, the arriving high priority
submission/start point till its completion point. task cannot preempt the currently running low priority
 Waiting time: the time each tasks spends waiting for its task which should not be the case in real time operating
turn in execution in the ready queue. systems [11].
 Response time:  The fully preemptive type of the EDF (FP-EDF)
Scheduling algorithms assigned priorities to the processes scheduling algorithm fully allows preemptions. Which
based on internal or external criteria. Internal priority means that high priority tasks are given permission to
policies are based on memory usage, I/O usage, deadline,
3

preempt the currently executing low priority task. With process, then the currently running process is
that being said FP-EDF performs better than NP-EDF preempted.
when it comes to meeting deadlines [10].
III. METHOLDOLOGY
Moving to the second algorithm, RMS revolves around a
The implementation of the chosen RTOS scheduling
simple rule which is to assign priorities to different tasks
algorithms is done based on the following steps:
according to their period. Priority of a task is inversely
proportional to its period. The task with shortest period will 1. Code functionality:
get assigned the highest priority and a task with longest 2. Microcontroller implementation:
period will have lowest priority in the execution queue. 3. Test benching:
Since the period of a task does not change, its priority will
not change over time either, meaning that RMS can be
considered a fixed priority algorithm. The priorities are IV. RESULTS AND ANALYSIS
decided before the start of execution and they stay fixed
throughout the entire execution process.
RMS revolves around the principle of preemption. V. CONCLUSION
Preemption will only happen on a certain processor when
higher priority task blocks a lower priority task from being
executed. This blocking occurs due to priority level REFERENCES
difference of different tasks in a certain set of tasks. For [1] Real Time Operating System (RTOS) With its effective
elaboration, if a task with a shorter period comes during scheduling techniques.
execution it will gain a higher priority and can block or
preemptive currently running tasks. A given task is [2] A Comparative Study of Real Time Operating Systems for
scheduled by RMS if it satisfies the following equation: Embedded Systems
[3] THE SURVEY of REAL TIME OPERATING SYSTEM:
n 1
C RTOS
∑ T K =≤ U RM =n(2 n −1) [1] [4] Improved Priority based Scheduling Algorithm for Real Time
K=1 K Embedded Systems
[5] Operating System Concepts Book
where n is the number of tasks within a task set. [6] RTOS scheduling with user-defined priorities
The last scheduling algorithm to discuss is the Fixed [7] Decentralized task scheduling for a fixed priority multicore
Priority Preemptive Scheduling algorithm (FP). Priority embedded RTOS
[8] The Classification and Comparative Study of Real-Time Task
Scheduling is a method of scheduling processes that is
Scheduling Algorithms Based on Various Parameters
reliant on priority. In this algorithm, the scheduler selects [9] Implementation and evaluation of global and partitioned
the tasks to work as per their assigned priority. The scheduling in a real-time OS
processes with higher priority will be executed first, [10] Analysis of Dynamic and Static Scheduling Algorithms in
whereas jobs with equal priorities will be executed using a Soft Real-Time System with Its Implementation
round-robin or FCFS type of queue execution. Priority is [11] Static-priority scheduling on multiprocessors
assigned based on memory requirements, time requirements, [12]
etc.
The major characteristics of FP scheduling are:
 A CPU algorithm that schedules processes based on
priority.
 It used in Operating systems for performing batch
processes.
 If two jobs having the same priority are ready to be
executed, it works on a FCFS basis.
 In priority scheduling, a number is assigned to each
process that indicates its priority level.
 The lower the number that the task has, the higher its
the priority becomes.
 Since this algorithm is the preemptive type of priority
scheduling, then if a newer process arrives, that is
having a higher priority than the currently running

You might also like