We have been working very hard since 2009 to facilitate in learning Read More. We can't keep up without your support. Donate.

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

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

 

Code:

  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.

Fall%202020_CS604_1.docx


+ 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: 932

Attachments:

Replies to This Discussion

Any Ideas?

CS604_Assignment_No_01_Solution_Fall_2020

Click on the below link Solution

CS604_Assignment_No_01_Solution_Fall_2020

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?

CS604_Assignment_No_01_Solution_Fall_2020

Click on the below link Solution

CS604_Assignment_No_01_Solution_Fall_2020

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 

CS604-Assignment-Solution-No-01

RSS

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

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

.