SlideShare a Scribd company logo
Chapter 9 Homework Solutions
9.1, 9.4, 9.14, 9.16
9.1 Consider the following set of processes:
Process Name A B C D E
Arrival Time 0 1 3 9 12
Processing Time 3 5 2 5 5
A B C D E
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
A B C D E
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
Process Name A B C D E
Arrival Time 0 1 3 9 12
Processing Time 3 5 2 5 5
Average
9.1 Consider the following set of processes:
Process Name A B C D E
Arrival Time 0 1 3 9 12
Processing Time 3 5 2 5 5
A B C D E
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
A B C D E
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
9.4 Favors I/O-bound processes:
If a process uses too much processor time, it will be moved to
a lower-priority queue. This leaves I/O-bound processes in the
higher-priority queues.
9.14 Favors I/O-bound processes:
If a process uses too much processor time, it will be moved to
a lower-priority queue. This leaves I/O-bound processes in the
higher-priority queues.
9.16 Five batch jobs, A through E, arrive at a computer center at
essentially the same time. They have estimated running times
of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally
defined) priorities are 6, 3, 7, 9 and 4, respectively, with lower
value corresponding to higher priorities. For each of the
following scheduling algorithms, determine the turnaround
time for each process and the average turnaround time for all
five jobs. Ignore process switching overhead. Explain how
you arrived at your answers. In the last three cases, assume
that only one job at a time runs until it finishes and that all
jobs are processor bound.
(a) round robin with a time quantum of 1 minute
(b) priority scheduling
(c) FCFS (run in order 15, 9, 3, 6 and 12)
(d) Shortest job next.
(a) round robin with a time quantum of 1 minute
Sequence with which processes will get 1 min of processor time:
The turnaround time for each process:
A = 45 min, B = 35 min, C = 13 min, D = 26 min, E = 42 min
The average turnaround time is
(45+35+13+26+42) / 5 = 32.2 min
(b) Priority scheduling
The average turnaround time is:
(9+21+36+39+45) / 5 = 30 min
(c) FCFS (run in order 15, 9, 3, 6 and 12)
The average turnaround time is:
(15+24+27+33+45) / 5 = 28.8 min
(d) Shortest job next.
The average turnaround time is:
(3+9+18+30+45) / 5 = 21 min

More Related Content

What's hot

Introduction to computer network 4th edition
Introduction to computer network   4th editionIntroduction to computer network   4th edition
Introduction to computer network 4th edition
Ensign Handoko
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
Shubhashish Punj
 
Artificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real WorldArtificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real World
ahmad bassiouny
 
Backtracking & branch and bound
Backtracking & branch and boundBacktracking & branch and bound
Backtracking & branch and bound
Vipul Chauhan
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithms
ali jawad
 
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Soumen Santra
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Vinod Kumar Meghwar
 
Removing ambiguity-from-cfg
Removing ambiguity-from-cfgRemoving ambiguity-from-cfg
Removing ambiguity-from-cfg
Ashik Khan
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
Amit Kumar Rathi
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
Sanad Bhowmik
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Distributed transaction
Distributed transactionDistributed transaction
Distributed transaction
MohitKothari26
 
Ch6 transform and conquer
Ch6 transform and conquerCh6 transform and conquer
Ch6 transform and conquer
Younes Khafaja
 
3.4 deterministic pda
3.4 deterministic pda3.4 deterministic pda
3.4 deterministic pda
Sampath Kumar S
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
Tekendra Nath Yogi
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
Jay Nagar
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
nikeAthena
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
MNM Jain Engineering College
 
Election algorithms
Election algorithmsElection algorithms
Election algorithms
Ankush Kumar
 
Master theorem
Master theoremMaster theorem
Master theorem
fika sweety
 

What's hot (20)

Introduction to computer network 4th edition
Introduction to computer network   4th editionIntroduction to computer network   4th edition
Introduction to computer network 4th edition
 
CPU Scheduling Algorithms
CPU Scheduling AlgorithmsCPU Scheduling Algorithms
CPU Scheduling Algorithms
 
Artificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real WorldArtificial Intelligence 1 Planning In The Real World
Artificial Intelligence 1 Planning In The Real World
 
Backtracking & branch and bound
Backtracking & branch and boundBacktracking & branch and bound
Backtracking & branch and bound
 
Disk Scheduling Algorithms
Disk Scheduling AlgorithmsDisk Scheduling Algorithms
Disk Scheduling Algorithms
 
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
Optimization techniques: Ant Colony Optimization: Bee Colony Optimization: Tr...
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
Removing ambiguity-from-cfg
Removing ambiguity-from-cfgRemoving ambiguity-from-cfg
Removing ambiguity-from-cfg
 
Dynamic programming
Dynamic programmingDynamic programming
Dynamic programming
 
