My Blog List

Scheduling Algorithms

Scheduling is the process of allocating the CPU to the process.

1) FCFS(First Come First Served):

        It is the Simplest CPU Scheduling algorithm.
        The process that request the CPU first will get the CPU Access.
        Averaging waiting time is long.
        It is Non Preemptive.
2) Shortest Job First(SJF):
        If two processes have the same length next CPU burst, FCFS scheduling is used.
        SJF is optimal – gives minimum average waiting time for a given set of processes.
3) Round Robin Scheduling: The Round Robin is designed for time sharing systems.
         Each process gets a small unit of CPU time (time quantum or time slice ), usually 10-100 milliseconds.       
        After this time has elapsed,the process is preempted and added to the end of the ready queue.
        That is, after the time slice is expired an interrupt will occur and a context switch.

4) Priority Scheduling: Priority Number is associated with each process.
        The CPU is allocated to the process with the highest priority (smallest integer ≡ highest priority).
        Equal priority processes are scheduled in FCFS.

Both FCFS and SJF are not useful for timesharing environments, because they are non preemptive.
SJF gives less average waiting time than FCFS.

No comments:

Post a Comment