Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

The user-level program below shows the way to create a new process with fork(). pid_t cpid; cpid fork (); if (cpid != 0) {

 

The user-level program below shows the way to create a new process with fork(). pid_t cpid; cpid fork (); if (cpid != 0) { (ii) // parent's code } else { } // child's code (a) What are system calls? Apart from fork(), give an example of system call for process control and for file manipulation respectively in the Linux OS. (5 marks) (b) Describe the meaning of "dual mode operation" in an OS, and explain how it allows the OS to protect itself and other system components. (5 marks) (c) When fork() is invoked (i.e., called), "process switch" happens. (i) What kind of process switching mechanism is the above? State the cause and the use of such process switching mechanism. (3 marks) Describe the operations done by the OS during the process switch above. (4 marks) (d) Suggest a scenario that causes the child process created to become a zombie process, and propose the action to be done by the parent process to avoid such. (4 marks) (e) Suggest a scenario that causes the child process created to become an orphan process, and propose the action to be done by the parent process to avoid such. (4 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Accounting Information Systems

Authors: Ulric J. Gelinas, Richard B. Dull

10th edition

9781305176218, 113393594X, 1305176219, 978-1133935940

More Books

Students also viewed these Programming questions

Question

Subtract the polynomials. (-x+x-5) - (x-x + 5)

Answered: 1 week ago