ENVS 1800 Lecture 22: ENVS 1800 Lecture 22 Notes
ENVS 1800 Lecture 22 Notes – Priority scheduling
Introduction
• To prevent the user from lying, systems that use this algorithm generally inflict a severe
penalty on jobs that run more than a small percentage over their estimate.
• Since short jobs will be pushed ahead of longer jobs, starvation is possible.
• When SJF is implemented, it generally includes a dynamic priority factor that raises the
priority of jobs as they wait, until they reach a priority where they will be processed next
regardless of length.
• Although SJF maximizes throughput, you might note that its turnaround time is
particularly inconsistent
• Since the time required completing a job depends entirely on the mix of the jobs
submitted both before it, and possibly after it.
• Priority scheduling assumes that each job has a priority assigned to it.
• The dispatcher will assign the CPU to the job with the highest priority.
• If there are multiple jobs with the same priority, the dispatcher will select among them
on a FIFO basis.
• Priorities can be assigned in different ways.
• On some systems that charge their users for CPU time, users select the priority.
• The fee is scaled to the priority, so that higher priorities cost more.
• In other systems, the priority is assigned by the system.
• Many factors can be used to affect performance, and the priorities may be assigned
• For example, a system may assign priority on the basis of the resources that the process
statically or dynamically. is requesting.
• If the system is presently CPU-bound, it can assign an I/O-bound process a high priority
to equalize the system.
• Another variation on priority scheduling is basically no preemptive, but adds a
preemptive element.
• A severe penalty on jobs that run more than a small percentage over their estimate.
find more resources at oneclass.com
find more resources at oneclass.com