when a process is created using fork(). what is shared
between parent process and child process.
1.Heap 2. stack 3. shared memory segments 4. I/O handles
Answer Posted / pradeep
this is correct but partially. there is something called COW(copy on write). stack is not copied until one of them(parent or child) tries to write into it. if the child immediately calls exec then there is not need to copy the stack at all. As practically in most of the cases child process does an exec call, this unnecessary copy of huge stack is avoided by delaying it till its written into.
| Is This Answer Correct ? | 12 Yes | 3 No |
Post New Answer View All Answers
What is the main purpose of an operating system?
What is the difference between shared memory and message passing?
Explain the difference between internal and external fragmentation in memory management. Suggest ways to reduce them.
What is the Difference between a process and a thread?
How much ram can a 64 bit system use?
Describe Operating system?
How do I find my os version?
Why do we use semaphore?
How much ram do I have?
Explain about processor and the functions executed by them?
Does chkdsk work for ssd?
Name the different types of memory?
Explain about Different types of real-time scheduling?
Explain the trda?
What is the concept of reentrancy?