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
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 |
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 |
What is synchronous and asynchronous process?
How do I find recently downloaded files?
How to stop a long running thread?
0 Answers Sans Pareil IT Services,
Explain 32 bit application/OS vs 64 application/OS?
Differentiate between swapping and paging.
Explain Belady's Anomaly?
Is there a 64 bit version of office 365?
what are LRU, LFU in the OS concepts? How they are useful in the scheduling?
Explain pcb.
What are dynamic loading, dynamic linking and overlays?
What does microprocessor speed depend on?
What is a real-time system?
7 Answers SureSoft, Verifone, Wipro,