You are on page 1of 2

Lab Assignment 4

Problem Description
You are required to write a C++ code for Round Robin Scheduling Policy. Your code
should do the following things: (order matters)
1. Take input from a text file (.txt). Your code should read from that file number of
processes and their respective burst’s times. Sample of this file is given alongside
this file.
2. Take input from user the Quantum Time.
3. Your code should calculate at the end the Average Waiting Time, and Average
Turnaround Time.

Sample:
Process Burst Time
P1 3
P2 4
P3 3
Avg. Waiting Time (4+6+6)/35.33
Avg. Turnaround (7+10+9)/38.6
Time

0 1 2 3 4 5 6 7 8 9 10

[BONUS]
To get extra credit, calculate the following parameters as well:
1. Response Time of each process and average response time
2. Throughput at each time unit

Instructions
1. You are encouraged to use good programming conventions by entering appropriate
comments, using indentations, and using descriptive variable names in your programs.
2. This is individual activity (but you may get help from others).

Hand-in
Send your .cpp file only and name it as firstnameSecondnameLastnameA4.cpp. For example my
assignment name would be muhammadZohaibNawazA4.cpp and upload at Google classroom.
Invitation code for BSCS 5th Regular is: rxous7
Invitation code for BSCS 5th Self is: nchk73

Honor code
The student should agree to the terms below; any infringements will result in zero marks.
• will not cheat on project
• will not share solutions to the project; and
• will notify the instructor immediately if he or she becomes aware of any other group cheating
Help?
In case you need help or get stuck while coding, do write me at niazbscs1@gmail.com

An army of sheep led by a lion would defeat an army of lions led by a sheep.

Good Luck 

You might also like