Twitter Delicious Facebook Digg Stumbleupon Favorites More

Wednesday 7 September 2011

Process Scheduling

Process Scheduling

In a single processor system where there are many processor fighting for their execution or in the multiprocessor system where the same fight occurs, we need some mechanism or some rules to allocate the CPU one by one to them, and in such a system we need that the CPU of the system must be used efficiently, and this mechanism is known as Process Scheduling.
Suppose in a situation where one process starts I/O, then in case of without scheduling the processor will sit idle and hence it decreases the CPU utilization.
When a process is waiting in the ready queue and if CPU becomes idle then the operating system selects one of   the process in the ready queue using Short term Scheduler and here is the work of Process Scheduling comes.

There are two types of process Scheduling:
1. Preemptive Scheduling: In preemptive scheduling if a process is waiting for an I/O or a high priority process comes in the time of their execution that process leaves the CPU for that process using a context switch and it is preemption and this scheduling is known as Preemptive scheduling.
2. Non Preemptive scheduling: In non-preemptive scheduling if a process starts executing, it leaves after its termination, hence all process has to wait if a process is executing in CPU.

There are different types of scheduling algorithms used for process scheduling.
1. First come First serve (FCFS)
2. Shortest job first (SJF)
3. Round-Robin Scheduling (R-R)
4. Priority Scheduling
5. Multilevel Queue Scheduling
6. Multilevel Feed-back queue Scheduling

0 comments:

Post a Comment

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Blogger Templates