Skip to content
  • 0 Votes
    2 Posts
    149 Views
    Ch. RobikaC

    idea solution plz

  • 0 Votes
    5 Posts
    208 Views
    cyberianC

    @zaasmi said in CS604 Assignment 2 Solution and Discussion Spring 2020:

    Re: CS604 Assignment 2 Solution and Discussion

    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:
    [email protected]

    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.

    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?

    Wish you very Best of Luck!

    CS604_2_Sol_S20_cyberian.pk_.docx

  • 0 Votes
    1 Posts
    87 Views
    No one has replied
  • 0 Votes
    3 Posts
    203 Views
    zareenZ

    @zareen said in CS604 Assignment 3 Solution and Discussion:

    Question No 02 12 Marks
    Suppose a computer lab comprises of two printers, three scanners, and four ROM writers. There are three programs currently running on some computer. Assume program P1 is currently allocated a printer and two ROM writers and it is waiting for a scanner. Program P2 is allocated a scanner and it is waiting for a printer. Program P3 is allocated two ROM writers, a scanner, and a printer. Draw the corresponding resource allocation graph for these three programs. Also specify if the system is in a deadlocked state or not?

    6b44c7a6-62dc-4070-a9b2-efc2d178cf0a-image.png

    The system is not in deadlock state as it is clear from the above graph it is multi instance and circular weight.

  • 0 Votes
    5 Posts
    207 Views
    zareenZ

    Solution:
    Q. 1 Answer:
    As a process executes, it changes states. The state of a process is defined in part by the current activity of that process. Given below are current and next states of process. According to your understanding, what can be condition that changes one state into another:

    Sr # Current State -> Next State Conditions 1 Ready->Running Scheduler Dispatch 2 Waiting->Ready I/O or Event Completion 3 Running->Terminated Exit 4 Running->Ready Interrupt 5 New->Ready Admitted

    Q.2 Answer:
    The following table contains the list of operations. Write down the Linux commands along with their screenshots for performing these operations:

    List of Operations List the contents of files to the terminal window. Change the owner and group owner of a file. Compares two text files and show the differences between them Print a string of text to the terminal window. Change the password for a user.

    You are required to run the respective commands on Ubuntu and provide relevant screen shots of the list of operations as stated in above table.

    Sr # List of Operations Command 1 List the contents of files to the terminal window. cat 2 Change the owner and group owner of a file. chown 3 Compares two text files and show the differences between them diff 4 Print a string of text to the terminal window. echo 5 Change the password for a user. passwd
  • 0 Votes
    8 Posts
    272 Views
    zareenZ

    Solution:
    Q. 1 Answer

    P0 P4 P3 P2 P1 P5 0 2 5 9 10 16 24

    Total Waiting Time = 0+2+5+1+10+16 = 34 Seconds
    Average Waiting Time = 34/6 = 5.66 Seconds

    Q.2 Answer:
    Solution 1:

    P0 P1 P3 P0 P2 P3 P2 P3 P2 P2 0 8 16 24 31 39 47 55 57 65 66

    Turnaround time= Exit Time- Arrival Time

    Turnaround time for P0 = 31-0 = 31
    P1 = 16-4 = 12
    P2 = 66-18 = 48
    P3 = 57- 5= 52

    Total Turnaround Time = 39+12+48+52 = 143
    Average Turnaround Time = 143 / 4 =35.75 millisecond

    Waiting Time= Turnaround Time- Burst Time

    Waiting time for P0 = 31-15 = 16
    P1 = 12-8 = 4
    P2 = 48-25 = 23
    P3 = 52-18 = 34

    Total Waiting Time = 16+4+23+34 =77
    Average Waiting Time = 77 / 4 =19.25 millisecond

    Solution 2:

    P0 P1 P3 P2 P0 P3 P2 P3 P2 P2 0 8 16 24 31 39 47 55 57 65 66

    Turnaround time= Exit Time- Arrival Time

    Turnaround time for P0 = 39-0 = 39
    P1 = 16-4 = 12
    P2 = 66-18 = 48
    P3 = 57- 5= 52

    Total Turnaround Time = 39+12+48+52 = 151
    Average Turnaround Time = 151 / 4 =37.75 millisecond

    Waiting Time= Turnaround Time- Burst Time

    Waiting time for P0 = 39-15 = 24
    P1 = 12-8= 4
    P2 = 48-25= 23
    P3 = 52-18 = 34

    Total Waiting Time = 24+0+5+29 = 85
    Average Waiting Time = 85 / 4 =21.25 millisecond

  • 0 Votes
    3 Posts
    327 Views
    zaasmiZ

    @zaasmi Mobile operating system like Android, ios, kindal, Bada, Black berry, Microsoft is an open mobile operating system with massive user/employee base and simplified mobile app development process. Enterprises are leveraging Android or etc and creating custom mobile apps that solves problems and increase value for their business. The mobile os is best for the organization because the every person have the smart phone, and the app is the Develop in low cost.

  • 0 Votes
    1 Posts
    549 Views
    No one has replied