Latest Activity In Study Groups

Join Your Study Groups

VU Past Papers, MCQs and More

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

CS604 - Operating Systems Assignment NO 1

Questions No 01                                                                                10 marks

Below is a code in which fork() and exit() system call are used. You need to identify possible output(s) for this code for given two scenarios.

  1. fork() is successful and child executes prior to its parent
  2. Parent process executes and terminates before its child process. Also state the final value of variable “i”.



  1. int main()
  2. {
  3. int i = 48, pid = -1;
  4. pid = fork();
  5. if (pid == -1)
  6. {
  7. printf (“Fork failed\n”);
  8. i++;
  9. exit (1);
  10. }
  11. if (pid == 0)
  12. {
  13. printf (“I am child process\n”);
  14. i++;
  15. }
  16. else
  17. {
  18. printf (“I am parent process\n”);
  19. i++;
  20. }
  21. }


Questions No 02                                                                                06 marks

Provide complete syntax of the commands suitable for each of the following scenarios.

  1. Remove a non-empty directory “cs604” in present working directory.
  2. Rename a file “file1.txt” to “file2.txt”.
  3. Find a string “system” in “file1.txt”.
  4. Open manual page for “ls”.
  5. Show status of current processes in system.
  6. Show information about CPU and memory utilization.


Questions No 03                                                                                04 marks

Identify a system call against each of the following functions.

  1.        Notifies a parent process that its child process has terminated.
  2.      Return from this function is possible only if an error occurs.
  3.      Tells the exit status of a child process to its parent process.
  4.      Is called once but returned twice.


Views: 1248


Replies to This Discussion

Any Ideas?


Click on the below link Solution


Please Discuss here about this assignment.Thanks

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.

did anyone solve this?


Click on the below link Solution


One more idea solution CS604 Assignment#01 Fall 2020

Click on the below link to download the file

CS604-Assignment-1-IDEA-SOL-Fall 2020

CS604 Assignment#1 One more idea solution 

below link 



Looking For Something? Search Below

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

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