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


Please Help Members By Posting Answers For Below Questions

Describe Recovery from Deadlock?

647


What are the major differences between Thread and Process?

607


What is asynchronous task?

528


Explain about Different types of real-time scheduling?

564


What are the three main purposes of an operating system?

547






What are differences between ram and rom?

545


What are the different ways in which data can be represented?

564


How do I get the ie tab in chrome?

549


Hi All, Can any one post a MS-DOS command/ utility tool, that modifies large size(nGBs) log file into MBs form the begining of log file? I will appreciate if any one give correct answer to this question. Thanks

1442


What is ram parity?

601


How do you sleep in python?

644


What is so-dimm in reference to ram?

551


What is semaphore and its function?

533


What is resource allocation graph?

720


What is throughput?

579