Process Scheduling Algorithm

Tuesday, January 3, 2012 · Posted in

subject : Operating System (TOS2111)



Here I will discussed only discuss a bit on Process Scheduling Algorithm. I will discuss two types of algorithms that is, Non Preemptive Shortest Job First and Priority Based Pre-emptive Shortest Job First. There are also two animation, in hope will help you to understand the two algorithm better.

------------------------------------------------------------------
First are brief explanation on some terms.
------------------------------------------------------------------
Process Scheduling Algorithm
Is the process of decision making, to select among processes that are ready to be execute, and allocates the CPU to the process.

Shortest Job First (Algorithm)
Shortest Job First or SJF is one of the process scheduling algorithm, which select process based on their burst time. Process (that had arrived at that moment) with the lowest or shortest burstime is allocated to the CPU to be process. If a process having the same burst time, process will be selected by arrival time.

Preemptive
By definition preemptive is, the power to prevent or deter an anticipated situation or occurences. In this case preemptive means, a process can stop another process during its execution. Where Non-preemptive is where a process is executed, it will not stop until it is done.

Priority
By definition priority is, status established in order of importance or urgency.



------------------------------------------------------------------
Non Preemptive Shortest Job First (Algorithm)
------------------------------------------------------------------

Process are selected based on :
1. Process with the shortest or lowest burst time.
and Processes cant be stop when it is executed (Non Preemptive)

[View Animation] [Download Animation]


------------------------------------------------------------------
Priority Based Pre-emptive Shortest Job First (Algorithm)
------------------------------------------------------------------

Process are selected based on :
1. Process with highest priority (1 is the highest priority)
2. Process with shortest or lowest burst time
and process may stop if a higher process fit the 1 and 2 criteria.

[View Animation] [Download Animation]



Animations are free to use, but all copyright and credit goes to the author. Thanks, hope it helps.




Leave a thank you comment if this helps :)

Leave a Reply

Powered by Blogger.