Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
SlideShare a Scribd company logo
CPU scheduling
Mohd Amir khan
CPU scheduling
 A process execution consist office cycle of CPU execution and input output
execution
 Every process begins with CPU burst that may be followed by input output
bus, then another CPU burst and then input output burst and so on
eventually in the last will end up on CPU burst
 CPU burst there are those processes which require most of time on CPU
 Input output bus which require most of the time on input output devices
for peripherals
 A good CPU scheduling idea should choose the mixture of both so that
both input and output devices and CPU can be utilized efficiently
Basic Concepts
 Maximum CPU utilization obtained with
multiprogramming
 CPU–I/O Burst Cycle – Process execution
consists of a cycle of CPU execution and
I/O wait
 CPU burst followed by I/O burst
 CPU burst distribution is of main concern
For example
o cricket team
o printing document
o addition of two numbers
CPU scheduling terminology
 Burst time /execution time /running time:- is the time causes required for
running on CPU
 Waiting time:- time spent by a process in ready state waiting for CPU
 Arrival time:- When a process enters ready state
 Turnaround time:- total time spent by a process in the system and around time
equal to {exit time - arrival time} or {burst time + waiting time}
 Response time:- Time between a process enters ready queue and get
scheduled on the CPU for the first time
 Exit time:- when process completes execution and exit from system

Recommended for you

cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling

This document summarizes key concepts from Chapter 5 of the textbook "Operating System Concepts - 8th Edition" regarding CPU scheduling. It introduces CPU scheduling as the basis for multiprogrammed operating systems. Various scheduling algorithms are described such as first-come first-served, shortest job first, priority scheduling, and round robin. Criteria for evaluating scheduling algorithms include CPU utilization, throughput, turnaround time, waiting time, and response time. Ready queues can be partitioned into multiple levels with different scheduling policies to implement multilevel queue and feedback queue scheduling.

Process management in os
Process management in osProcess management in os
Process management in os

1. Process management is an integral part of operating systems for allocating resources, enabling information sharing, and protecting processes. The OS maintains data structures describing each process's state and resource ownership. 2. Processes go through discrete states and events can cause state changes. Scheduling selects processes to run from ready, device, and job queues using algorithms like round robin, shortest job first, and priority scheduling. 3. CPU scheduling aims to maximize utilization and throughput while minimizing waiting times using criteria like response time, turnaround time, and fairness between processes.

Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.

The document discusses CPU scheduling in operating systems. It describes how the CPU scheduler selects processes that are ready to execute and allocates the CPU to one of them. The goals of CPU scheduling are to maximize CPU utilization, minimize waiting times and turnaround times. Common CPU scheduling algorithms discussed are first come first serve (FCFS), shortest job first (SJF), priority scheduling, and round robin scheduling. Multilevel queue scheduling is also mentioned. Examples are provided to illustrate how each algorithm works.

operating systemcpu scheduling algosystems
Histogram of CPU-burst Times
CPU scheduling Algorithm
 Two approaches
1. Non-Preemptive Scheduling:
2. Preemptive Scheduling:
 Non-preemptive
 Once resources(CPU Cycle) are allocated to a process, the process holds it till it completes its burst time or switches
to waiting state
 Process can not be interrupted until it terminates itself or its time is up.
 Rigid, not cost association
 Preemptive
 In this resources(CPU Cycle) are allocated to a process for a limited time
 Process can be interrupted in between.
 Flexible and cost associated
Scheduling Algorithm Optimization Criteria
 Max CPU utilization
 Max throughput
 Min turnaround time
 Min waiting time
 Min response time
First Come First serve (FCFS)
 It assign CPU to the process which arrives first
 Easy to understand and can easily be implemented using queue data structure
 Allows non-pre-emptive in nature

Recommended for you

OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts

Gives an overview about Process, PCB, Process States, Process Operations, Scheduling, Schedulers, Interprocess communication, shared memory and message passing systems

processpcbprocess control block
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First

The document discusses the Shortest Job First (SJF) CPU scheduling algorithm. SJF is a preemptive scheduling policy that selects the waiting process with the shortest execution time/burst time to execute next. The algorithm involves sorting processes by arrival time and selecting the process with the shortest burst time. An example shows the Gantt chart and calculations for average turnaround time and waiting time using SJF. Advantages include shorter jobs being favored and minimum average waiting time, while disadvantages are potential starvation of longer jobs and inability for short-term CPU scheduling.

