Question: 3 . ( 4 0 ) Consider the following set of processes, with the length of the CPU burst time given in milliseconds: Process Burst

3.(40) Consider the following set of processes, with the length of the CPU burst time given in milliseconds:
Process
Burst Time
Priority
P1
2
2
P2
1
1
P3
9
4
P4
4
2
P5
6
3
The processes are assumed to have arrived in the order P1, P2, P3, P4, P5, all at time 0.
a. Draw four Gantt charts that illustrate the execution of these processes using the following scheduling algorithms: FCFS, SJF, nonpreemptive priority (a smaller priority number implies a higher priority), and RR (quantum =2).
b. What is the turnaround time of each process for each of the scheduling algorithms in part a?
c. What is the waiting time of each process for each of these scheduling algorithms?
d. Which of the algorithms results in the minimum average waiting time (over all processes)?
4.(20) Consider two processes, P1 and P2, where P1 has a period of p1=50 and CPU burst t1=
30. For P2, the corresponding values are p2=75, and t2=25.
a) Can these two processes be scheduled using rate-monotonic scheduling? Illustrate your answer using a Gantt chart such as the ones in Figure 5.21Figure 5.24.
b) Illustrate the scheduling of these two processes using earliest-deadline-first (EDF) scheduling.
Submissions:
We will be using an electronic homework submission on Canvas to make sure that all students submit their programming tasks on time. You will submit both the program source code file(s) to the Homework 2 dropbox on Canvas by the due date and time.
Make sure you submit the following files for this homework (do not submit a zip file):
o collatz.cpp o computepi.cpp
o hw2sol.pdf (which contains answers to questions # 3 and 4)
Please write your answers in a word document and convert them into the pdf. You can easily use tables and shapes in the word document to design the Gantt charts.
If you decide to use paper and scan it to make the pdf document, make sure it is scanned clearly (with clear answers and without any blur) otherwise you may not get the points.
Program submissions will be checked using a code plagiarism tool against other solutions, including those found on the Internet, so please ensure that all work submitted is your own. Any student determined to have cheated will receive an F in the course and will be reported for an academic integrity violation.
Your programs will be tested on our Linux CSE machines. So, make sure you test your programs on the CSE machines fully before you submit on canvas.
Until you are comfortable working on our Linux CSE machines, as a safety precaution, do not edit your program (using vim or nano) after you have submitted your program where you might accidentally re-save the program, causing the timestamp on your file to be later than the due date. If you want to look (or work on it) after submitting it, make a copy of your submission and work off that copy. Should there be any issues with your submission, this timestamp on your code on the CSE machines will be used to validate when the program is completed.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!