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

Answers were Sorted based on User's Feedback



when a process is created using fork(). what is shared between parent process and child process. ..

Answer / sushil kumar

(3)shared memory segments
reason:-When a fork() system call is issued, a copy of all
the pages corresponding to the parent process is created,
loaded into a separate memory location by the OS for the
child process.

Is This Answer Correct ?    43 Yes 5 No

when a process is created using fork(). what is shared between parent process and child process. ..

Answer / 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

More Operating Systems General Concepts Interview Questions

Is it safe to delete program data?

0 Answers  


What are the different phases of compiler? What happens in lexical phase?

0 Answers   Accenture,


What is a full form of ok?

0 Answers  


What is cache memory?

1 Answers  


What's the difference between semaphore , critical sections and mutex?

1 Answers   SureSoft, Wipro,






Differentiate between swapping and paging.

0 Answers   Tech Mahindra,


What are the benefits and losses of placing the functionality in a device controller rather than in placing it in the kernel?

0 Answers  


How to implement Threading?

0 Answers   QuestPond,


What is the difference in interrupt mechanism from software to hardware?

1 Answers   HP,


what the diffence between windows server 2003 standard and windows server 2003 R2 standard

1 Answers  


Explain the execution cycle for a von neumann architecture.

0 Answers  


What is virtual memory? Where it used by OS?

0 Answers   MCN Solutions,


Categories