0% found this document useful (0 votes)
38 views32 pages

Class 11 - 12

This document provides an overview of operating system concepts related to uniprocessor scheduling. It discusses how scheduling aims to assign processes to the processor in a way that meets objectives like response time and throughput. Scheduling involves long-term, medium-term, and short-term functions. Short-term scheduling criteria include performance and priorities. Common scheduling policies discussed are first-come, first-served; round robin; and shortest process next.

Uploaded by

Nur Aisyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views32 pages

Class 11 - 12

This document provides an overview of operating system concepts related to uniprocessor scheduling. It discusses how scheduling aims to assign processes to the processor in a way that meets objectives like response time and throughput. Scheduling involves long-term, medium-term, and short-term functions. Short-term scheduling criteria include performance and priorities. Common scheduling policies discussed are first-come, first-served; round robin; and shortest process next.

Uploaded by

Nur Aisyah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 32

CCE62115 – Operating System

Class 11 – 12 – Uniprocessor Scheduling


Introduction
In a multiprogramming system,
multiple process exist
concurrently in main memory.

Introduction

The key to multiprogramming


is scheduling

This Photo by Unknown author is licensed under


CC BY-NC-ND.
Processor
Scheduling
q Aims to assign processes to be executed by
the processor in a way that meets system
objectives, such as response time,
throughput, and processor efficiency.

q Broken down into three separate functions:


This Photo by Unknown author is licensed under CC BY-SA-NC.
Types of
Processor
Scheduling
Types of Processor
Scheduling
Process state transitions
Levels of
Scheduling
Queuing
Diagram for
Scheduling
Long-term Scheduler
q Determines which programs are
admitted to the system for
processing.
q Controls the degree of
multiprogramming
q The more processes that are created
the smaller the percentage of time that
each process can be executed
q May limit to provide satisfactory service
to the current set of processes
Medium-term
Scheduling
q Part of the swapping function
q Swapping-in decisions are
based on the need to manage
the degree of
multiprogramming
q Considers the memory requirements
of the swapped-out processes
Short-term
Scheduling

q Known as the dispatcher


q Executes most frequently
q Makes the fine-grained decision of which
process to execute next
q Invoked when an event occurs that may lead
to the blocking of the current process or that
may provide an opportunity to preempt a
currently running process in favor of another
Short-term
Scheduling
Criteria
q Main objective is to allocate processor time
to optimize certain aspects of system
behavior
q A set of criteria is needed to evaluate the
scheduling policy
Short-term Scheduling Criteria:
Performance
Scheduling
Criteria
1. The Use of Priorities
Characteristics of Various Scheduling Policies
2. Alternative
Scheduling Policies

• Selection function, determines which


process,among ready processes, is selected
next for esecution.
Decision Mode
q Specifies the instants in time at which the
selection function is exercised
q Two categories:
q Non-preemptiive
q Preemptive
Non-preemptive vs preemptive

Non-preemptive Preemptive
Once a process is in the
running state, it will
continue until it
terminates or blocks
itself for I/O
Process Scheduling
Example
A Comparison of
Scheduling Policy
1. First-Come-First-Served (FCFS)

q Simplest scheduling policy


q Also known as first-in-first-out (FIFO) or a strict
queuing scheme
q When the current process ceases to execute, the
longest process in the Ready queue is selected
q Performs much better for long process than short
ones
q Tend to favor processor-bound processes over
I/O-bound processes
FCFS
2. Round Robin

• Uses preemption based on a clock


• Also known as time slicing because each
process is given a slice of time before being
preempted
• Principal design issue is the length of the time
quantum, or slice, to be used.
• Particularly effective in a general purpose time
sharing system or transaction processing
system
• One drawback is its relative treatment of
processor-bound and I/O bound processes
Scheduling
Algorithms
• Nonpreemptive policy in which the process
with the shortest expected processing time
is selected next
• A short process will jump to the head of the
queue
• Possibility of starvation for longer processes
• One difficulty is the need to know or at least
estimate, the required processing time of
each process
• If the programmer's estimate is substantially
under the actual running time, the system
may abort the job

3. Shortest Process Next


Dst…
• Screenshot 2023-05-22 at 13.25.49
Summary

You might also like