Open In App

Deadline Monotonic CPU Scheduling

Last Updated : 04 May, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Prerequisites –

Deadline Monotonic Scheduling :
It is a fixed priority based algorithm in which priorities are assigned to each task based on their relative deadline. Task with shortest deadline is assigned highest priority. It is a Preemptive Scheduling Algorithm that means if any task of higher priority comes then, running task is preempted and higher priority task is assigned to CPU.

Priority of task is inversely proportional to deadline i.e., task with shortest deadline is assigned highest priority. Deadline is time limit in which task has to be completed.

Task can be represented as shown in figure :

Example –
Suppose there are two tasks that need to be executed.
Task1 has release time 0, period 7 units, execution time 2 units, and deadline of 6 units ( T1 ( 0, 7, 2, 6 ) ). Task2 has release time 0, period 5 units, execution time 2 units, and deadline of 4 units ( T2 ( 0, 5, 2, 4 ) ).

Step by step explanation –

  • At T=0 both T1 and T2 are available, but deadline (T2) < deadline (T1). So T2 gets CPU and gets executed till T=2. Now T2 will be available at T=5.
  • At T=2 only T1 is available so T1 gets executed till T=4. Now T1 will be available at T=7.
  • At T=4 to T=5 CPU remains idle as not task is available for execution.
  • At T=5 only T2 is available so T2 gets executed till T=7. Now T2 will be available at T=10.
  • At T=7 only T1 is available so T1 gets executed till T=9. Now T1 will be available at T=14.
  • At T=9 to T=10 CPU remains idle as not task is available for execution.
  • At T=10 only T2 is available so T2 gets executed till T=12. Now T2 will be available at T=15.
  • At T=12 to T=14 CPU remains idle as not task is available for execution.
  • At T=14 only T1 is available so T1 gets executed till T=15. Still 1 unit of work for T1 is remaining.
  • At T=15 both T1 and T2 are available, but deadline (T2) < deadline (T1). So T2 gets CPU and gets executed till T=17. Now T2 will be available at T=20.

Complete execution process is shown in figure below –

Advantages :

  • Optimal for Static Priority Scheduling.
  • Performs well in case of availability of tasks having longer period but shorter deadline.
  • Good performance in case of overload.

Disadvantages :

  • Implementation is complex.
  • It is a time taking process.

Similar Reads

Difference between rate monotonic and deadline monotonic scheduling
1. Rate Monotonic Scheduling : Rate monotonic scheduling is a priority algorithm in which the priorities are assigned to the processes according to the cycle time, a process with the least task duration is given the priority. It is preemptive: the highest priority process will preempt the other processes. The priority of a process is inversely prop
2 min read
Earliest Deadline First (EDF) CPU scheduling algorithm
Earliest Deadline First (EDF) is an optimal dynamic priority scheduling algorithm used in real-time systems.  It can be used for both static and dynamic real-time scheduling.  EDF uses priorities to the jobs for scheduling. It assigns priorities to the task according to the absolute deadline. The task whose deadline is closest gets the highest prio
3 min read
Scheduling without deadline
What is scheduling ?Scheduling is another popular problem in computer science domain. A scheduling problem is a problem of scheduling resources effectively for a given request. In operating systems, often a single processor of a computer system may encounter many jobs or user programs. One can visualize the scheduling problem as an optimal ordering
5 min read
Scheduling with Deadline
Prerequisite : CPU Scheduling What is Scheduling with Deadline ?The goal of a Scheduling problem is to schedule the tasks such that the maximum total profit is obtained. This algorithm for scheduling with a deadline is different from scheduling without a deadline because task completion here is associated with profit. In order to make a profit, the
4 min read
Difference between Priority Scheduling and Round Robin (RR) CPU scheduling
1. Priority Scheduling Algorithm : Priority scheduling algorithm executes the processes depending upon their priority. Each process is allocated a priority and the process with the highest priority is executed first. Priorities can be defined internally as well as externally. Internal priorities are decided by the system depending upon the number o
3 min read
Difference between Priority scheduling and Shortest Job First (SJF) CPU scheduling
1. Priority Scheduling Algorithm : Priority scheduling algorithm executes the processes depending upon their priority. Each process is allocated a priority and the process with the highest priority is executed first. Priorities can be defined internally as well as externally. Internal priorities are decided by the system depending upon the number o
3 min read
Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling
Multilevel Feedback Queue Scheduling (MLFQ) CPU Scheduling is like Multilevel Queue(MLQ) Scheduling but in this process can move between the queues. And thus, much more efficient than multilevel queue scheduling. Characteristics of Multilevel Feedback Queue Scheduling: In a multilevel queue-scheduling algorithm, processes are permanently assigned t
5 min read
Rate-monotonic scheduling
Rate monotonic scheduling is a priority algorithm that belongs to the static priority scheduling category of Real Time Operating Systems. It is preemptive in nature. The priority is decided according to the cycle time of the processes that are involved. If the process has a small job duration, then it has the highest priority. Thus if a process wit
4 min read
Difference Between User-CPU-Time and System-CPU-Time in UNIX
Unix systems have a time utility that allows a user to see where their application took significant time to process. The syntax of this utility is as follows: time &lt;command-to-be-timed&gt;Its result generally has three categories as follows: real &lt;time&gt; user &lt;time&gt; sys &lt;time&gt;User CPU time and system CPU time are both measures o
3 min read
Difference between Relative and Absolute Deadline of Real-time Task
1. Relative Deadline : The time interval between the start of the task and the completion of the real-time task is known as Relative deadline. It is basically the time interval between arrival and corresponding deadline of the real-time task. If the arrival time of task is 't' and corresponding deadline of task is 't+d' then, Relative deadline = d
2 min read