pptpdfsjf
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
First- Come, First-Served (FCFS) Scheduling
Process Burst Time
P1 24
P2 3
P3 3
 Suppose that the processes arrive in the order: P1 , P2 , P3
The Gantt Chart for the schedule is:
 Waiting time for P1 = 0; P2 = 24; P3 = 27
 Average waiting time: (0 + 24 + 27)/3 = 17
P P P1 2 3
0 24 3027
A Gantt chart is a horizontal bar chart
developed as a production control tool in
1917 by Henry L. Gantt,
an American engineer and social scientist
Solve this
Pid AT BT TAT WT
A 3 4
B 5 3
C 0 2
D 5 1
E 4 3
Create Gantt Chart
Calculate Waiting Time of each and
average waiting time
Convoy Effect
Pid AT BT WT AWT
P1 0 100 0
P2 1 1 99
Create Gantt Chart
Pid AT BT WT AWT
P1 1 100 1
P2 0 1 0
Create Gantt Chart
Smaller process have to wait for long time for bigger process to release CPU
Advantages
 Easy to learn
 Easy to understand
 Easy to implement
 We used for background process where execution is not urgent

Recommended for you

Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling

CPU scheduling more complex when multiple CPUs are available Homogeneous processors within a multiprocessor Asymmetric multiprocessing – only one processor accesses the system data structures, alleviating the need for data sharing Symmetric multiprocessing (SMP) – each processor is self-scheduling, all processes in common ready queue, or each has its own private queue of ready processes Currently, most common Processor affinity – process has affinity for processor on which it is currently running soft affinity hard affinity Variations including processor sets

vaibhav khannaoperating system
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling

Maximum CPU utilization obtained with multiprogramming CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait CPU burst followed by I/O burst CPU burst distribution is of main concern

CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2

UNIT II PROCESS MANAGEMENT Processes-Process Concept, Process Scheduling, Operations on Processes, Interprocess Communication; Threads- Overview, Multicore Programming, Multithreading Models; Windows 7 - Thread and SMP Management. Process Synchronization - Critical Section Problem, Mutex Locks, Semophores, Monitors; CPU Scheduling and Deadlocks.

Disadvantages
 Suffer from Convoy effect
 Normally long average waiting time
 No consideration to burst time or arrival time/Priority
 Should not be used for interactive system
Shortest job first (non-preemptive) shortest
remaining time first(SRTF) (preemptive)
 Out of all available process CPU is assigned to the process having smallest burst time
requirement no priority, no seniority
 If there is tie first Come First serve is used to break tie
 Can we used both with non primitive and primitive approach
 Primitive version STRF is also called as optimal as it currently minimum average waiting
time
Example of SJF
Process Arrivall Time Burst Time
P1 1 6
P2 2 8
P3 4 7
P4 0 3
 SJF scheduling chart
 Average waiting time = (3 + 16 + 9 + 0) / 4 = 7
P3
0 3 24
P4
P1
169
P2
SJF (non-preemptive)
Pid AT BT TAT WT
A 3 1
B 1 4
C 4 2
D 0 6
E 2 3
Create Gantt Chart
Calculate Waiting Time of Processes

Recommended for you

Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx

Round Robin is a preemptive scheduling algorithm where each process is allocated an equal time slot or time quantum to execute before being preempted. It is designed for time-sharing to ensure all processes are given a fair share of CPU time without starvation. The process is added to the back of the ready queue when its time slice expires. It provides low response time on average but increased context switching overhead compared to non-preemptive algorithms. The time quantum value impacts both processor utilization and response time.

operating system
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve

First come first serve. A simple slide demonstration of FCFS regarding Operating System subject Computer Applications

computersoftware development
Operating Systems - "Chapter 4: Multithreaded Programming"
Operating Systems - "Chapter 4:  Multithreaded Programming"Operating Systems - "Chapter 4:  Multithreaded Programming"
Operating Systems - "Chapter 4: Multithreaded Programming"

