We have been working very hard since 2009 to facilitate in your learning Read More. We can't keep up without your support. Donate Now.

www.vustudents.ning.com

 www.bit.ly/vucodes + Link For Assignments, GDBs & Online Quizzes Solution www.bit.ly/papersvu + Link For Past Papers, Solved MCQs, Short Notes & More

Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

# CS604 Operating Systems Assignment No 02 Fall 2019 Solution & Discussion Due Date: 02-12-2019

CS604 Operating Systems Assignment No 02 Fall 2019 Solution & Discussion Due Date: 02-12-2019

Question No 01        4+3+3=10 marksQuestion No 01        4+3+3=10 marksAssume you have to apply Shortest Job First (SJF) scheduling algorithms on the set of different processes given in the table below. The CPU burst time is also given for each process. Consider that all the processes arrive in the ready queue within time 0 seconds except P2 that arrive in ready queue within time 8 seconds. You are required to show the Gantt Chart to illustrate the execution sequence of these processes and calculate the Total Waiting Time and Average Waiting Time for the given processes by using SJF algorithm.

Process CPU Burst Time (seconds)    P0 2    P1 6    P2 1    P3 4    P4 3    P5 8

Question No 02        4+3+3=10 marksConsider a scenario where you have to apply Round Robin scheduling algorithm on the below given set of processes with each having a quantum size=8 milliseconds. The CPU burst time and arrival time for each process is also provided in the given table. You are required to show the Gantt Chart to illustrate the execution sequence of these processes. Moreover, calculate the Average Turnaround Time and Average Waiting Time for given processes by using round robin algorithm.
Process CPU Burst Time (Milliseconds) Arrival Time(Milliseconds)    P0 15 0    P1 8 4    P2 25 18    P3 18 5

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

Views: 1522

### Replies to This Discussion

Our main purpose here discussion not just Solution

Students having same subject can start discussion here to solve assignment, GDB & Quiz and can clear their concepts until solution is provided.

P.S:    Please always try to add the discussion in proper format title like “CS101 Assignment / GDB No 01 Solution & Discussion Due Date: ___________”

Then copy Questions from assignment file and paste in Discussion.

http://bit.ly/vucodes (For Assignments, GDBs & Online Quizzes Solution)

http://bit.ly/papersvu (For Past Papers, Solved MCQs, Short Notes & More)

CS604_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com

CS604_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com.docx

solution_Fall 2019_CS604_2

solution_Fall 2019_CS604_2

# Round Robin(RR) CPU Scheduling Algorithm in OS with example

 P0 P4 P3 P2 P1 P5

0              2              5                           9           10                               16                                        24

Total Waiting Time= 0+10+1+5+2+16=34

Average Waiting Time= 34/6=5.6

 P0 P1 P3 P0 P2 P3 P2 P3 P2 P2

0              8              16             24             31             39             47             55              57            65            66

Average Turnaround Time=(31+12+48+52)/4=35.7

Average Waiting Time=(16+4+23+34)/4=19.2

CS604_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com

CS604_Assignmnet_2_Solution_Fall_2019_vustudents.ning.com.docx

solution_Fall 2019_CS604_2

solution_Fall 2019_CS604_2

## Latest Activity

Shahzeb Zubair, Rana Fiaz Rasool, Arain sahab and 17 more joined Virtual University of Pakistan
7 minutes ago
8 minutes ago
10 minutes ago
11 minutes ago
11 minutes ago
18 minutes ago
24 minutes ago
24 minutes ago
24 minutes ago
26 minutes ago
30 minutes ago
36 minutes ago

1

2

3