SlideShare ist ein Scribd-Unternehmen logo
1 von 24
PROCESS
SCHEDULING
Contents
 Introduction
 Process behavior for Scheduling
 Scheduling levels
 Process Scheduling Goals
 Scheduling Algorithms
Introduction
In computer science, scheduling is the method
by which processes or data flows are given
access to system resources. This is usually
done to share system resources effectively or
achieve a target quality of service. The need for
a scheduling algorithm arises from the
requirement for most modern systems to
perform multitasking (executing more than one
process at a time).
Process Behaviour For
Scheduling
CPU BURST-when a process has long
computations to be executed by the processor.
I/O BURST-The occurrence of I/O operation.
CPU BOUND-process with intensive CPU-burst i.e.,
longer CPU cycles and a low number of I/O bursts
I/O BOUND-process has a large number of frequent
I/O bursts within the smaller CPU-bursts
Scheduling Levels
 Long-term scheduling
 Medium-term scheduling
 Short-term scheduling
Long-term scheduling
 Long-term scheduling is done when a new
process is created. It initiates processes and
so controls the degree of multi-programming
(number of processes in memory).
Medium term scheduling
Medium-term scheduling involves suspending or resuming
processes by swapping (rolling) them out of or into
memory
Short term scheduling
 Short-term (process or CPU) scheduling
occurs most frequently and decides which
process to execute next.
Process Scheduling Goals
The goals of scheduling may be categorised as
user-based scheduling goals and system-based
scheduling goals.
User based goals are the criteria that benefit the
user. For e.g. a user in a multi user environment
expects the system to give quick response to the
job.
System based goals are the criteria that benefit the
system, i.e., performance of the system. For e.g.
how much the processor is being utilized in
processing the processes.
User-Based Scheduling Goals:
 Turnaround time –time to execute a process: from start
to completion i.e. sum of
 Waiting time,
 Executing time
 Blocked waiting for an event, for example waiting for I/O
 Waiting time – time in Ready queue, directly impacted by
scheduling algorithm.
 Response time – time from submission of request to
production of first response.
 Predictability – prediction about completion time of a
process by human mind.
System-Based Scheduling
Goals:
 Throughput – number of processes that
complete their execution per unit time
 CPU utilization – percent time CPU busy
 Fairness – all processes should be treated
equal, until priority is set
 Balance – there should be a balance between
I/O bound and CPU bound processes.
Scheduling Algorithms
 First Come First Served(FCFS)
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
P1 P2 P3
0 24 27 30
First Come First Serve
 The arriving process is added onto the tail of
the queue and the process at the head of the
queue is dispatched to the processor for
execution.
 A process that has been interrupted by any
means does not maintain its previous order in
the ready queue.
Priority Scheduling
The processes are executed according to the
priority.
1.Priority number based scheduling
In it preference is given to the processes, based
on a priority number assigned to it.
2.Shortest Process Next(SPN)
The process with the shortest execution time is
executed first . It is non-pre-emptive scheduling
algorithm.
Shortest Remaining Time
Next(SRN)
This algorithm also considers the execution time
of processes as in SPN. but it is a pre-
emptive version of SPN.
Round Robin Scheduling
 Time slices are assigned to each process in
equal portions and in circular order, handling
all processes without priority.
 The design is such that whenever a process
finishes before the time slice expires, the
timer will stop and send the interrupt signal
,so that the next process can be scheduled.
Improved Round Robin
Scheduling
CPU consumption ratio=Actual CPU time
consumed/total estimated execution time
Schedule a process if its CPU consumption
ratio is greater than 0.60, else schedule a
process whose CPU consumption ratio is
minimum.
Highest Response Ratio
Next(HRRN)
Response ratio= time elapsed in the
system/CPU time consumed by the process
Multilevel Queue Scheduling
 When processes can be readily categorized, then multiple
separate queues can be established, each implementing
whatever scheduling algorithm is most appropriate for that type
of job, and/or with different parametric adjustments.
 Scheduling must also be done between queues, that is
scheduling one queue to get time relative to other queues. Two
common options are strict priority ( no job in a lower priority
queue runs until all higher priority queues are empty ) and round-
robin ( each queue gets a time slice in turn, possibly of different
sizes. )
 Note that under this algorithm jobs cannot switch from queue to
queue - Once they are assigned a queue, that is their queue until
they finish.
Multilevel Feedback-Queue
Scheduling
 Multilevel feedback queue scheduling is similar to the ordinary multilevel queue
scheduling described above, except jobs may be moved from one queue to another
for a variety of reasons:
 If the characteristics of a job change between CPU-intensive and I/O intensive, then it
may be appropriate to switch a job from one queue to another.
 Aging can also be incorporated, so that a job that has waited for a long time can get
bumped up into a higher priority queue for a while.
 Multilevel feedback queue scheduling is the most flexible, because it can be tuned for
any situation. But it is also the most complex to implement because of all the
adjustable parameters. Some of the parameters which define one of these systems
include:
 The number of queues.
 The scheduling algorithm for each queue.
 The methods used to upgrade or demote processes from one queue to another. ( Which
may be different. )
 The method used to determine which queue a process enters initially.
Fair-share scheduling
Fair-share scheduling is a scheduling strategy
for computer operating systems in which
the CPU usage is equally distributed among
system users or groups, as opposed to equal
distribution among processes.
Lottery scheduling
 In Lottery Scheduling processes are each assigned
some number of lottery tickets, and the scheduler draws a
random ticket to select the next process. The distribution
of tickets need not be uniform; granting a process more
tickets provides it a relative higher chance of selection.
This technique can be used to approximate other
scheduling algorithms, such as Shortest job next and Fair-
share scheduling.
 Lottery scheduling solves the problem of starvation.
Giving each process at least one lottery ticket guarantees
that it has non-zero probability of being selected at each
scheduling operation.

Weitere ähnliche Inhalte

Was ist angesagt? (20)

SCHEDULING ALGORITHMS
SCHEDULING ALGORITHMSSCHEDULING ALGORITHMS
SCHEDULING ALGORITHMS
 
Scheduling
SchedulingScheduling
Scheduling
 
Operating System-Process Scheduling
Operating System-Process SchedulingOperating System-Process Scheduling
Operating System-Process Scheduling
 
Process synchronization
Process synchronizationProcess synchronization
Process synchronization
 
Operating Systems Process Scheduling Algorithms
Operating Systems   Process Scheduling AlgorithmsOperating Systems   Process Scheduling Algorithms
Operating Systems Process Scheduling Algorithms
 
Priority scheduling algorithms
Priority scheduling algorithmsPriority scheduling algorithms
Priority scheduling algorithms
 
Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)Process scheduling (CPU Scheduling)
Process scheduling (CPU Scheduling)
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Computer architecture pipelining
Computer architecture pipeliningComputer architecture pipelining
Computer architecture pipelining
 
Process state in OS
Process state in OSProcess state in OS
Process state in OS
 
Memory Management in OS
Memory Management in OSMemory Management in OS
Memory Management in OS
 
Process synchronization in Operating Systems
Process synchronization in Operating SystemsProcess synchronization in Operating Systems
Process synchronization in Operating Systems
 
Processes and threads
Processes and threadsProcesses and threads
Processes and threads
 
DeadLock in Operating-Systems
DeadLock in Operating-SystemsDeadLock in Operating-Systems
DeadLock in Operating-Systems
 
Mainframe systems
Mainframe systemsMainframe systems
Mainframe systems
 
Process management in os
Process management in osProcess management in os
Process management in os
 
Semophores and it's types
Semophores and it's typesSemophores and it's types
Semophores and it's types
 
Parallel processing
Parallel processingParallel processing
Parallel processing
 
Deadlock
DeadlockDeadlock
Deadlock
 
Flynns classification
Flynns classificationFlynns classification
Flynns classification
 

Andere mochten auch

Andere mochten auch (8)

Computer assembler
Computer assemblerComputer assembler
Computer assembler
 
Pervasive computing
Pervasive computingPervasive computing
Pervasive computing
 
