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 ?    41 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 ?    11 Yes 3 No

Post New Answer




More Operating Systems General Concepts Interview Questions

What do you mean by memory leak?

0 Answers  


Explain about linker and the functions executed by them?

0 Answers  


Differentiate between swapping and paging.

0 Answers   Tech Mahindra,


what is the memory required when a screen has 1024*1280 pixels and each pixel can have around 16 million colors?

0 Answers   CGI,


what is the place where microsoft outlook express's back up is taken ?

2 Answers  






what are multi core operating systems?

2 Answers  


List reasons why a Mode switch between threads may be cheaper than a Mode switch between processes.

1 Answers  


Explain what is a semaphore?

0 Answers   BPL,


What is the difference between hard and soft real-time systems?

4 Answers  


When does the condition 'rendezvous' arise?

2 Answers  


What are co-operating processes?

0 Answers  


What is cpu scheduler?

0 Answers  






Categories