CS-63 Solved Assignment 2012
-------------------------------------------------
Presented by http://www.myignou.in
-------------------------------------------------
Solved by Pradeep Kumar Rana, a student of IGNOU BCA 6th semester. His facebook URL= http://www.facebook.com/people/Pradeep-Rana/100001389169424
Course Code : CS-63
Course Title : Introduction to System Software
Assignment Number : BCA (3)-63/Assignment/2012
Maximum Marks : 25
Last Date of Submission : 30th April, 2012/30th October, 2012
There are seven questions in this Assignment. Answer all the questions. You may use illustrations and diagrams to enhance explanation.
1) Consider the following set of processes that arrive in the ready queue at the same time:
Process CPU time P1 2 P2 5 P3 2 P4 1 P5 4 Consider the following scheduling algorithms:
First Come First Serve (FCFS), Shortest job first (SJF) and Round Robin (quantum = 1)
What is the turnaround time of each process for each of the above scheduling algorithms?
What is the waiting time of each process for each of the above scheduling algorithms? (3 Marks) ANS:-FCFS (first come first serve) Process | CPU time | Waiting time | Turn around time=CPU time+w.t | P1 | 2 | 0 | 2 | P2 | 5 | 2 | 7 | P3 | 2 | 7 | 9 | P4 | 1 | 9 | 10 | P5 | 4 | 10 | 14 | TOTAL | 14 | 28 | 42 |
Average waiting time=28/5=5.6
Average turn@time=42/5=8.4
SJS(Shrtage job first)
Process | CPU time | Waiting time | Turn around time=CPU time+w.t | P1 | 1 | 0 | 1 | P2 | 2 | 1 | 3 | P3 | 2 | 3 | 5 | P4 | 4 | 7 | 11 | P5 | 5 | 13 | 18 | TOTAL | 14 | 24 | 38 |
Average waiting time=24/5=4.8
Average turn@time=38/5=7.6
Round robin scheduling,