This chapter discusses multithreaded programming and threads. It defines a thread as the basic unit of CPU utilization that allows multiple tasks to run concurrently within a process by sharing the process's resources. Different threading models like many-to-one, one-to-one, and many-to-many are described based on how user threads map to kernel threads. Common thread libraries for POSIX, Windows, and Java are also covered. The chapter examines issues in multithreaded programming and provides examples of how threads are implemented in Windows and Linux.

multithreaded programmingoperating systemsmultithreaded
Example of Shortest-remaining-time-first
 Now we add the concepts of varying arrival times and preemption to
the analysis
Process Arrival Time Burst Time
P1 0 8
P2 1 4
P3 2 9
P4 3 5
 Preemptive SJF Gantt Chart
 Average waiting time = [(10-1)+(1-1)+(17-2)+5-3)]/4 = 26/4 = 6.5
P4
0 1 26
P1
P2
10
P3
P1
5 17
SRTF(Pre-emptive)
Pid AT BT TAT WT
A 3 4
B 5 3
C 0 2
D 5 1
E 4 3
Create Gantt Chart
Calculate Waiting Time of Processes
Advantages and disadvantages of shortest job
first scheduling algorithm
Advantages
 SRTF guarantees minimal average waiting
time
 Standard for other algorithm in terms of
average waiting time
 Better Average response time compare to
First Come First serve
Disadvantages
 Algorithm cannot be implemented as there
is no way to know the burst time of a
process
 Process with the longest CPU burst time
requirement will go into starvation
 No idea of priority, process with large burst
time have work response time
Priority Algorithm
 Here a priority is associated with each process
 At any instance of time out of all available process, CPU is allocated to the process
which posses the highest Priority
 Tie is broken with FCFS order
 No importance to arrival time or burst time
 Supports both non pre-emptive and pre-emptive version

Recommended for you

Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms

This document presents an overview of priority scheduling algorithms. It discusses basic concepts of scheduling, criteria like CPU utilization and turnaround time. It provides an example of priority scheduling with and without preemption. Advantages include ease of use and suitability for varying time requirements. A disadvantage is potential indefinite blocking of low priority processes.

cpu scheduling algorithmssjffcfs
Desktop and multiprocessor systems
Desktop and multiprocessor systemsDesktop and multiprocessor systems
Desktop and multiprocessor systems

This document discusses desktop systems and multiprocessor systems. For desktop systems, it describes them as personal computers dedicated to single users, with keyboards, mice, displays and small printers. It notes they run operating systems like Windows, MacOS, UNIX and Linux. For multiprocessor systems, it defines them as having multiple processors that share clocks, memory and buses. Symmetric multiprocessors have similar operating systems on each processor, while asymmetric ones have predefined master-slave roles. Multiprocessor systems provide advantages like reliability, throughput and cost-effectiveness, but require more memory, expense and complex operating systems.

desktop systemsmulti processor system
Process scheduling
Process schedulingProcess scheduling
Process scheduling

Hello.... Dear views Scheduling is most important Role in OS..... in this ppt i described very Creatively about Process Scheduling...... I hope you like it..... and easily understand it...... :-) :-)

Continue..
 A priority number (integer) is associated with each process
 The CPU is allocated to the process with the highest priority
 Preemptive
 Non-preemptive
 SJF is priority scheduling where priority is the inverse of predicted
next CPU burst time
 Problem  Starvation – low priority processes may never execute
 Solution  Aging – as time progresses increase the priority of the
process
Example of Priority
Scheduling(Non-preemptive)
Process Arrival Time Burst Time Priority
P1 1 10 5
P2 0 1 3
P3 2 2 5
P4 3 1 4
P5 1 5 7
Priority scheduling Gantt Chart
 Average waiting time
Non Pre-emptive
Pid AT BT Priority TAT WT
P1 0 4 2
P2 1 3 3
P3 2 1 4
P4 3 5 5
P5 4 2 5
Create Gantt Chart
Calculate Waiting Time of Processes
Pre-emptive
Pid AT BT Priority TAT WT
P1 0 4 2
P2 1 3 3
P3 2 1 4
P4 3 5 5
P5 4 2 5
Create Gantt Chart
Calculate Waiting Time of Processes

Recommended for you

Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling

Operating System presentation on priority Scheduling, Queue Scheduling and multi level feedback scheduling with examples.