Round Robin Algorithm.pptx
Round Robin Algorithm.pptxRound Robin Algorithm.pptx
Round Robin Algorithm.pptx
 
Binary Search Tree
Binary Search TreeBinary Search Tree
Binary Search Tree
 
Distributed transaction
Distributed transactionDistributed transaction
Distributed transaction
 
Ch6 transform and conquer
Ch6 transform and conquerCh6 transform and conquer
Ch6 transform and conquer
 
3.4 deterministic pda
3.4 deterministic pda3.4 deterministic pda
3.4 deterministic pda
 
Unit3:Informed and Uninformed search
Unit3:Informed and Uninformed searchUnit3:Informed and Uninformed search
Unit3:Informed and Uninformed search
 
Artificial Intelligence
Artificial IntelligenceArtificial Intelligence
Artificial Intelligence
 
First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)First-Come-First-Serve (FCFS)
First-Come-First-Serve (FCFS)
 
Distributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithmsDistributed Mutual exclusion algorithms
Distributed Mutual exclusion algorithms
 
Election algorithms
Election algorithmsElection algorithms
Election algorithms
 
Master theorem
Master theoremMaster theorem
Master theorem
 

Similar to Homework solutionsch9

Cpu scheduling qusetions
Cpu scheduling qusetionsCpu scheduling qusetions
Cpu scheduling qusetions
JasonMarandi1
 
Scheduling
SchedulingScheduling
Scheduling
ahmad bassiouny
 
Scheduling
SchedulingScheduling
Scheduling
ahmad bassiouny
 
Scheduling
SchedulingScheduling
Scheduling
ahmad bassiouny
 
Operations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdfOperations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdf
RoopaDNDandally
 
Scheduling ppt @ doms
Scheduling ppt @ doms Scheduling ppt @ doms
Scheduling ppt @ doms
Babasab Patil
 
Scheduling ppt @ DOMS
Scheduling ppt @ DOMSScheduling ppt @ DOMS
Scheduling ppt @ DOMS
Babasab Patil
 
Process and CPU scheduler
Process and CPU schedulerProcess and CPU scheduler
Process and CPU scheduler
Shivbhawan Verma
 
Tn6 facility layout
Tn6 facility layoutTn6 facility layout
Tn6 facility layout
videoaakash15
 
Tn6 facility+layout
Tn6 facility+layoutTn6 facility+layout
Tn6 facility+layout
videoaakash15
 
Facility Layout in production management
Facility Layout in production managementFacility Layout in production management
Facility Layout in production management
Joshua Miranda
 
Topic 5 Production Sequencing and Scheduling.ppt
Topic 5 Production Sequencing and Scheduling.pptTopic 5 Production Sequencing and Scheduling.ppt
Topic 5 Production Sequencing and Scheduling.ppt
HassanHani5
 
Operating System - CPU Scheduling Introduction
Operating System - CPU Scheduling IntroductionOperating System - CPU Scheduling Introduction
Operating System - CPU Scheduling Introduction
JimmyWilson26
 
Unit 2 process Management
Unit 2 process ManagementUnit 2 process Management
Unit 2 process Management
zahid7578
 
chapter 17.pdf
chapter 17.pdfchapter 17.pdf
chapter 17.pdf
Bagian Pembangunan
 
scheduling_1.ppt
scheduling_1.pptscheduling_1.ppt
scheduling_1.ppt
VELMURUGANM19
 
Cpu scheduling algorithm on windows
Cpu scheduling algorithm on windowsCpu scheduling algorithm on windows
Cpu scheduling algorithm on windows
siddhartha pande
 
Chap017 Scheduling Edit
Chap017 Scheduling EditChap017 Scheduling Edit
Chap017 Scheduling Edit
Ricky Muchtar
 
6 cpu scheduling
6 cpu scheduling6 cpu scheduling
6 cpu scheduling
BaliThorat1
 
Aminullah Assagaf_P14-Ch.17_Scheduling-32.pptx
Aminullah Assagaf_P14-Ch.17_Scheduling-32.pptxAminullah Assagaf_P14-Ch.17_Scheduling-32.pptx
Aminullah Assagaf_P14-Ch.17_Scheduling-32.pptx
Aminullah Assagaf
 

Similar to Homework solutionsch9 (20)

Cpu scheduling qusetions
Cpu scheduling qusetionsCpu scheduling qusetions
Cpu scheduling qusetions
 
Scheduling
SchedulingScheduling
Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 
Scheduling
SchedulingScheduling
Scheduling
 
Operations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdfOperations Research_18ME735_module 5 sequencing notes.pdf
Operations Research_18ME735_module 5 sequencing notes.pdf
 
Scheduling ppt @ doms
Scheduling ppt @ doms Scheduling ppt @ doms
Scheduling ppt @ doms
 
Scheduling ppt @ DOMS
Scheduling ppt @ DOMSScheduling ppt @ DOMS
Scheduling ppt @ DOMS
 
