preview

Scheduling Algorithms Essay

explanatory Essay
860 words
860 words
bookmark

Scheduling algorithms say how much time is allocated to Processes and Threads. Their goal is to fulfil a number of criteria:
 All tasks should get their chance to use CPU resources.
 When time to use priority, lower priority should not be starved for higher time.
 The scheduler should scale well with a growing number of tasks, ideally being O(1). This is observed in the Linux kernel.

Existing Scheduling Algorithms:
These are off three types. They are:
1. Interactive Scheduling Algorithm
2. Batch Scheduling Algorithm
3. Real Time Scheduling Algorithm
1. Interactive Scheduling Algorithms:
These are off four types, they are
• Round robin Scheduling
• Priority based Round robin.
• Shortest Process Next.
• Lottery Scheduling
Round Robin Scheduling:
It is pre-emptive scheduler and the simplest algorithm. This use only a single queue of process. When the system fires, next process is switched to and the pre-empted process is set back into queue.
Each process is assigned with a time slice or ‘Quantum’. Quantum gives us the number of system timer ticks the process may run for before being pre-empted. Each process is given a Quantum, but the question is how can we choose a time quantum.
Advantages:
o It is simple and strict ‘First come First served nature.
Disadvantages:
o Absence of Priority system, because of which low privilege has to wait for higher privilege one.

Priority based Round Robin:
This is similar to Round Robin, but allows a hierarchy of process. Multiple process queues are used. As long as higher priority one is in the queue, they run first and other lower priority process waits.
Advantages:
o Its simplicity and reasonable support for priorities.
Disadvantages:
o Lower priority proces...

... middle of paper ...

... a feasible schedule. If the EDF algorithm fails to produce a feasible schedule, then no feasible schedule exists. When the goal of scheduling is to meet deadlines, there is no advantage to completing any job sooner than necessary.
Least Slack Time:
 It is also called minimum laxity first
 The slack time is d-t
 T is the time remaining to complete the job
 Example
 J1 is released at time 0, its deadline is 6, and its execution time is 3
 At time 0, the slack time is 3
 As long as it executes, its slack remain at 3
 Now suppose that it is preempted at time 2 by J3 which executes from time 2 to 4
 During this interval, the slack of J1 decreases from 3 to 1
 At time 4, the remaining execution time of J1 is 1
 The LST algorithm assigns priorities to jobs based on their slacks
 The smaller the slack the higher the priority
 LST algorithm is optimal.

In this essay, the author

  • Explains scheduling algorithms say how much time is allocated to processes and threads. they aim to fulfil a number of criteria.
  • Explains that the scheduler should scale well with a growing number of tasks, ideally being o(1). this is observed in the linux kernel.
  • Explains absence of priority system, because of which low privilege has to wait for higher privilege one.
  • Compares round robin, but allows a hierarchy of process queues. as long as higher priority one is in the queue, they run first and other lower priority process waits
  • Explains non-preemptive scheduling, processes are served in the order they come in. order is very important to know the turn around time.
  • Explains that this is non-preemptive, which allows the process to run which is shorter and is available in queue. it assumes run times are known in advance.
  • Explains that scheduler picks the process which has lowest remaining time. shortest job first is pre-emptive.
  • Explains that the priority of each job is dependant on its estimated run time and the amount of time it spent for waiting.
  • Explains that real-time scheduling algorithms guarantee a process will be done before its deadline. this algorithm works only when the deadline for the process is known.
  • Describes the rate monotonic algorithm, which assigns priorities to tasks based on their period. the shorter the period, the higher the priority.
  • Explains that the rate (of job releases) is the inverse of the period, so the jobs with the higher rate have higher priority.
  • Explains the priority-driven scheduling algorithm called the earliest deadline first (edf), which is optimal when used to schedule jobs on a processor as long as preemption is allowed.
  • Explains that j1 is released at time 0, its deadline is 6, and its execution time is 3.
  • Explains that j3 executes from time 2 to 4 and preempts it at time 2.
  • Explains the pre-emptive scheduler, which uses only a single queue of process, and assigns each process time slice or ‘quantum’. quantum gives us the number of system timer ticks
  • Explains that lottery scheduling is a simple algorithm which statistically guarantees variable fraction of processor time to each runnable process.
Get Access