priority schedulingqueue schedulingmultilevelfeedback scheduling
Scheduling
SchedulingScheduling
Scheduling

Scheduling is a method used to allocate computing resources like processor time, bandwidth, and memory to processes, threads, and applications. It aims to balance system load, ensure equal distribution of resources, and prioritize processes according to set rules. There are different types of scheduling including long-term, medium-term, and short-term scheduling. Scheduling algorithms decide which process from the ready queue is allocated the CPU based on whether the policy is preemptive or non-preemptive. Common algorithms include first-come first-served, shortest job first, priority scheduling, and round-robin scheduling.

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

Advantages and disadvantages of priority
scheduling algorithm
Advantages
 Provide a facility of priority specially for
system process
 Allows to run important process first even
if it is a user process
Disadvantages
 Here process with smaller priority may
starve for CPU
 No idea of response time or waiting time
 Note aging is a technique of gradually
increasing the priority of process that wait
in the system for long time
Round Robin (RR)
 Each process gets a small unit of CPU time (time quantum q),
usually 10-100 milliseconds. After this time has elapsed, the
process is preempted and added to the end of the ready queue.
 If there are n processes in the ready queue and the time quantum
is q, then each process gets 1/n of the CPU time in chunks of at
most q time units at once. No process waits more than (n-1)q
time units.
 Timer interrupts every quantum to schedule next process
 Performance
 q large  FIFO
 q small  q must be large with respect to context switch, otherwise
overhead is too high
Continue.
 It is design for time sharing system where it is not necessary to complete one process
and then start another, but to be responsive and divide time of CPU among the
process in the ready state
 Here ready q to be treated as circular queue
 We will fix the time quantum up to which process can hold the CPU in one go within
which either a process terminates or process must release the CPU and re-enter in the
circular queue and wait for the next chance
 Round Robin is called preemptive in nature
Example of RR with Time Quantum =
4
Process Burst Time
P1 24
P2 3
P3 3
 The Gantt chart is:
 Typically, higher average turnaround than SJF, but better response
 q should be large compared to context switch time
 q usually 10ms to 100ms, context switch < 10 usec
P P P1 1 1
0 18 3026144 7 10 22
P2
P3
P1
P1
P1

Recommended for you

Cpu Scheduling Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin

The document discusses various CPU scheduling algorithms used in operating systems. It describes the main objective of CPU scheduling as maximizing CPU utilization by allowing multiple processes to share the CPU. It then explains different scheduling criteria like throughput, turnaround time, waiting time and response time. Finally, it summarizes common scheduling algorithms like first come first served, shortest job first, priority scheduling and round robin scheduling.

CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling

CPU Scheduling is a function on which our operating system word This presentation contain all of the types of scheduling

cpu scheduling and its types
Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling

The document discusses processes and process scheduling in operating systems. It defines a process as a program in execution that contains a program counter, stack, and data section. Processes can be in various states like new, ready, running, waiting, and terminated. A process control block contains information about each process like its state, program counter, memory allocation, and more. Scheduling aims to optimize CPU utilization, throughput, turnaround time, waiting time, and response time using algorithms like first come first serve, shortest job first, priority, and round robin scheduling.

operating systemeducationos
Pre-emptive
Pid AT BT TAT WT
A 0 5
B 1 3
C 2 1
D 3 2
E 4 3
TQ=2
Create Queue
Create Gantt Chart
Calculate Waiting Time of Processes
Advantages and disadvantages of Round Robin
scheduling algorithm
 Advantages
 Perform best in terms of average response
time
 Works well in call to time sharing system,
client server architecture and interactive
system
 Kind of shortest job first implementation
 Disadvantages
 Longer process may starve
 Performance depends heavily on time
Quantum
 No idea of reality
1. The following is the set of processes whose arrival time, burst time and the priorities are given
below:
S.No. Process Arrival time (in ms) Bunt Time(in ms) Priority
1 P1 0 10 5
2 P2 0 5 2
3 P3 2 3 1
4 P4 5 20 4
5 P5 10 2 3
If Shortest job first ( vith pre-emption) scheduling policy and Priority scheduling policy(with pre-
emption) is used then, what will be the average waiting time in both the cases?
Ops:
A. 5.6 ms, 8 ms
B. None of the mentioned options
C. 6.8 ms, 7.6 ms
D. 0 5.6 ms, 7.6 ms
Question