Process and CPU scheduler
Process and CPU schedulerProcess and CPU scheduler
Process and CPU scheduler
 
Tn6 facility layout
Tn6 facility layoutTn6 facility layout
Tn6 facility layout
 
Tn6 facility+layout
Tn6 facility+layoutTn6 facility+layout
Tn6 facility+layout
 
Facility Layout in production management
Facility Layout in production managementFacility Layout in production management
Facility Layout in production management
 
Topic 5 Production Sequencing and Scheduling.ppt
Topic 5 Production Sequencing and Scheduling.pptTopic 5 Production Sequencing and Scheduling.ppt
Topic 5 Production Sequencing and Scheduling.ppt
 
Operating System - CPU Scheduling Introduction
Operating System - CPU Scheduling IntroductionOperating System - CPU Scheduling Introduction
Operating System - CPU Scheduling Introduction
 
Unit 2 process Management
Unit 2 process ManagementUnit 2 process Management
Unit 2 process Management
 
chapter 17.pdf
chapter 17.pdfchapter 17.pdf
chapter 17.pdf
 
scheduling_1.ppt
scheduling_1.pptscheduling_1.ppt
scheduling_1.ppt
 
Cpu scheduling algorithm on windows
Cpu scheduling algorithm on windowsCpu scheduling algorithm on windows
Cpu scheduling algorithm on windows
 
Chap017 Scheduling Edit
Chap017 Scheduling EditChap017 Scheduling Edit
Chap017 Scheduling Edit
 
6 cpu scheduling
6 cpu scheduling6 cpu scheduling
6 cpu scheduling
 
Aminullah Assagaf_P14-Ch.17_Scheduling-32.pptx
Aminullah Assagaf_P14-Ch.17_Scheduling-32.pptxAminullah Assagaf_P14-Ch.17_Scheduling-32.pptx
Aminullah Assagaf_P14-Ch.17_Scheduling-32.pptx
 

Recently uploaded

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
Zilliz
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
Zilliz
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
Zilliz
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 

Recently uploaded (20)

TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
Building Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and MilvusBuilding Production Ready Search Pipelines with Spark and Milvus
Building Production Ready Search Pipelines with Spark and Milvus
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Programming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup SlidesProgramming Foundation Models with DSPy - Meetup Slides
Programming Foundation Models with DSPy - Meetup Slides
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Full-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalizationFull-RAG: A modern architecture for hyper-personalization
Full-RAG: A modern architecture for hyper-personalization
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 

Homework solutionsch9

  • 1. Chapter 9 Homework Solutions 9.1, 9.4, 9.14, 9.16
  • 2. 9.1 Consider the following set of processes: Process Name A B C D E Arrival Time 0 1 3 9 12 Processing Time 3 5 2 5 5 A B C D E 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 A B C D E 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  • 3. Process Name A B C D E Arrival Time 0 1 3 9 12 Processing Time 3 5 2 5 5 Average
  • 4. 9.1 Consider the following set of processes: Process Name A B C D E Arrival Time 0 1 3 9 12 Processing Time 3 5 2 5 5 A B C D E 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 A B C D E 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
  • 5. 9.4 Favors I/O-bound processes: If a process uses too much processor time, it will be moved to a lower-priority queue. This leaves I/O-bound processes in the higher-priority queues.
  • 6. 9.14 Favors I/O-bound processes: If a process uses too much processor time, it will be moved to a lower-priority queue. This leaves I/O-bound processes in the higher-priority queues.
  • 7. 9.16 Five batch jobs, A through E, arrive at a computer center at essentially the same time. They have estimated running times of 15, 9, 3, 6 and 12 minutes, respectively. Their (externally defined) priorities are 6, 3, 7, 9 and 4, respectively, with lower value corresponding to higher priorities. For each of the following scheduling algorithms, determine the turnaround time for each process and the average turnaround time for all five jobs. Ignore process switching overhead. Explain how you arrived at your answers. In the last three cases, assume that only one job at a time runs until it finishes and that all jobs are processor bound. (a) round robin with a time quantum of 1 minute (b) priority scheduling (c) FCFS (run in order 15, 9, 3, 6 and 12) (d) Shortest job next.
  • 8. (a) round robin with a time quantum of 1 minute Sequence with which processes will get 1 min of processor time: The turnaround time for each process: A = 45 min, B = 35 min, C = 13 min, D = 26 min, E = 42 min The average turnaround time is (45+35+13+26+42) / 5 = 32.2 min
  • 9. (b) Priority scheduling The average turnaround time is: (9+21+36+39+45) / 5 = 30 min
  • 10. (c) FCFS (run in order 15, 9, 3, 6 and 12) The average turnaround time is: (15+24+27+33+45) / 5 = 28.8 min
  • 11. (d) Shortest job next. The average turnaround time is: (3+9+18+30+45) / 5 = 21 min