When using fork() to create a new process, it typically creates a \"lazy copy\"
ID: 3750636 • Letter: W
Question
When using fork() to create a new process, it typically creates a "lazy copy" of the process' address space. What does this mean?
a. The new process gets its own separate copy of data from the original process' address space
b. This means the new process gets its own shallow copy of the same data of the original process
c. None of these are correct
d. This means the new process points toward the address space of the old process until data changes, then it gets a new area in memory for the new data
Explanation / Answer
When using fork() to create a new process, it typically creates a "lazy copy" of the process' address space. What does this mean?
b. This means the new process gets its own shallow copy of the same data of the original process
Explanation :
A lazy copy is a combination of both shallow copy and deep copy.Lazy copy looks to the outside just as a deep copy but takes advantage of the speed of a shallow copy whenever possible and performs deep copy later
So here generally when ever fork system call is successfully executed then separate addresses spaces are allocated for parent and child processes. So the lazy copy here is it gets shallow copy of data of the original process.
Happy learning
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.