Virtual reality
Virtual realityVirtual reality
Virtual reality
 
Internal memory
Internal memoryInternal memory
Internal memory
 
Key management and distribution
Key management and distributionKey management and distribution
Key management and distribution
 
Hcl
HclHcl
Hcl
 
Project report-on-lakme
Project report-on-lakmeProject report-on-lakme
Project report-on-lakme
 
SlideShare 101
SlideShare 101SlideShare 101
SlideShare 101
 

Ähnlich wie Process scheduling

Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System SchedulingVishnu Prasad
 
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 processesmanideepakc
 
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfRakibul Rakib
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptxjamilaltiti1
 
CPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationCPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationAnitaSofiaKeyser
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)Harshit Jain
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.pptKeyreSebre
 
Ch6
Ch6Ch6
Ch6C.U
 
Cpu scheduling(suresh)
Cpu scheduling(suresh)Cpu scheduling(suresh)
Cpu scheduling(suresh)Nagarajan
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Schedulingvampugani
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Shreya Kumar
 

Ähnlich wie Process scheduling (20)

Operating System Scheduling
Operating System SchedulingOperating System Scheduling
Operating System Scheduling
 
Cp usched 2
Cp usched  2Cp usched  2
Cp usched 2
 
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
 
Process Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdfProcess Scheduling Algorithms.pdf
Process Scheduling Algorithms.pdf
 
Preemptive process example.pptx
Preemptive process example.pptxPreemptive process example.pptx
Preemptive process example.pptx
 
CPU Scheduling
CPU SchedulingCPU Scheduling
CPU Scheduling
 
CPU scheduling in Operating System Explanation
CPU scheduling in Operating System ExplanationCPU scheduling in Operating System Explanation
CPU scheduling in Operating System Explanation
 
Cpu scheduling
Cpu schedulingCpu scheduling
Cpu scheduling
 
Scheduling algo(by HJ)
Scheduling algo(by HJ)Scheduling algo(by HJ)
Scheduling algo(by HJ)
 
Unit 2 notes
Unit 2 notesUnit 2 notes
Unit 2 notes
 
Operating System.pptx
Operating System.pptxOperating System.pptx
Operating System.pptx
 
chapter 5 CPU scheduling.ppt
chapter  5 CPU scheduling.pptchapter  5 CPU scheduling.ppt
chapter 5 CPU scheduling.ppt
 
ch_scheduling (1).ppt
ch_scheduling (1).pptch_scheduling (1).ppt
ch_scheduling (1).ppt
 
Ch6
Ch6Ch6
Ch6
 
Section05 scheduling
Section05 schedulingSection05 scheduling
Section05 scheduling
 
cpu scheduling.pdf
cpu scheduling.pdfcpu scheduling.pdf
cpu scheduling.pdf
 
Os unit 2
Os unit 2Os unit 2
Os unit 2
 
Cpu scheduling(suresh)
Cpu scheduling(suresh)Cpu scheduling(suresh)
Cpu scheduling(suresh)
 
Process Scheduling
Process SchedulingProcess Scheduling
Process Scheduling
 
Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.Process scheduling in Light weight weight and Heavy weight processes.
Process scheduling in Light weight weight and Heavy weight processes.
 

Kürzlich hochgeladen

ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfKamal Acharya
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesPrabhanshu Chaturvedi
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINESIVASHANKAR N
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduitsrknatarajan
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxAsutosh Ranjan
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...ranjana rawat
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingrakeshbaidya232001
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls in Nagpur High Profile
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college projectTonystark477637
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSISrknatarajan
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Dr.Costas Sachpazis
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingrknatarajan
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...ranjana rawat
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Call Girls in Nagpur High Profile
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGSIVASHANKAR N
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...Call Girls in Nagpur High Profile
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxpranjaldaimarysona
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsCall Girls in Nagpur High Profile
 

Kürzlich hochgeladen (20)

ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdfONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
ONLINE FOOD ORDER SYSTEM PROJECT REPORT.pdf
 
