Question
Part I Objective Deterministic modeling is one type of analytic evaluation for scheduling algorithms. This method takes a particular predetermined workload and defines each process
Part I
Objective
Deterministic modeling is one type of analytic evaluation for scheduling algorithms. This method takes a particular predetermined workload and defines each process scheduling algorithm's performance for that workload. All processes arrive at same time 0, with different length of the CPU burst time.
Implement a C++ program that determines which process scheduling algorithm would give the minimum average waiting time. Use the FCFS, SJF (non-preemptive), RR (quantum = 5 milliseconds), and Priority (with 3 priority levels) scheduling algorithms for this set of processes.
Here's the format example:
P1, 10, 2
Create a user defined function that generates a random list that contains a unique PID along with a random BT, a random process priority number (1 - highest priority, 2 or 3). Then read the data from your text file into your variables and calculate an average wait time for each scheduling algorithm.
Here's the example output:
Average wait time for FCFS 28
Average wait time for Priority 26
Average wait time for SJF (non-preemptive) 13
Average wait time for RR 23
Thus, the SJF policy results the minimum average waiting time.
1 - Notepad File Edit Format View Help 20:36:34 From Nguyen : I notice the book and the lecture slides have dinos, what's up with that 20:37:05 From Thomas : Dinosaurs make everything exciting.... 20:37:12 From Yun : I like dinosaurs 20:38:23 From Prateek : Are we going to choose are own groups or will they be random? 20:50:18 From Favian : What are the presentations going to be about? 20:50:33 From Nguyen : When will we choose our groups? 20:51:44 From Abhinav : Yes Mam 20:53:08 From Ameena : do well on coding assigments 20:53:14 From Ryan : do well on both midterms 20:53:21 From Parker : Understand the assignments 20:53:47 From Omar : make sure, you and your group make a good presentation 20:54:03 From Charlotte : go to office hours 20:54:04 From Favian : Attend class and participate. Review plenty outside 20:54:22 From Ronnie : Understand the assignments because the will be based on the exams? 20:57:07 From Nguyen : Will the coding assignments be through Linux? 1 - Notepad File Edit Format View Help 20:36:34 From Nguyen : I notice the book and the lecture slides have dinos, what's up with that 20:37:05 From Thomas : Dinosaurs make everything exciting.... 20:37:12 From Yun : I like dinosaurs 20:38:23 From Prateek : Are we going to choose are own groups or will they be random? 20:50:18 From Favian : What are the presentations going to be about? 20:50:33 From Nguyen : When will we choose our groups? 20:51:44 From Abhinav : Yes Mam 20:53:08 From Ameena : do well on coding assigments 20:53:14 From Ryan : do well on both midterms 20:53:21 From Parker : Understand the assignments 20:53:47 From Omar : make sure, you and your group make a good presentation 20:54:03 From Charlotte : go to office hours 20:54:04 From Favian : Attend class and participate. Review plenty outside 20:54:22 From Ronnie : Understand the assignments because the will be based on the exams? 20:57:07 From Nguyen : Will the coding assignments be through LinuxStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started