Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
SCHEDULING
ALGORITHMS
PREPARED BY : DHAVAL SAKHIYA(13CSE533)
PRAKASH ASADIYA(13CSE501)
What is scheduling?
 One CPU with a number of processes. Only one process
can use the CPU at a time which process is going to be
execute that thing decide a by scheduler and it’s whole
thing is called scheduling.
Two types of scheduling:
1. Preemptive
2.Non- Preemptive
Preemptive :
i. In preemptive scheduling, the currently running process may be
interrupted and move to the ready state by OS(forcefully).
ii. It selects a process and lets it run for a specific time duration,
called time quantum.
iii. If process is still running at the end of the time interval, it is
suspended and the scheduler selects another process to run.
Non-Preemptive :
i. In non-preemptive scheduling, the running process can only
lose the processor voluntarily by terminating or by requesting
and I/O. OR, once CPU given to a process it can not be
preempted until the process completes its CPU burst.
ii. It selects a process to run and then just lets it run until it
blocks or terminates.

Recommended for you

Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)

It consists of CPU scheduling algorithms, examples, scheduling problems, realtime scheduling algorithms and issues. Multiprocessing and multicore scheduling.

schedulingfcfssjf
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling

The document discusses several key process scheduling policies and algorithms: 1. Maximum throughput, minimize response time, and other policies aim to optimize different performance metrics like job completion time. 2. Common scheduling algorithms include first come first served (FCFS), shortest job next (SJN), priority scheduling, round robin, and multilevel queues. Each has advantages for different workload types. 3. The document also covers process synchronization challenges like deadlock and livelock that can occur when processes contend for shared resources in certain ordering. Methods to avoid or recover from such issues are important for system design.

operating systems
Process scheduling
Process schedulingProcess scheduling
Process scheduling

Process scheduling involves assigning system resources like CPU time to processes. There are three levels of scheduling - long, medium, and short term. The goals of scheduling are to minimize turnaround time, waiting time, and response time for users while maximizing throughput, CPU utilization, and fairness for the system. Common scheduling algorithms include first come first served, priority scheduling, shortest job first, round robin, and multilevel queue scheduling. Newer algorithms like fair share scheduling and lottery scheduling aim to prevent starvation.

process schedulingcomputer processing
Types of scheduler
 Long-term scheduler:
 load a job in memory
 Runs infrequently
 Medium-term scheduler:
 Select ready process to run on CPU
 Should be fast
 Short-term scheduler:
 Reduce multiprogramming or memory consumption
Process Scheduling
• “process” and “thread” used interchangeably
• Which process to run next
• Many processes in “ready” state
New Ready Running Exit
Waiting
FORMULA :
 TURN AROUND TIME:
 TAT=(Waiting Time)(W.T) + (Burst Time)(B.T)
 OR
 = (Completion Time)(C.T) – (Arrival Time)(AT)
 WAITING TIME:
 WT=(Turn Around Time)(TAT) – (Burst Time)(B.T)
 OR
 =(Completion Time)(C.T) – (Arrival Time)(A.T) – (Burst Time)(B.T)
First-Come First-Serve (FCFS)
 One ready queue;
 OS runs the process at head of the queue;
 New processes come in at the end of the queue;
 Running process does not give up the CPU until it terminates
or it performs IO.

Recommended for you

DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems

Deadlocks-An Unconditional Waiting Situation in Operating System. We must make sure of This concept well before understanding deep in to Operating System. This PPT will understands you to get how the deadlocks Occur and how can we Detect, avoid and Prevent the deadlocks in Operating Systems.

deadlocksdeadlock avoidancedeadlock prevention
Semaphores
SemaphoresSemaphores
Semaphores

1) A semaphore consists of a counter, a waiting list, and wait() and signal() methods. Wait() decrements the counter and blocks if it becomes negative, while signal() increments the counter and resumes a blocked process if the counter becomes positive. 2) The dining philosophers problem is solved using semaphores to lock access to shared chopsticks, with one philosopher designated as a "weirdo" to avoid deadlock by acquiring locks in a different order. 3) The producer-consumer problem uses three semaphores - one to limit buffer size, one for empty slots, and one for locks - to coordinate producers adding to a bounded buffer

