The user-level program below shows the way to create a new process with fork(). pid_t cpid;...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
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) 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)
Expert Answer:
Related Book For
Accounting Information Systems
ISBN: 978-1133935940
10th edition
Authors: Ulric J. Gelinas, Richard B. Dull
Posted Date:
Students also viewed these programming questions
-
Q1. You have identified a market opportunity for home media players that would cater for older members of the population. Many older people have difficulty in understanding the operating principles...
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
The top ten fiction books on The New York Times Best Sellers List on October 9, 2016, are listed. 1. The Girl on the Train 2. Home 3. The Kept Woman 4. Magic Binds 5. Commonwealth 6. The Light...
-
Rojas, Sherrit, Harris, and Knight (2008) conducted a study using the Car, Relax, Alone, Forget, Friends, Trouble (CRAFFT) substance abuse screening test in 14- to 18-year-old patients. This...
-
Image transcription text The simply supported 1 m long round shaft shown in the figure is subjected to a constant concentrated force of 200 N at the center of the shaft in two directions and a steady...
-
Identify the speed at which force divergence becomes significant.
-
1. The discussion of money issues is the first of a four-step process to help couples successfully manage their finances. The process might be summarized as (a) talk, (b) track, (c) plan and act, and...
-
Same situation as in the previous problem this time the magnet has mass 3.57 kg, the force pulling it to the right is 164.7 N, the cord has length 1.13 m and the ceiling is 3.39 m above the floor....
-
Use the following forward and spot prices for Canadian dollars (C$) to answer the question below. The prices are in U.S. dollars ($/C$). Forward rate for 4/15/20 Spot rate delivery of Canadian...
-
The following are a list of internal control activities: Assignment of responsibility Physical controls Review and reconciliation Segregation of duties Documentation OK Truck Parts Ltd. employs sales...
-
Fill in the blank with the line of code that allows the program to compile and print 15 at runtime. A. Sport.play() B. Sport.super.play() C. Sport.Tennis.play() D. Tennis.Sport.super.play() E. The...
-
Which of the following statements about functional interfaces is true? A. It is possible to define a functional interface that returns two data types. B. It is possible to define a primitive...
-
What is the best reason for marking an existing static method private within in an interface? A. It allows the method to be overridden in a subclass. B. It hides the secret implementation details...
-
What is the output of the following application? A. Spoiled! B. Yummy! C. The application completes without printing anything. D. One line of this application fails to compile. E. Two lines of this...
-
Which statement about the following interface is correct? A. The code compiles. B. The method enterAtmosphere() does not compile. C. The method getCircumference() does not compile. D. The method...
-
Keith has a Tangerine investment account which pays him interest He never received an information slip but was able to total up the $2030 interest he received last year from Tangerine Keith also has...
-
In Exercises 516, find the focus and directrix of the parabola with the given equation. Then graph the parabola. y 2 = 4x
-
Research the Internet, newspapers, magazines, and journals to find a recent fraud case involving IT and pervasive controls failure. Develop a report (format and length to be determined by your...
-
Assume that a manager can obtain information from the organizations database in three ways: by direct inquiry using a computer, by a daily printout, and by a monthly report. Using the qualities of...
-
Identify a business venture that you believe could be successful using only Internet commerce. Explain how you would design your Web page, how you would capture business event data, and the mode of...
-
If task A is an immediate predecessor of task B, what must be true about the sched- uled timing of these two tasks?
-
Why does a project necessarily have to possess some form of deadline? What is the implication of a project without a deadline?
-
What are the likely consequences to managing a highly uncertain project in the predictive style of project management?
Study smarter with the SolutionInn App