More Related Content

What's hot

Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
Chankey Pathak
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
nikeAthena
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
Mukesh Chinta
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
hashim102
 
Process management in os
Process management in osProcess management in os
Process management in os
Miong Lazaro
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
Ravi Kumar Patel
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
Mukesh Chinta
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
ShubhamGupta345141
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Riya Choudhary
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
Vaibhav Khanna
 
Process Scheduling
Process SchedulingProcess Scheduling
CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2
Kathirvel Ayyaswamy
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
Sanad Bhowmik
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
Edwin Makeu
 
Operating Systems - "Chapter 4: Multithreaded Programming"
Operating Systems - "Chapter 4:  Multithreaded Programming"Operating Systems - "Chapter 4:  Multithreaded Programming"
Operating Systems - "Chapter 4: Multithreaded Programming"
Ra'Fat Al-Msie'deen
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
Daffodil International University
 
Desktop and multiprocessor systems
Desktop and multiprocessor systemsDesktop and multiprocessor systems
Desktop and multiprocessor systems
V.V.Vanniaperumal College for Women
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
Deepika Balichwal
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
JawadHaider36
 
Scheduling
SchedulingScheduling

What's hot (20)

Scheduling algorithms
Scheduling algorithmsScheduling algorithms
Scheduling algorithms
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
cpu scheduling
cpu schedulingcpu scheduling
cpu scheduling
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Cpu scheduling in operating System.
Cpu scheduling in operating System.Cpu scheduling in operating System.
Cpu scheduling in operating System.
 
OS - Process Concepts
OS - Process ConceptsOS - Process Concepts
OS - Process Concepts
 
Shortest Job First
Shortest Job FirstShortest Job First
Shortest Job First
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Operating system 31 multiple processor scheduling
Operating system 31 multiple processor schedulingOperating system 31 multiple processor scheduling
Operating system 31 multiple processor scheduling
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2CS6401 OPERATING SYSTEMS Unit 2
CS6401 OPERATING SYSTEMS Unit 2
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
 
First Come First Serve
First Come First ServeFirst Come First Serve
First Come First Serve
 
Operating Systems - "Chapter 4: Multithreaded Programming"
Operating Systems - "Chapter 4:  Multithreaded Programming"Operating Systems - "Chapter 4:  Multithreaded Programming"
Operating Systems - "Chapter 4: Multithreaded Programming"
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
 
Desktop and multiprocessor systems
Desktop and multiprocessor systemsDesktop and multiprocessor systems
Desktop and multiprocessor systems
 
Process scheduling
Process schedulingProcess scheduling
Process scheduling
 
Priority Scheduling
Priority Scheduling  Priority Scheduling
Priority Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 

Similar to CPU scheduling

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 Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin
Sonali Chauhan
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
M. Abdullah Wasif
 
Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
Vishnu Prasad
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
sammerkhan1
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
tech2click
 
Operating systems - Processes Scheduling
Operating systems - Processes  SchedulingOperating systems - Processes  Scheduling
Operating systems - Processes Scheduling
Chandrakant Divate
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
Harshit Jain
 
CH06.pdf
CH06.pdfCH06.pdf
CH06.pdf
ImranKhan880955
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
jamilaltiti1
 
OSCh6
OSCh6OSCh6
OS_Ch6
OS_Ch6OS_Ch6
CPU Scheduling.pdf
CPU Scheduling.pdfCPU Scheduling.pdf
Ch5
Ch5Ch5
Ch6
Ch6Ch6
Ch6
C.U
 
Fcfs and sjf
Fcfs and sjfFcfs and sjf
Fcfs and sjf
A. S. M. Shafi
 
Os..
Os..Os..
Os..
pri534
 
Csc4320 chapter 5 2
Csc4320 chapter 5 2Csc4320 chapter 5 2
Csc4320 chapter 5 2
pri534
 
Unit iios process scheduling and synchronization
Unit iios process scheduling and synchronizationUnit iios process scheduling and synchronization
Unit iios process scheduling and synchronization
donny101
 
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdf
Rakibul Rakib
 