ossemaphoresoperating system
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system

This document discusses several techniques for clock synchronization in distributed systems: 1. Time stamping events and messages with logical clocks to determine partial ordering without a global clock. Logical clocks assign monotonically increasing sequence numbers. 2. Clock synchronization algorithms like NTP that regularly adjust system clocks across the network to synchronize with a time server. NTP uses averaging to account for network delays. 3. Lamport's logical clocks algorithm that defines "happened before" relations and increments clocks between events to synchronize logical clocks across processes.

SCHEDULING ALGORITHMS
Shortest Job First (SJF)
 Best approach to minimize waiting time.
 Impossible to implement.
 Processer should know in advance how much time process will take.
 SJF is optimal – gives minimum average waiting time for a given set of processes.
Process Arrival Time Burst Time
P1 0 7
P2 2 4
P3 4 1
P4 5 4
 SJF (non-preemptive):
0 7 8 12 16
P1 P2 P3 P2 P4 P1
Example of Preemptive SJF
Process Arrival Time Burst Time
P1 0 7
P2 2 4
P3 4 1
P4 5 4
SJF (preemptive)
0 2 4 5 7 11 16

Recommended for you

Deadlock
DeadlockDeadlock
Deadlock

The document discusses deadlocks in computer systems. It defines deadlock, presents examples, and describes four conditions required for deadlock to occur. Several methods for handling deadlocks are discussed, including prevention, avoidance, detection, and recovery. Prevention methods aim to ensure deadlocks never occur, while avoidance allows the system to dynamically prevent unsafe states. Detection identifies when the system is in a deadlocked state.

deadlockbanker's algorithmrecovery from deadlock
Process synchronization
Process synchronizationProcess synchronization
Process synchronization

This document discusses various techniques for process synchronization. It begins by defining process synchronization as coordinating access to shared resources between processes to maintain data consistency. It then discusses critical sections, where shared data is accessed, and solutions like Peterson's algorithm and semaphores to ensure only one process accesses the critical section at a time. Semaphores use wait and signal operations on a shared integer variable to synchronize processes. The document covers binary and counting semaphores and provides an example of their use.

synchronizationprocess synchronizationsynchronization in os
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling

This document discusses various disk scheduling algorithms: - FCFS handles requests sequentially but suffers from the global zigzag effect. - SSTF selects the request with the minimum seek time, reducing total head movement but risking starvation. - SCAN and C-SCAN move the disk arm back and forth, providing more uniform wait times. - LOOK and C-LOOK only move as far as the last request in each direction before reversing. Circular versions like C-SCAN are more fair but have larger total seek times. The optimal algorithm depends on disk load and request patterns.

diskschedulingdisk shudling
Round Robin Scheduling
 Each process is provided a fix time to execute called quantum.
 Once a process is executed for given time period. Process is preempted and
other process executes for given time period.
 Context switching is used to save states of preempted processes.
SCHEDULING ALGORITHMS
Priority Based Scheduling
 Each process is assigned a priority. Process with highest priority is to be executed first and so on.
 Processes with same priority are executed on first come first serve basis.
 Priority can be decided based on memory requirements, time requirements or any other
resource requirement.
Priority based non pre-preemptive Algo Example
0
P4 P2 P1 P3
6 9 14 17

Recommended for you

Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management

Operating System Topic Memory Management for Btech/Bsc (C.S)/BCA... Memory management is the functionality of an operating system which handles or manages primary memory. Memory management keeps track of each and every memory location either it is allocated to some process or it is free. It checks how much memory is to be allocated to processes. It decides which process will get memory at what time. It tracks whenever some memory gets freed or unallocated and correspondingly it updates the status.

memory management in operating system
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)

