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.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

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

Operating Systems (CS604)

Assignment # 02
Spring 2020

 

Total marks = 15                                                                            

 

Deadline Date
14th June 2020

 

 

Please carefully read the following instructions before attempting assignment.

 

RULES FOR MARKING

It should be clear that your assignment would not get any credit if:

  • The assignment is submitted after the due date.
  • The submitted assignment does not open or file is corrupt.
  • Strict action will be taken if submitted solution is copied from any other student or from the internet.

 

You should consult the recommended books to clarify your concepts as handouts are not sufficient.

 

You are supposed to submit your assignment in .doc or docx format.

Any other formats like scan images, PDF, zip, rar, ppt and bmp etc will not be accepted.

 

Objective:

·         The objective of this assignment is to learn scheduling algorithm.

·         To learn and understand different Operating System structure.

 

 

NOTE

 

No assignment will be accepted after the due date via email in any case (whether it is the case of load shedding or internet malfunctioning etc.). Hence refrain from uploading assignment in the last hour of deadline. It is recommended to upload solution file at least two days before its closing date.

 

If you find any mistake or confusion in assignment (Question statement), please consult with your instructor before the deadline. After the deadline no queries will be entertained in this regard.

 

For any query, feel free to email at:

cs604@vu.edu.pk

 

 

 

 

 

 

 

 

 

Question No 01                                                                                15 marks

Consider the following set of processes, with the CPU burst time given in milliseconds:

 

Process                Burst Time       

P1                                   10                                             

P2                                   1                                               

P3                                   2                                               

P4                                   1                                              

P5                                   5                                               

 

The processes are arrived in the order P1, P2, P3, P4, P5, all at time 0.

 

  1. Draw Gantt chart showing the execution of these processes using FCFS and SJF scheduling.
  2. Calculate the turnaround time of each process for FCFS scheduling algorithm as per part Calculation of part A?
  3. Calculate the waiting time of each process for SJF scheduling algorithm as per calculation of Part A?

                                                                                                           

 

 

 

Wish you very Best of Luck!


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

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

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)


Views: 723

Attachments:

Replies to This Discussion

CS604_Assignment_No_02_Solution_Spring_2020

Download the file, Click on the below link

CS604_Assignment_No_02_Solution_Spring_2020

CS604 Assignment 2

CS604(Operating system)
Assignment No 02

Question # 01:

Consider the following set of processes, with the CPU burst time given in milliseconds:

Process Burst Time
P1 10
P2 1
P3 2
P4 1
P5 5

The processes are arrived in the order P1, P2, P3, P4, P5, all at time 0.

A. Draw Gantt chart showing the execution of these processes using FCFS and SJF scheduling.
B. Calculate the turnaround time of each process for FCFS scheduling algorithm as per part Calculation of part A?
C. Calculate the waiting time of each process for SJF scheduling algorithm as per calculation of Part A?

Answer:
A. Draw Gantt chart showing the execution of these processes using FCFS and SJF scheduling.

As given:
Process Arrival Time CPU Burst time (Milliseconds)
P1 0 10
P2 0 1
P3 0 2
P4 0 1
P5 0 5

Gantt chart using FCFS scheduling:

P1 P2 P3 P4 P5

10 11 13 14 19

Gantt chart using SJF scheduling:

P2 P4 P3 P5 P1

0 1 2 4 9 19

B. Calculate the turnaround time of each process for FCFS scheduling algorithm as per part Calculation of part A?

Process Arrival Time(AT)(Milliseconds) CPU Burst Time(BT)
(Milliseconds) Completion Time(CT)(Milliseconds) Turnaround Time(TAT = CT-AT)(Milliseconds)
P1 0 10 10 10 – 0 = 10
P2 0 1 11 11 – 0 = 11
P3 0 2 13 13 – 0 = 13
P4 0 1 14 14 – 0 = 14
P5 0 5 19 19 – 0 = 19

C. Calculate the waiting time of each process for SJF scheduling algorithm as per calculation of Part A?

Process Arrival Time (AT) (Milliseconds) CPU Burst Time (BT)
(Milliseconds) Completion Time (CT) (Milliseconds) Turnaround Time (TAT = CT-AT) (Milliseconds) Waiting Time (WT = TAT - BT)
(Milliseconds)
P1 0 10 19 19 – 0 = 19 19 –10 = 9
P2 0 1 1 1 – 0 = 1 1 –1 = 0
P3 0 2 4 4 – 0 = 4 4 –2 = 2
P4 0 1 2 2 – 0 = 2 2 –1 = 1
P5 0 5 9 9 – 0 = 9 9 –5 = 4

RSS

Latest Activity

Kainat Ramzan liked +M.Tariq Malik's discussion STA100 GDB Fall 2020 Solution / Discussion
19 minutes ago
Musawar Ahmed replied to +M.Tariq Malik's discussion STA301 GDB Fall 2020 Solution & Discussion in the group STA301 Statistics and Probability
3 hours ago
Musawar Ahmed joined +M.Tariq Malik's group
3 hours ago
Mr Ak updated their profile
3 hours ago
Musawar Ahmed replied to +M.Tariq Malik's discussion CS610 Assignment No 01 Fall 2020 Solution & Discussion in the group CS610 Computer Network
3 hours ago
Musawar Ahmed joined +M.Tariq Malik's group
3 hours ago
Musawar Ahmed replied to +M.Tariq Malik's discussion CS605 Assignment No 01 Fall 2020 Solution & Discussion Due Date: 26-11-2020 in the group CS605 Software Engineering-II
3 hours ago
Musawar Ahmed replied to +M.Tariq Malik's discussion CS605 Assignment No 01 Fall 2020 Solution & Discussion Due Date: 26-11-2020 in the group CS605 Software Engineering-II
3 hours ago
Musawar Ahmed replied to +M.Tariq Malik's discussion CS605 Assignment No 01 Fall 2020 Solution & Discussion Due Date: 26-11-2020 in the group CS605 Software Engineering-II
3 hours ago
Musawar Ahmed replied to +M.Tariq Malik's discussion CS605 Assignment No 01 Fall 2020 Solution & Discussion Due Date: 26-11-2020 in the group CS605 Software Engineering-II
3 hours ago
Musawar Ahmed joined +M.Tariq Malik's group
3 hours ago
Musawar Ahmed replied to +M.Tariq Malik's discussion CS408 Assignment No 01 Fall 2020 Solution / Discussion in the group CS408 Human Computer Interaction
4 hours ago

Today Top Members 

Looking For Something? Search Here

© 2020   Created by +M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.