Glass Ceramics: Processing and Properties
Glass Ceramics: Processing and PropertiesGlass Ceramics: Processing and Properties
Glass Ceramics: Processing and Properties
 
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINEMANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
MANUFACTURING PROCESS-II UNIT-2 LATHE MACHINE
 
UNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular ConduitsUNIT-II FMM-Flow Through Circular Conduits
UNIT-II FMM-Flow Through Circular Conduits
 
Coefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptxCoefficient of Thermal Expansion and their Importance.pptx
Coefficient of Thermal Expansion and their Importance.pptx
 
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
(SHREYA) Chakan Call Girls Just Call 7001035870 [ Cash on Delivery ] Pune Esc...
 
Porous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writingPorous Ceramics seminar and technical writing
Porous Ceramics seminar and technical writing
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANJALI) Dange Chowk Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service NashikCall Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
Call Girls Service Nashik Vaishnavi 7001305949 Independent Escort Service Nashik
 
result management system report for college project
result management system report for college projectresult management system report for college project
result management system report for college project
 
UNIT-III FMM. DIMENSIONAL ANALYSIS
UNIT-III FMM.        DIMENSIONAL ANALYSISUNIT-III FMM.        DIMENSIONAL ANALYSIS
UNIT-III FMM. DIMENSIONAL ANALYSIS
 
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
Sheet Pile Wall Design and Construction: A Practical Guide for Civil Engineer...
 
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and workingUNIT-V FMM.HYDRAULIC TURBINE - Construction and working
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
 
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
(ANVI) Koregaon Park Call Girls Just Call 7001035870 [ Cash on Delivery ] Pun...
 
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...Top Rated  Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
Top Rated Pune Call Girls Budhwar Peth ⟟ 6297143586 ⟟ Call Me For Genuine Se...
 
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTINGMANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
MANUFACTURING PROCESS-II UNIT-1 THEORY OF METAL CUTTING
 
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...Booking open Available Pune Call Girls Koregaon Park  6297143586 Call Hot Ind...
Booking open Available Pune Call Girls Koregaon Park 6297143586 Call Hot Ind...
 
Processing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptxProcessing & Properties of Floor and Wall Tiles.pptx
Processing & Properties of Floor and Wall Tiles.pptx
 
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur EscortsRussian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
Russian Call Girls in Nagpur Grishma Call 7001035870 Meet With Nagpur Escorts
 

