Skip to content

CS604 - Operating Systems

13 Topics 70 Posts
  • McQ Solved for Mid Tearm and Final Term

    Pinned
    9
    0 Votes
    9 Posts
    12k Views
    cyberianC
    @moaaz said in McQ Solved for Mid Tearm and Final Term: The condition in which a set {P0, P1… Pn} of waiting processes must exist such that P0 is waiting for a resource that is held by P1, P1 is waiting for a resource that is held by P2, and so on, Pn-1 is waiting for a resource held by Pn, and Pn is waiting for a resource held by P0. This condition is known as ______________. ►Mutual exclusion ►Hold and wait ►No preemption ►Circular wait (Page 131) The condition described is known as a “deadlock.” In the context of computer science and operating systems, a deadlock occurs when a set of processes are each waiting for a resource that another process in the set holds, creating a cycle of dependencies. Specifically, in the scenario you described: Process ( p_0 ) is waiting for a resource held by ( p_1 ), Process ( p_1 ) is waiting for a resource held by ( p_2 ), and so on, until Process ( p_n ) is waiting for a resource held by ( p_0 ). This creates a circular wait, which is one of the necessary conditions for a deadlock to occur. In a deadlock situation, none of the processes can proceed because each is waiting for a resource held by another process in the cycle.
  • CS604 Quiz#2 Solution and discussion

    Solved
    29
    0 Votes
    29 Posts
    17k Views
    cyberianC
    @zaasmi said in CS604 Quiz#2 Solution and discussion: A program can not execute unless whole or necessary part of it resides in the main memory. Explanation: The statement describes a fundamental concept in computing related to how programs are executed in a computer system. Specifically, it highlights that: “A program cannot execute unless the whole or necessary part of it resides in the main memory.” Explanation: Main Memory (RAM) Requirements: For a program to run, it must be loaded into the computer’s main memory (RAM). The CPU (Central Processing Unit) can only directly access data and instructions stored in RAM. If a program or a part of it is not in RAM, the CPU cannot execute it. Execution Process: When a program is executed, the operating system loads the necessary portions of the program from secondary storage (like a hard drive or SSD) into RAM. This loading process includes the program’s executable code, data, and other required resources. Partial Loading: In some systems, especially with virtual memory and paging, only parts of a program may be loaded into RAM initially. The rest of the program can be loaded on-demand as needed. However, at any given time, the parts of the program currently being executed must be present in RAM. Swapping and Paging: Operating systems use techniques like swapping (moving entire processes between RAM and disk) and paging (dividing memory into pages and swapping pages in and out of RAM) to manage memory efficiently. Despite these techniques, the CPU requires the relevant pages or parts of the program to be in RAM to execute instructions. In summary, for a program to execute, it must be fully or partially loaded into the main memory (RAM) because the CPU requires direct access to memory to perform computations and process instructions.
  • 0 Votes
    2 Posts
    657 Views
    Ch. RobikaC
    idea solution plz
  • 0 Votes
    5 Posts
    1k 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: 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. 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
    388 Views
    No one has replied
  • 0 Votes
    3 Posts
    878 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? [image: fEvrDBH.png] The system is not in deadlock state as it is clear from the above graph it is multi instance and circular weight.
  • CS604 Assignment 2 Solution and Discussion

    Solved cs604 solution discussion fall 2019 assignment 2
    8
    0 Votes
    8 Posts
    2k 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
  • CS604 Assignment 1 Solution and Discussion

    Solved cs604 assignment 1 solution discussion fall 2019
    5
    2
    0 Votes
    5 Posts
    1k 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
  • CS604 GDB 1 solution and discussion

    Solved cs604 gdb1 solution spring 2019
    3
    0 Votes
    3 Posts
    1k 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.
  • CS604 Assignment # 03
 Solution and Discussion

    Unsolved cs604 assignment
    1
    3
    0 Votes
    1 Posts
    928 Views
    No one has replied
  • 0 Votes
    1 Posts
    505 Views
    No one has replied
  • CS604 Quiz#1 Solution and discussion

    1
    0 Votes
    1 Posts
    5k Views
    No one has replied
  • 1 Votes
    2 Posts
    694 Views
    cyberianC
    CS604 Assignment solution Spring 2019 Answer: 1 ¥ cd ¥ cd/personal ¥ Cd~/courses/cs604 ¥ ls ¥ mkdir “programs” Sr # List of Operations Directory 1 To contain the devices available to Linux /dev 2 Used for mounting temporary file systems /mnt 3 To store system configuration files /etc 4 For the storage of large applications packages /opt 5 To store shared libraries and kernel modules /lib Answer: 2
How to Build a $1,000/Month PAK VS BAN Live Live Cricket Streaming
File Sharing

0

Online

3.0k

Users

2.8k

Topics

8.1k

Posts
| |