0% found this document useful (0 votes)
21 views2 pages

OS CH 3

Os

Uploaded by

Black Adam
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)
21 views2 pages

OS CH 3

Os

Uploaded by

Black Adam
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/ 2

OS_ch_3 : Process Scheduling

BASIC SCHEDULING CONCEPT :


• Scheduling is an important function of an operating system.
• In other words, CPU scheduling is the process of selecting a process and allocating the processor to the selected
process for execution.
• The scheduler is the kernel component responsible for deciding which program should be executed on the CPU
CPU and I/O Burst Cycle :
- Almost all the processes continue to switch between CPU and I/O devices during their execution.
- the process execution comprises alternate cycles of CPU burst and I/O burst .
CPU Bound Process: The process which spends more time in computations is called as CPU bound process.
I/O Bound Process: The process which spends more time in I/O operation than computation is I/O bound process.
**Scheduling Criteria :
• choosing which algorithm use in a particular condition there is various algorithms considered. Scheduling
algorithm is one which selects some job from ready queue based on some criteria and submits it to the CPU.
• Many criteria have suggested for comparing CPU scheduling algorithms criteria ie.CPU utilization, balanced
M
utilization, throughput, waiting time, turnaround time and response time.
CPU Utilization: CPU utilization is defined as, the percentage of time the CPU is busy in executing processes.
CPU Utilization may range from 0 to 100 percent. In a real system it should range from 40 percent to
90 percent.
Throughput. number of processes that are completed per time unit called throughput. For long processes
this rate may be one process per hour, for short transactions, throughput might be 10
r.
processes per second. Throughput is defined as, the total number of processes that a system
can execute per unit of time.
Turnaround Time (TAT): It is the difference between the process enters the system time and the process
exits from the system time. The interval from the time of submission of a process to
the time of completion is the turnaround time
Waiting Time: Waiting time is defined as, the time spent by a process while waiting in the ready queue.
R
Balanced Utilization: Balanced utilization is defined as, the percentage of time all the system resources are
busy.
Response Time : Response time is defined as, the time elapsed between the moment when a user initiates a
request and the instant when the system starts responding to this request.
oh
CPU Scheduler :
- CPU scheduling is the process of selecting a process and allocating the processor to the selected process
for execution.
Types of Scheduling :
- there are two types of scheduling namely Pre-emptive Scheduling and Non-Preemptive Scheduling.
Pre-emptive Scheduling :
• A pre-emptive scheduling allows a higher priority process to replace a currently running process.
it
• If a higher priority process is enters the system, the currently running process is stopped and the CPU
transfers the control to the higher priority process.
• The advantage of pre-emptive scheduling algorithms is they allow real multiprogramming.
• The disadvantages of pre-emptive scheduling algorithms are they are complex and they lead the system to
race condition.
Non-Preemptive Scheduling :
• In non-preemptive scheduling once the CPU is assigned to a process, the processor do not replease until
the completion of that process.
• Non-preemptive algorithms are designed so that once a process enters the running state, it cannot be
preempted until it completes its allotted time.
• The advantages of non-preemptive scheduling algorithms are they are simple and they cannot lead the
system to race condition.
• The disadvantage of non-preemptive scheduling algorithms is they do not allow real multi-programming
Dispatcher :
• Dispatcher is a component which involves in the CPU scheduling.
• The dispatcher is the module that actually gives control of the CPU to the process selected by the short
term scheduler.
• The time taken by dispatcher to stop one process and start another process to run is called dispatch
latency time
FCFS (First Come First Serve) Scheduling Algorithm :
• It is the simplest type of algorithm in which the process that requests the CPU first is allocated the CPU
first.
• In FCFS scheduling algorithm processes are scheduled in the order they are received. The FCFS algorithm is
easily implemented by using a queue data structure for the ready queue.
• The FCFS scheduling algorithm is non-pre-emptive.
SJF (Shortest Job First) Scheduling Algorithm :
M
• The SJF scheduling algorithm is also knows as Shortest Process Next (SPN) scheduling algorithm or Shortest
Request Next (SRN) scheduling algorithm.
• SJF algorithm schedules the processes according to the length of the CPU burst they require.
• In SJF algorithm, the process with the shortest expected processing time is assigned to CPU. Hence, the
name is shortest job first.
• SJF can be evaluated in two different manners : Non pre-emptive SJF, Pre-emptive SJF.
r.
Priority Scheduling Algorithm :
• A priority is associated with each process and the CPU is allocated to the process with the highest priority,
hence it is called Priority Scheduling.
• In priority scheduling algorithm, a priority is associated with each process and the scheduler always picks
up the highest priority process for execution from the ready queue.
• The SJF algorithm is a special case of the priority scheduling algorithm.
R
Priority is categorized into two types ie. Internal priorities, External priorities.
• The priority scheduling can be either pre-emptive or non-pre-emptive.
• A problem with priority scheduling algorithm is starvation.
Round Robin (RR) Scheduling Algorithm :
• The Round Robin (RR) scheduling algorithm is designed especially for time sharing systems.
oh
• RR is the pre-emptive process scheduling algorithm.
• Round robin scheduling is a preemptive version of First Come First Serve scheduling.
• It is similar to FCFS scheduling but pre-emption is added to switch between processes.
Multi-Level Queue (MLQ) Scheduling Algorithm :
• Multilevel Queue Scheduling based on response - time requirements.
• In a multilevel queue scheduling processes are permanently assigned to one queue, depending upon their
it
properties such as the size of the memory or the type of the process or priority of the process. So each
queue follows a separate scheduling algorithm.
• In multilevel queue scheduling algorithm scheduling the processes are classified into different groups such
as System processes, Interactive processes, Interactive editing processes, Batch processes, User processes

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy