Priority Scheduling In Operating System

Explain Priority Scheduling In Operating System, What Is Priority Scheduling Explain 

In This Topic & Blog Having Any Query Then Post your Comment and Suggestion Below

Priority Scheduling
• Generally the priorities are two types :
– One is internal priority
– Second is external priority.
• The external priority means, it is external to
operating system. The CPU is allocated to the
process with the highest priority.
• Equal priority processes are scheduled in FCFS
order.
• Priorities are generally some fixed range of
numbers, such as 0 to 4095.

• There is no general agreement on weather 0 is the
highest or lowest priority.
• Some systems use low numbers to represent the low
priority. Others use low numbers to high priority. We
assume that low numbers represent high priority.
• The priorities use some measurable quantity (or)
quantities to compute the priority of a process
for example, time limits, memory requirements, the
number of open files, and the ratio of average i/o burst
to average CPU burst have been used in computing
priorities.

• Priority scheduling can be either preemptive or non
preemptive.
• Preemptive : When a process arrives at the ready queue its
priority is compare with the currently executing one,
preemptive scheduling, the newly arrived process priority is
more than the priority of currently executing one then the
CPU switches to the new one otherwise continue the same
process. The new process simply attached to the tail of the
ready queue.
• The major problem with the priority scheduling is
starvation. Starvation means only high priority process are
executing ,but low priority jobs are waiting for the CPU for
the longest period of the time.

• A priority number (integer) is associated with each process
• The CPU is allocated to the process with the highest
priority (smallest integer  highest priority).
– Preemptive
– nonpreemptive
• SJF is a priority scheduling where priority is the predicted
next CPU burst time.
• Problem  Starvation – low priority processes may never
execute.
• Solution  Aging – as time progresses increase the priority
of the process.


Labels: