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






Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How does thread synchronization occur in a monitor?

46


Can you explain the Virtual memory?

39


Tell me something about the concept of memory leak?

33


Explain the difference between internal and external fragmentation in memory management. Suggest ways to reduce them.

31


What is NOS?

35






Do you know what is a binary semaphore?

19


Command Kill any user’s all processes.

31


What is the limit of ram capacity in a 32bit os?

16


What are the states associated with the thread?

32


How does DMA increase system concurrency? How does it complicate hardware design?

36


When does page fault error occur?

19


What is the operating system?

21


What is root partition?

45


What is belady's anomaly?

22


Difference between time sharing and multitasking systems?

42