This document describes the Shortest Job First (SJF) CPU scheduling algorithm. SJF prioritizes processes in the ready queue based on the shortest estimated CPU burst time so that the process with the shortest burst time is selected first. SJF aims to minimize average waiting times and turnaround times. However, it requires accurate predictions of burst times and cannot always be implemented in practice due to lack of future knowledge.

sjfschedulingcpu scheduling
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS

This Presentation is for Memory Management in Operating System (OS). This Presentation describes the basic need for the Memory Management in our OS and its various Techniques like Swapping, Fragmentation, Paging and Segmentation.

memory managementoperating systemcomputer science
SCHEDULING ALGORITHMS

More Related Content

What's hot

Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
Dr Sandeep Kumar Poonia
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
Piyush Rochwani
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
Ritu Ranjan Shrivastwa
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
Mukesh Chinta
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
Damian T. Gordon
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Riya Choudhary
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
Venkata Sreeram
 
Semaphores
SemaphoresSemaphores
Semaphores
Mohd Arif
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
Sunita Sahu
 
Deadlock
DeadlockDeadlock
Deadlock
Rajandeep Gill
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
Syed Hassan Ali
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
NEERAJ BAGHEL
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
rprajat007
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
ritu98
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
Kumar Pritam
 
Demand paging
Demand pagingDemand paging
Demand paging
Trinity Dwarka
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
Harshana Madusanka Jayamaha
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
Amir Khan
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Deepika Balichwal
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
Ra'Fat Al-Msie'deen
 

What's hot (20)

Distributed Operating System_1
Distributed Operating System_1Distributed Operating System_1
Distributed Operating System_1
 
Paging and segmentation
Paging and segmentationPaging and segmentation
Paging and segmentation
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
Operating Systems: Process Scheduling
Operating Systems: Process SchedulingOperating Systems: Process Scheduling
Operating Systems: Process Scheduling
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Semaphores
SemaphoresSemaphores
Semaphores
 
Clock synchronization in distributed system
Clock synchronization in distributed systemClock synchronization in distributed system
Clock synchronization in distributed system
 
Deadlock
DeadlockDeadlock
Deadlock
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Disk scheduling
Disk schedulingDisk scheduling
Disk scheduling
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)Shortest job first Scheduling (SJF)
Shortest job first Scheduling (SJF)
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Demand paging
Demand pagingDemand paging
Demand paging
 
Operating system critical section
Operating system   critical sectionOperating system   critical section
Operating system critical section
 
CPU scheduling
CPU schedulingCPU scheduling
CPU scheduling
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"Operating Systems - "Chapter 5 Process Synchronization"
Operating Systems - "Chapter 5 Process Synchronization"
 

Similar to SCHEDULING ALGORITHMS

CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
VADAPALLYPRAVEENKUMA1
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
Farhat Shaikh
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
Shipra Swati
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
jamilaltiti1
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
sammerkhan1
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
ShubhamGupta345141
 
Os module 2 ba
Os module 2 baOs module 2 ba
Os module 2 ba
Gichelle Amon
 
U2-LP2.ppt
U2-LP2.pptU2-LP2.ppt
U2-LP2.ppt
AJAYVISHALRP
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
M. Abdullah Wasif
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
Nazir Ahmed
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
Harshit Jain
 
Cp usched 2
Cp usched  2Cp usched  2
Cp usched 2
nidsrajdev
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptx
yashu23
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
AliyanAbbas1
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
mohsinalilarik1
 
Cpu scheduling final
Cpu scheduling finalCpu scheduling final
Cpu scheduling final
marangburu42
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
Yogesh Santhan
 
LM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processesLM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processes
manideepakc
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
KeyreSebre
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
sampledocs2012
 

Similar to SCHEDULING ALGORITHMS (20)

CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILEDCPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
CPU SCHEDULING IN OPERATING SYSTEMS IN DETAILED
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
 
Os module 2 ba
Os module 2 baOs module 2 ba
Os module 2 ba
 
U2-LP2.ppt
U2-LP2.pptU2-LP2.ppt
U2-LP2.ppt
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Ch05 cpu-scheduling
Ch05 cpu-schedulingCh05 cpu-scheduling
Ch05 cpu-scheduling
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Cp usched 2
Cp usched  2Cp usched  2
Cp usched 2
 
