Question: #include #include int global; void main() { int i, pid; int local; pid = fork(); if(pid > 0) { global 1;4 local 2; }else =

#include #include int global; void main() { int#include #include int global; void main() { int

#include #include int global; void main() { int i, pid; int local; pid = fork(); if(pid > 0) { global 1;4 local 2; }else = = global local 5; 6; = } 4. [5 Points] Consider the above program that shows a parent process using fork() to create a child process. Assume it runs on a Unix system that uses the Copy-on-Write technique and some form of simple paging (The details of how paging is implemented are not important). a. [3 Points] Describe how exactly the Copy-on-Write technique would be implemented. b. [2 Points] Give an estimate for how many operations (i.e., trap into kernel, allocate a new frame for the child, copy the contents over, map the child to the new frame) will be required for this program? Describe your answer (just specifying a number won't get you any points, I want to know how you derived that number and what your assumptions you made)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!