What do you mean by the Non-Pre-Emptive Scheduling?

Spread the love
This is scheduling scheme where any scheduled process has to be completed before another scheduling i.e., all the processes are finished in the order of their scheduling. These Non-Pre-Emptive Scheduling Algorithms are very simple and quite easy to implement, are usually not suitable for general purpose systems with multiple users. Whereas for dedicated systems, like database systems etc, this algorithm is quite suitable. The following are some of the non-pre-emptive scheduling algorithms:
               1.       Shortest Job First (SJF) scheduling algorithm
               2.       First come first served (FCFS) scheduling algorithm.
               3.       Dead line scheduling algorithm.
 

               

Shortest Job First (SJF) Scheduling Algorithm

This is an algorithm which is appropriate for Batch Processes, whose run times are known in advance much before the execution. This algorithm is very simple, it advocates that the job whose process time is shortest of all counter parts, then it has to be executed first, then the next, then next with increasing process times (i.e., run times). For example we will consider the following processes and their execution times.
Processes
Execution Times
A
4
B
8
C
6
D
3
E
2
F
7
G
5
H
9
The above processes are scheduled are follows based upon the shortest job First Scheduling Algorithm.

 

E <- D <- A <- G <- C <- F <- B <- H
Now, let us look into waiting time for each process based on SJF algorithm.
Processes
Execution Times
E
0
D
2
A
5
G
9
C
13
F
19
B
26
H
34
Total
107
Average
13,375 unites
We can as well use this algorithm for interactive processes, as this algorithm produces the minimum average waiting/response times. As we know that the Interactive Processes follow a pattern of waiting for command and executing them, again waiting and executing and soon.
 If we take the execution of every command as a separate job, we can minimize the overall average Waiting/Response Time by running the shortest process the first. The problem lying here is that, how one make of the shortest can jobs in the Current Execution Process, which is usually done on the basis of past behavior of the processes.

First Come First Serve (FCFS) Scheduling Algorithm

This is one of the most simplest and east Algorithm for Scheduling, which is done on the basis of arrival of the processes. The implementation of FCFS is very straight forward, as it works on the principle that the process which arrives first, should be served first. This is achieved by maintaining a First in First out (FIFO) queue, which enables the process which arrived first to pass first, so that it is executed.
This FCFS algorithm of scheduling is like Batch Processing where the processes in a Batch are executed one by one. The turnaround time i.e., time lag between arrival and completion is minimum for the first process in the batch and for the last process is maximum. The following figure gives FCFS scheduling algorithm.
Let is, for example consider the following processes with their execution time. (These are taken the same as in case of shortest job first scheduling in order to compare average waiting times).
Processes
Execution Times
A
4
B
8
C
6
D
3
E
2
F
7
G
5
H
9
Let us assume that the processes come in the same order >.e., A-H and now based upon first come first served algorithm we will calculate waiting times of each process, as follows so that we can arrive at Average Waiting Time.
Processes
Waiting time
A
0
B
4
C
12
D
18
E
21
F
23
G
30
H
35
Total
143
As the scheduling for processes is s follows:
[A <- B <- C <- D <- E <- F <- G <-H]
Therefore Average waiting time = 143 /8=17.875 units
Thus we can see that the Average Waiting Timein the first come First Served Scheduling is higher than in case of shortest job first Algorithm. Even the turnaround time is also the same i.e., fro processes in the FCDS the average turnaround time is quite high when compared to that of average turnaround time in SJF scheduling.

 

This process once given to CPU for processing in FCFS should have to be invariably completed, and then only the net processes can be processed. Therefore, in this Non Preemptive Scheduling Algorithmshort processes have to wait for longer times if longer processes are in the queue before. They arrive, but once being executed both are given a fair treatment.

 

Deadline Scheduling Algorithm

This algorithm is aimed as assigned a time limit for a process to be completed. This time limit is known as Deadline of the process, and a process should be completed, within this deadline. Philosophy is used so that the processes should not take more time on CPU than the prescribed deadline. This Deadline Scheduling, schedules, the processes in the order of their deadlines.
The processes with the earliest deadline are selected first. The basic idea behind this scheduling is that there should be no or Minimum Oeadline overruns. There will be no deadline overrun, if the processes has an execution time which is less than or equal to the deadline given to it. Let us consider following processes with their deal lines, so that we can illustrate deadline scheduling algorithm.
Processes
Deadlines
A
8
B
6
C
7
D
5
E
9
F
4
Now, using deadline algorithm, the processes are scheduled as F <- D <- B<- C <- A <- E
Thus, the processors management is done using either pre-emotive or Non-Preemptive Scheduling Algorithm, bests suitable for any situations, depending on the types of jobs being undertaken. There are many other algorithms like Guaranteed Scheduling. Two level scheduling etc. which can be used for processor management.

MOHIT BHARDWAJ

Hello Visitors, myself Mohit Bhardwaj working in blogging sector since last 8 years. my qualification in bachelor degree in computer science steam.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Our Visitor

002218
Users Today : 13
Users Yesterday : 10
Users Last 7 days : 143
Users Last 30 days : 667
Users This Month : 384
Users This Year : 2217
Total Users : 2218
Views Today : 85
Views Yesterday : 14
Views Last 7 days : 423
Views Last 30 days : 1833
Views This Month : 1196
Views This Year : 5551
Total views : 5552
Who's Online : 0
error: Content is protected !!