CPU Scheduling.pptx
CPU Scheduling.pptxCPU Scheduling.pptx
CPU Scheduling.pptx
 
operating system (1).pdf
operating system (1).pdfoperating system (1).pdf
operating system (1).pdf
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Cpu scheduling final
Cpu scheduling finalCpu scheduling final
Cpu scheduling final
 
Operating Systems Third Unit - Fourth Semester - Engineering
Operating Systems Third Unit  - Fourth Semester - EngineeringOperating Systems Third Unit  - Fourth Semester - Engineering
Operating Systems Third Unit - Fourth Semester - Engineering
 
LM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processesLM10,11,12 - CPU SCHEDULING algorithms and its processes
LM10,11,12 - CPU SCHEDULING algorithms and its processes
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 

Recently uploaded

Lecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdfLecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdf
peacekipu
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
bookhotbebes1
 
Literature Reivew of Student Center Design
Literature Reivew of Student Center DesignLiterature Reivew of Student Center Design
Literature Reivew of Student Center Design
PriyankaKarn3
 
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
kinni singh$A17
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
Servizi a rete
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
hahehot
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
Tool and Die Tech
 
@Call @Girls Rajkot 0000000000 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Rajkot  0000000000 Priya Sharma Beautiful And Cute Girl any Time@Call @Girls Rajkot  0000000000 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Rajkot 0000000000 Priya Sharma Beautiful And Cute Girl any Time
mishratanu639
 
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeRohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
binna singh$A17
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
IJAEMSJORNAL
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
maisnampibarel
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
byyi0h
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
IIIT Hyderabad
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
naseki5964
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
rebecca841358
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Sinan KOZAK
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
sanabts249
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
zyroxsunny
 
Mumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Mumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai AvailableMumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Mumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
1258strict
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
hamedmustafa094
 

Recently uploaded (20)

Lecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdfLecture 6 - The effect of Corona effect in Power systems.pdf
Lecture 6 - The effect of Corona effect in Power systems.pdf
 
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model SafeBangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
Bangalore @ℂall @Girls ꧁❤ 0000000000 ❤꧂@ℂall @Girls Service Vip Top Model Safe
 
Literature Reivew of Student Center Design
Literature Reivew of Student Center DesignLiterature Reivew of Student Center Design
Literature Reivew of Student Center Design
 
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
( Call  ) Girls Vasant Kunj Just 9873940964 High Class Model Shneha Patil
 
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE DonatoCONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
CONVEGNO DA IRETI 18 giugno 2024 | PASQUALE Donato
 
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
一比一原版(skku毕业证)韩国成均馆大学毕业证如何办理
 
Press Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdfPress Tool and It's Primary Components.pdf
Press Tool and It's Primary Components.pdf
 
@Call @Girls Rajkot 0000000000 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Rajkot  0000000000 Priya Sharma Beautiful And Cute Girl any Time@Call @Girls Rajkot  0000000000 Priya Sharma Beautiful And Cute Girl any Time
@Call @Girls Rajkot 0000000000 Priya Sharma Beautiful And Cute Girl any Time
 
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model SafeRohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
Rohini @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Yogita Mehra Top Model Safe
 
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
Profiling of Cafe Business in Talavera, Nueva Ecija: A Basis for Development ...
 
Development of Chatbot Using AI/ML Technologies
Development of  Chatbot Using AI/ML TechnologiesDevelopment of  Chatbot Using AI/ML Technologies
Development of Chatbot Using AI/ML Technologies
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
 
Response & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITHResponse & Safe AI at Summer School of AI at IIITH
Response & Safe AI at Summer School of AI at IIITH
 
L-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptxL-3536-Cost Benifit Analysis in ESIA.pptx
L-3536-Cost Benifit Analysis in ESIA.pptx
 
Germany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptxGermany Offshore Wind 010724 RE (1) 2 test.pptx
Germany Offshore Wind 010724 RE (1) 2 test.pptx
 
Unblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen FramesUnblocking The Main Thread - Solving ANRs and Frozen Frames
Unblocking The Main Thread - Solving ANRs and Frozen Frames
 
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
21CV61- Module 3 (CONSTRUCTION MANAGEMENT AND ENTREPRENEURSHIP.pptx
 
system structure in operating systems.pdf
system structure in operating systems.pdfsystem structure in operating systems.pdf
system structure in operating systems.pdf
 
Mumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Mumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai AvailableMumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
Mumbai @Call @Girls 🛴 9930687706 🛴 Aaradhaya Best High Class Mumbai Available
 
kiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinkerkiln burning and kiln burner system for clinker
kiln burning and kiln burner system for clinker
 

SCHEDULING ALGORITHMS

  • 1. SCHEDULING ALGORITHMS PREPARED BY : DHAVAL SAKHIYA(13CSE533) PRAKASH ASADIYA(13CSE501)
  • 2. What is scheduling?  One CPU with a number of processes. Only one process can use the CPU at a time which process is going to be execute that thing decide a by scheduler and it’s whole thing is called scheduling. Two types of scheduling: 1. Preemptive 2.Non- Preemptive
  • 3. Preemptive : i. In preemptive scheduling, the currently running process may be interrupted and move to the ready state by OS(forcefully). ii. It selects a process and lets it run for a specific time duration, called time quantum. iii. If process is still running at the end of the time interval, it is suspended and the scheduler selects another process to run.
  • 4. Non-Preemptive : i. In non-preemptive scheduling, the running process can only lose the processor voluntarily by terminating or by requesting and I/O. OR, once CPU given to a process it can not be preempted until the process completes its CPU burst. ii. It selects a process to run and then just lets it run until it blocks or terminates.
  • 5. Types of scheduler  Long-term scheduler:  load a job in memory  Runs infrequently  Medium-term scheduler:  Select ready process to run on CPU  Should be fast  Short-term scheduler:  Reduce multiprogramming or memory consumption
  • 6. Process Scheduling • “process” and “thread” used interchangeably • Which process to run next • Many processes in “ready” state New Ready Running Exit Waiting
  • 7. FORMULA :  TURN AROUND TIME:  TAT=(Waiting Time)(W.T) + (Burst Time)(B.T)  OR  = (Completion Time)(C.T) – (Arrival Time)(AT)  WAITING TIME:  WT=(Turn Around Time)(TAT) – (Burst Time)(B.T)  OR  =(Completion Time)(C.T) – (Arrival Time)(A.T) – (Burst Time)(B.T)
  • 8. First-Come First-Serve (FCFS)  One ready queue;  OS runs the process at head of the queue;  New processes come in at the end of the queue;  Running process does not give up the CPU until it terminates or it performs IO.
  • 10. Shortest Job First (SJF)  Best approach to minimize waiting time.  Impossible to implement.  Processer should know in advance how much time process will take.
  • 11.  SJF is optimal – gives minimum average waiting time for a given set of processes. Process Arrival Time Burst Time P1 0 7 P2 2 4 P3 4 1 P4 5 4  SJF (non-preemptive): 0 7 8 12 16
  • 12. P1 P2 P3 P2 P4 P1 Example of Preemptive SJF Process Arrival Time Burst Time P1 0 7 P2 2 4 P3 4 1 P4 5 4 SJF (preemptive) 0 2 4 5 7 11 16
  • 13. Round Robin Scheduling  Each process is provided a fix time to execute called quantum.  Once a process is executed for given time period. Process is preempted and other process executes for given time period.  Context switching is used to save states of preempted processes.
  • 15. Priority Based Scheduling  Each process is assigned a priority. Process with highest priority is to be executed first and so on.  Processes with same priority are executed on first come first serve basis.  Priority can be decided based on memory requirements, time requirements or any other resource requirement.
  • 16. Priority based non pre-preemptive Algo Example 0 P4 P2 P1 P3 6 9 14 17