Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

After some initial analysis, Soft found that Round Robin (RR) has better performance compared to other process scheduling algorithms namely First-come, first served (FCFS), Shortest

After some initial analysis, Soft found that Round Robin (RR) has better performance compared to other process scheduling algorithms namely First-come, first served (FCFS), Shortest job next (SJN), and Shortest remaining time (SRT). However, to have a holistic analysis on the best time quantum according to the client specification, a list of jobs used by the client is provided to Soft for further analysis.

Your tasks are to:

(a) Implement or code the Round Robin algorithm with C++ programing language.

(b) Use the program to read the provided job list. The job list for your group is provided separately in an excel file based on your group number.

Job (1) arrive at CPU cycle 1 Job (2) arrive at CPU cycle 46 Job (3) arrive at CPU cycle 68 Job (4) arrive at CPU cycle 96 Job (5) arrive at CPU cycle 166 Job (6) arrive at CPU cycle 236 Job (7) arrive at CPU cycle 238 Job (8) arrive at CPU cycle 293 Job (9) arrive at CPU cycle 302 Job (10) arrive at CPU cycle 343 Job (11) arrive at CPU cycle 428 Job (12) arrive at CPU cycle 462 Job (13) arrive at CPU cycle 529 Job (14) arrive at CPU cycle 596 Job (15) arrive at CPU cycle 686 Job (16) arrive at CPU cycle 708 Job (17) arrive at CPU cycle 730
I/O (16) CPU (2) CPU (9) CPU (1) I/O (15) I/O (15) CPU (2) I/O (8) I/O (13) I/O (17) CPU (19) I/O (2) I/O (19) CPU (19) CPU (20) I/O (1) I/O (17)
I/O (8) I/O (14) CPU (13) I/O (10) I/O (9) I/O (4) CPU (6) I/O (9) CPU (14) I/O (10) I/O (1) CPU (4) CPU (14) CPU (10) CPU (11) I/O (3) CPU (11)
CPU (8) CPU (4) I/O (10) I/O (13) I/O (12) I/O (12) CPU (13) I/O (13) CPU (12) I/O (8) CPU (17) CPU (1) I/O (20) CPU (20) CPU (17) I/O (8) CPU (14)
I/O (6) I/O (3) I/O (4) I/O (12) I/O (17) I/O (5) CPU (3) CPU (20) CPU (6) CPU (1) CPU (12) I/O (2) CPU (18) CPU (14) I/O (10) I/O (2) CPU (10)
CPU (20) CPU (11) CPU (19) I/O (18) CPU (12) I/O (6) CPU (12) I/O (15) CPU (3) CPU (20) CPU (18) I/O (12) I/O (15) CPU (12) CPU (9) I/O (7) I/O (16)
CPU (19) CPU (1) I/O (7) I/O (9) CPU (18) CPU (7) I/O (14) I/O (13) CPU (14) I/O (12) I/O (19) CPU (8) CPU (20) CPU (7) I/O (6) CPU (11) I/O (9)
CPU (11) I/O (15) I/O (12) I/O (8) CPU (9) I/O (10) I/O (18) I/O (6) CPU (9) CPU (9) I/O (14) CPU (2) I/O (1) CPU (1) I/O (7) CPU (20) CPU (19)
I/O (19) CPU (9) CPU (6) I/O (17) CPU (13) CPU (18) CPU (11) CPU (2) CPU (10) I/O (4) CPU (8) CPU (3) CPU (16) CPU (16) I/O (20) I/O (7) I/O (15)
I/O (17) CPU (19) CPU (3) I/O (8) CPU (17) I/O (7) I/O (1) CPU (3) CPU (19) CPU (8) CPU (20) I/O (11) CPU (7) I/O (10) I/O (19) CPU (14) I/O (13)
CPU (2) CPU (1) CPU (3) I/O (18) CPU (4) I/O (3) I/O (14) CPU (5) CPU (7) CPU (14) I/O (20) I/O (10) CPU (8) CPU (15) CPU (16) CPU (16) CPU (8)
I/O (2) I/O (6) I/O (17) CPU (14) CPU (1) I/O (11) CPU (19) CPU (12) I/O (1) CPU (9) CPU (1) I/O (17) CPU (2) I/O (4) CPU (20) I/O (8) CPU (18)
I/O (19) I/O (8) CPU (13) I/O (8) I/O (9) I/O (9) CPU (12) CPU (13) CPU (12) I/O (6) I/O (8) CPU (2) CPU (14) CPU (16) CPU (19) I/O (2) CPU (13)
CPU (5) I/O (3) I/O (20) I/O (16) CPU (2) CPU (11) I/O (16) I/O (2) I/O (11) CPU (2) I/O (6) I/O (11) I/O (5) I/O (11) I/O (17) I/O (3) CPU (14)
CPU (14) CPU (14) CPU (10) I/O (13) I/O (3) I/O (7) I/O (9) CPU (7) CPU (4) I/O (12) I/O (10) CPU (3) I/O (1) CPU (15) I/O (10) CPU (3) CPU (14)
CPU (12) CPU (6) CPU (17) CPU (15) CPU (7) CPU (6) I/O (20) CPU (8) CPU (20) I/O (6) I/O (15) CPU (4) I/O (11) CPU (4) CPU (15) CPU (10) I/O (11)
I/O (13) I/O (10) I/O (17) CPU (20) CPU (20) I/O (14) CPU (13) CPU (4) I/O (19) CPU (11) I/O (20) CPU (7) I/O (2) CPU (19) CPU (16) I/O (10) I/O (17)
CPU (11) CPU (10) CPU (2) CPU (1) CPU (18) I/O (10) CPU (15) I/O (12) CPU (18) I/O (6) I/O (4) I/O (2) CPU (3) CPU (14) I/O (7) CPU (10) CPU (19)
I/O (9) I/O (10) I/O (2) I/O (9) I/O (5) I/O (20) I/O (20) CPU (6) CPU (18) I/O (13) CPU (16) CPU (17) I/O (2) I/O (19) I/O (15) I/O (14) I/O (11)
I/O (13) CPU (1) I/O (6) CPU (1) CPU (11) CPU (20) I/O (18) CPU (12) I/O (19) CPU (15) CPU (8) I/O (20) CPU (4) CPU (9) CPU (8) I/O (20) I/O (7)
I/O (4) CPU (15) CPU (17) CPU (1) CPU (6) I/O (3) I/O (11) I/O (16) I/O (8) I/O (1) CPU (15) I/O (3) I/O (19) I/O (6) I/O (12) CPU (3) CPU (1)
CPU (18) I/O (7) CPU (6) I/O (10) I/O (12) CPU (19) I/O (19) CPU (6) I/O (11) CPU (19) CPU (2) CPU (2) CPU (5) I/O (14) I/O (13) I/O (13) CPU (19)
CPU (5) I/O (5) I/O (2) I/O (1) CPU (16) I/O (4) I/O (17) CPU (1) I/O (19) I/O (4) CPU (6) CPU (6) I/O (10) I/O (9) CPU (15) CPU (7) CPU (11)
I/O (1) I/O (7) I/O (10) CPU (6) I/O (11) I/O (17) I/O (1) I/O (10) I/O (16) CPU (16) I/O (1) CPU (13) I/O (19) CPU (6) I/O (13) I/O (8) I/O (19)

(c) Evaluate the job list with different time quantum: [5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60], by determining the the following performance metrics:

(i) Turnaround time of the jobs;

(ii) Waiting time of the jobs; and

(iii) Number of interrupts incurred.

(d) Recommend the best time quantum for your job list based on your evaluation in

(c). Use suitable charts to explain and justify your recommendation.

Assumptions

(a) All the arrived jobs are at Ready State and ready to be processed by CPU.

(b) Only ONE (1) CPU available for processing the jobs.

(c) Each context switching incurs ONE CPU CYCLE.

(d) Memory is always sufficient to hold any jobs.

(e) Each job has mixture of CPU and I/O instructions, and the integer between the

brackets indicates CPU or I/O cycle required for each instruction (Please refer to

the job list assigned to your group).

Example:

CPU (20) The integer 20 represents the computational instruction requires 20

CPU cycle to compute.

//please give me the full answer and code for this. thank you so much

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions