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

What is the most used operating system?

0 Answers  


How does yahoo handles billions of requests, does it create a thread per request or a process?

0 Answers   Yahoo,


Define max, min heap and search time of heap.

0 Answers   Amdocs, Tavant Technologies, Thomson Reuters, Verifone,


How do I go to a specific line in vi?

0 Answers  


How can two processes communicate with one another?

0 Answers  






How do I enable macros?

0 Answers  


for an application which exceeds 64k the memory model should be a)medium b)huge c)large d)none

3 Answers   Nokia,


How do an incremental process model and certification work together to produce high quality software? In your own words, describe the intent of certification in the clean room software engineering context.

0 Answers  


Virtual memory size depends on [a] address lines [b] data bus [c] disc space [d] a & c [e] none

3 Answers   Wipro,


How do I do a system restore?

0 Answers  


What is the difference between logical and physical address space?

0 Answers  


Tell me operating systems used in mobile.

0 Answers   Tech Mahindra,


Categories