Process scheduling

  • 2. Contents  Introduction  Process behavior for Scheduling  Scheduling levels  Process Scheduling Goals  Scheduling Algorithms
  • 3. Introduction In computer science, scheduling is the method by which processes or data flows are given access to system resources. This is usually done to share system resources effectively or achieve a target quality of service. The need for a scheduling algorithm arises from the requirement for most modern systems to perform multitasking (executing more than one process at a time).
  • 4. Process Behaviour For Scheduling CPU BURST-when a process has long computations to be executed by the processor. I/O BURST-The occurrence of I/O operation. CPU BOUND-process with intensive CPU-burst i.e., longer CPU cycles and a low number of I/O bursts I/O BOUND-process has a large number of frequent I/O bursts within the smaller CPU-bursts
  • 5. Scheduling Levels  Long-term scheduling  Medium-term scheduling  Short-term scheduling
  • 6. Long-term scheduling  Long-term scheduling is done when a new process is created. It initiates processes and so controls the degree of multi-programming (number of processes in memory).
  • 7. Medium term scheduling Medium-term scheduling involves suspending or resuming processes by swapping (rolling) them out of or into memory
  • 8. Short term scheduling  Short-term (process or CPU) scheduling occurs most frequently and decides which process to execute next.
  • 9. Process Scheduling Goals The goals of scheduling may be categorised as user-based scheduling goals and system-based scheduling goals. User based goals are the criteria that benefit the user. For e.g. a user in a multi user environment expects the system to give quick response to the job. System based goals are the criteria that benefit the system, i.e., performance of the system. For e.g. how much the processor is being utilized in processing the processes.
  • 10. User-Based Scheduling Goals:  Turnaround time –time to execute a process: from start to completion i.e. sum of  Waiting time,  Executing time  Blocked waiting for an event, for example waiting for I/O  Waiting time – time in Ready queue, directly impacted by scheduling algorithm.  Response time – time from submission of request to production of first response.  Predictability – prediction about completion time of a process by human mind.
  • 11. System-Based Scheduling Goals:  Throughput – number of processes that complete their execution per unit time  CPU utilization – percent time CPU busy  Fairness – all processes should be treated equal, until priority is set  Balance – there should be a balance between I/O bound and CPU bound processes.
  • 12. Scheduling Algorithms  First Come First Served(FCFS) 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 P1 P2 P3 0 24 27 30
  • 13. First Come First Serve  The arriving process is added onto the tail of the queue and the process at the head of the queue is dispatched to the processor for execution.  A process that has been interrupted by any means does not maintain its previous order in the ready queue.
  • 14. Priority Scheduling The processes are executed according to the priority. 1.Priority number based scheduling In it preference is given to the processes, based on a priority number assigned to it. 2.Shortest Process Next(SPN) The process with the shortest execution time is executed first . It is non-pre-emptive scheduling algorithm.
  • 15. Shortest Remaining Time Next(SRN) This algorithm also considers the execution time of processes as in SPN. but it is a pre- emptive version of SPN.
  • 16. Round Robin Scheduling  Time slices are assigned to each process in equal portions and in circular order, handling all processes without priority.  The design is such that whenever a process finishes before the time slice expires, the timer will stop and send the interrupt signal ,so that the next process can be scheduled.
  • 17. Improved Round Robin Scheduling CPU consumption ratio=Actual CPU time consumed/total estimated execution time Schedule a process if its CPU consumption ratio is greater than 0.60, else schedule a process whose CPU consumption ratio is minimum.
  • 18. Highest Response Ratio Next(HRRN) Response ratio= time elapsed in the system/CPU time consumed by the process
  • 19. Multilevel Queue Scheduling  When processes can be readily categorized, then multiple separate queues can be established, each implementing whatever scheduling algorithm is most appropriate for that type of job, and/or with different parametric adjustments.  Scheduling must also be done between queues, that is scheduling one queue to get time relative to other queues. Two common options are strict priority ( no job in a lower priority queue runs until all higher priority queues are empty ) and round- robin ( each queue gets a time slice in turn, possibly of different sizes. )  Note that under this algorithm jobs cannot switch from queue to queue - Once they are assigned a queue, that is their queue until they finish.
  • 20.
  • 21. Multilevel Feedback-Queue Scheduling  Multilevel feedback queue scheduling is similar to the ordinary multilevel queue scheduling described above, except jobs may be moved from one queue to another for a variety of reasons:  If the characteristics of a job change between CPU-intensive and I/O intensive, then it may be appropriate to switch a job from one queue to another.  Aging can also be incorporated, so that a job that has waited for a long time can get bumped up into a higher priority queue for a while.  Multilevel feedback queue scheduling is the most flexible, because it can be tuned for any situation. But it is also the most complex to implement because of all the adjustable parameters. Some of the parameters which define one of these systems include:  The number of queues.  The scheduling algorithm for each queue.  The methods used to upgrade or demote processes from one queue to another. ( Which may be different. )  The method used to determine which queue a process enters initially.
  • 22.
  • 23. Fair-share scheduling Fair-share scheduling is a scheduling strategy for computer operating systems in which the CPU usage is equally distributed among system users or groups, as opposed to equal distribution among processes.
  • 24. Lottery scheduling  In Lottery Scheduling processes are each assigned some number of lottery tickets, and the scheduler draws a random ticket to select the next process. The distribution of tickets need not be uniform; granting a process more tickets provides it a relative higher chance of selection. This technique can be used to approximate other scheduling algorithms, such as Shortest job next and Fair- share scheduling.  Lottery scheduling solves the problem of starvation. Giving each process at least one lottery ticket guarantees that it has non-zero probability of being selected at each scheduling operation.