Similar to CPU scheduling (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 Galvin
Cpu Scheduling GalvinCpu Scheduling Galvin
Cpu Scheduling Galvin
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
Operating System 5
Operating System 5Operating System 5
Operating System 5
 
Operating systems - Processes Scheduling
Operating systems - Processes  SchedulingOperating systems - Processes  Scheduling
Operating systems - Processes Scheduling
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
CH06.pdf
CH06.pdfCH06.pdf
CH06.pdf
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
 
OSCh6
OSCh6OSCh6
OSCh6
 
OS_Ch6
OS_Ch6OS_Ch6
OS_Ch6
 
CPU Scheduling.pdf
CPU Scheduling.pdfCPU Scheduling.pdf
CPU Scheduling.pdf
 
Ch5
Ch5Ch5
Ch5
 
Ch6
Ch6Ch6
Ch6
 
Fcfs and sjf
Fcfs and sjfFcfs and sjf
Fcfs and sjf
 
Os..
Os..Os..
Os..
 
Csc4320 chapter 5 2
Csc4320 chapter 5 2Csc4320 chapter 5 2
Csc4320 chapter 5 2
 
Unit iios process scheduling and synchronization
Unit iios process scheduling and synchronizationUnit iios process scheduling and synchronization
Unit iios process scheduling and synchronization
 
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdf
 

Recently uploaded

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
 
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
 
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
 
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
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Bert Blevins
 
Biology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtuBiology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtu
santoshpatilrao33
 
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model SafePaharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
aarusi sexy model
 
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
Anwar Patel
 
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdfGUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
ProexportColombia1
 
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
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
Kamal Acharya
 
Introduction to neural network (Module 1).pptx
Introduction to neural network (Module 1).pptxIntroduction to neural network (Module 1).pptx
Introduction to neural network (Module 1).pptx
archanac21
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
Muanisa Waras
 
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
 
@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
Escorts service
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
Tool and Die Tech
 
( 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
 
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
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
byyi0h
 
( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile
butwhat24
 

Recently uploaded (20)

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
 
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
 
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
 
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
 
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and PreventionUnderstanding Cybersecurity Breaches: Causes, Consequences, and Prevention
Understanding Cybersecurity Breaches: Causes, Consequences, and Prevention
 
Biology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtuBiology for computer science BBOC407 vtu
Biology for computer science BBOC407 vtu
 
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model SafePaharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
Paharganj @ℂall @Girls ꧁❤ 9873777170 ❤꧂VIP Arti Singh Top Model Safe
 
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K SchemeMSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme MSBTE K Scheme
 
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdfGUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
GUIA_LEGAL_CHAPTER_4_FOREIGN TRADE CUSTOMS.pdf
 
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
 
Social media management system project report.pdf
Social media management system project report.pdfSocial media management system project report.pdf
Social media management system project report.pdf
 
Introduction to neural network (Module 1).pptx
Introduction to neural network (Module 1).pptxIntroduction to neural network (Module 1).pptx
Introduction to neural network (Module 1).pptx
 
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdfOCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
OCS Training - Rig Equipment Inspection - Advanced 5 Days_IADC.pdf
 
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
 
@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
@Call @Girls Siliguri 🚒 XXXXXXXXXX 🚒 Priya Sharma Beautiful And Cute Girl any...
 
Vernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsxVernier Caliper and How to use Vernier Caliper.ppsx
Vernier Caliper and How to use Vernier Caliper.ppsx
 
( 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
 
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
 
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
一比一原版(UQ毕业证书)昆士兰大学毕业证如何办理
 
( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile( Call  ) Girls Noida 9873940964 High Profile
( Call  ) Girls Noida 9873940964 High Profile
 

CPU scheduling

  • 2. CPU scheduling  A process execution consist office cycle of CPU execution and input output execution  Every process begins with CPU burst that may be followed by input output bus, then another CPU burst and then input output burst and so on eventually in the last will end up on CPU burst  CPU burst there are those processes which require most of time on CPU  Input output bus which require most of the time on input output devices for peripherals  A good CPU scheduling idea should choose the mixture of both so that both input and output devices and CPU can be utilized efficiently
  • 3. Basic Concepts  Maximum CPU utilization obtained with multiprogramming  CPU–I/O Burst Cycle – Process execution consists of a cycle of CPU execution and I/O wait  CPU burst followed by I/O burst  CPU burst distribution is of main concern For example o cricket team o printing document o addition of two numbers
  • 4. CPU scheduling terminology  Burst time /execution time /running time:- is the time causes required for running on CPU  Waiting time:- time spent by a process in ready state waiting for CPU  Arrival time:- When a process enters ready state  Turnaround time:- total time spent by a process in the system and around time equal to {exit time - arrival time} or {burst time + waiting time}  Response time:- Time between a process enters ready queue and get scheduled on the CPU for the first time  Exit time:- when process completes execution and exit from system
  • 6. CPU scheduling Algorithm  Two approaches 1. Non-Preemptive Scheduling: 2. Preemptive Scheduling:  Non-preemptive  Once resources(CPU Cycle) are allocated to a process, the process holds it till it completes its burst time or switches to waiting state  Process can not be interrupted until it terminates itself or its time is up.  Rigid, not cost association  Preemptive  In this resources(CPU Cycle) are allocated to a process for a limited time  Process can be interrupted in between.  Flexible and cost associated
  • 7. Scheduling Algorithm Optimization Criteria  Max CPU utilization  Max throughput  Min turnaround time  Min waiting time  Min response time
  • 8. First Come First serve (FCFS)  It assign CPU to the process which arrives first  Easy to understand and can easily be implemented using queue data structure  Allows non-pre-emptive in nature
  • 9. First- Come, First-Served (FCFS) Scheduling Process Burst Time P1 24 P2 3 P3 3  Suppose that the processes arrive in the order: P1 , P2 , P3 The Gantt Chart for the schedule is:  Waiting time for P1 = 0; P2 = 24; P3 = 27  Average waiting time: (0 + 24 + 27)/3 = 17 P P P1 2 3 0 24 3027 A Gantt chart is a horizontal bar chart developed as a production control tool in 1917 by Henry L. Gantt, an American engineer and social scientist
  • 10. Solve this Pid AT BT TAT WT A 3 4 B 5 3 C 0 2 D 5 1 E 4 3 Create Gantt Chart Calculate Waiting Time of each and average waiting time
  • 11. Convoy Effect Pid AT BT WT AWT P1 0 100 0 P2 1 1 99 Create Gantt Chart Pid AT BT WT AWT P1 1 100 1 P2 0 1 0 Create Gantt Chart Smaller process have to wait for long time for bigger process to release CPU
  • 12. Advantages  Easy to learn  Easy to understand  Easy to implement  We used for background process where execution is not urgent
  • 13. Disadvantages  Suffer from Convoy effect  Normally long average waiting time  No consideration to burst time or arrival time/Priority  Should not be used for interactive system
  • 14. Shortest job first (non-preemptive) shortest remaining time first(SRTF) (preemptive)  Out of all available process CPU is assigned to the process having smallest burst time requirement no priority, no seniority  If there is tie first Come First serve is used to break tie  Can we used both with non primitive and primitive approach  Primitive version STRF is also called as optimal as it currently minimum average waiting time
  • 15. Example of SJF Process Arrivall Time Burst Time P1 1 6 P2 2 8 P3 4 7 P4 0 3  SJF scheduling chart  Average waiting time = (3 + 16 + 9 + 0) / 4 = 7 P3 0 3 24 P4 P1 169 P2
  • 16. SJF (non-preemptive) Pid AT BT TAT WT A 3 1 B 1 4 C 4 2 D 0 6 E 2 3 Create Gantt Chart Calculate Waiting Time of Processes
  • 17. Example of Shortest-remaining-time-first  Now we add the concepts of varying arrival times and preemption to the analysis Process Arrival Time Burst Time P1 0 8 P2 1 4 P3 2 9 P4 3 5  Preemptive SJF Gantt Chart  Average waiting time = [(10-1)+(1-1)+(17-2)+5-3)]/4 = 26/4 = 6.5 P4 0 1 26 P1 P2 10 P3 P1 5 17
  • 18. SRTF(Pre-emptive) Pid AT BT TAT WT A 3 4 B 5 3 C 0 2 D 5 1 E 4 3 Create Gantt Chart Calculate Waiting Time of Processes
  • 19. Advantages and disadvantages of shortest job first scheduling algorithm Advantages  SRTF guarantees minimal average waiting time  Standard for other algorithm in terms of average waiting time  Better Average response time compare to First Come First serve Disadvantages  Algorithm cannot be implemented as there is no way to know the burst time of a process  Process with the longest CPU burst time requirement will go into starvation  No idea of priority, process with large burst time have work response time
  • 20. Priority Algorithm  Here a priority is associated with each process  At any instance of time out of all available process, CPU is allocated to the process which posses the highest Priority  Tie is broken with FCFS order  No importance to arrival time or burst time  Supports both non pre-emptive and pre-emptive version
  • 21. Continue..  A priority number (integer) is associated with each process  The CPU is allocated to the process with the highest priority  Preemptive  Non-preemptive  SJF is priority scheduling where priority is the inverse of predicted next CPU burst time  Problem  Starvation – low priority processes may never execute  Solution  Aging – as time progresses increase the priority of the process
  • 22. Example of Priority Scheduling(Non-preemptive) Process Arrival Time Burst Time Priority P1 1 10 5 P2 0 1 3 P3 2 2 5 P4 3 1 4 P5 1 5 7 Priority scheduling Gantt Chart  Average waiting time
  • 23. Non Pre-emptive Pid AT BT Priority TAT WT P1 0 4 2 P2 1 3 3 P3 2 1 4 P4 3 5 5 P5 4 2 5 Create Gantt Chart Calculate Waiting Time of Processes
  • 24. Pre-emptive Pid AT BT Priority TAT WT P1 0 4 2 P2 1 3 3 P3 2 1 4 P4 3 5 5 P5 4 2 5 Create Gantt Chart Calculate Waiting Time of Processes
  • 25. Advantages and disadvantages of priority scheduling algorithm Advantages  Provide a facility of priority specially for system process  Allows to run important process first even if it is a user process Disadvantages  Here process with smaller priority may starve for CPU  No idea of response time or waiting time  Note aging is a technique of gradually increasing the priority of process that wait in the system for long time
  • 26. Round Robin (RR)  Each process gets a small unit of CPU time (time quantum q), usually 10-100 milliseconds. After this time has elapsed, the process is preempted and added to the end of the ready queue.  If there are n processes in the ready queue and the time quantum is q, then each process gets 1/n of the CPU time in chunks of at most q time units at once. No process waits more than (n-1)q time units.  Timer interrupts every quantum to schedule next process  Performance  q large  FIFO  q small  q must be large with respect to context switch, otherwise overhead is too high
  • 27. Continue.  It is design for time sharing system where it is not necessary to complete one process and then start another, but to be responsive and divide time of CPU among the process in the ready state  Here ready q to be treated as circular queue  We will fix the time quantum up to which process can hold the CPU in one go within which either a process terminates or process must release the CPU and re-enter in the circular queue and wait for the next chance  Round Robin is called preemptive in nature
  • 28. Example of RR with Time Quantum = 4 Process Burst Time P1 24 P2 3 P3 3  The Gantt chart is:  Typically, higher average turnaround than SJF, but better response  q should be large compared to context switch time  q usually 10ms to 100ms, context switch < 10 usec P P P1 1 1 0 18 3026144 7 10 22 P2 P3 P1 P1 P1
  • 29. Pre-emptive Pid AT BT TAT WT A 0 5 B 1 3 C 2 1 D 3 2 E 4 3 TQ=2 Create Queue Create Gantt Chart Calculate Waiting Time of Processes
  • 30. Advantages and disadvantages of Round Robin scheduling algorithm  Advantages  Perform best in terms of average response time  Works well in call to time sharing system, client server architecture and interactive system  Kind of shortest job first implementation  Disadvantages  Longer process may starve  Performance depends heavily on time Quantum  No idea of reality
  • 31. 1. The following is the set of processes whose arrival time, burst time and the priorities are given below: S.No. Process Arrival time (in ms) Bunt Time(in ms) Priority 1 P1 0 10 5 2 P2 0 5 2 3 P3 2 3 1 4 P4 5 20 4 5 P5 10 2 3 If Shortest job first ( vith pre-emption) scheduling policy and Priority scheduling policy(with pre- emption) is used then, what will be the average waiting time in both the cases? Ops: A. 5.6 ms, 8 ms B. None of the mentioned options C. 6.8 ms, 7.6 ms D. 0 5.6 ms, 7.6 ms Question