Explain fork() system call?

Answer Posted / rajkumar adepu

fork() system call creates a process exactly the same as parent process,called as child process of that parent process.It has same attributes,properties of parent process.

Both processes(parent and child) start their execution right after the system call fork().
Since both processes have identical but separate address spaces, those variables initialized before the fork() call have the same values in both address spaces. Since every process has its own address space, any modifications will be independent of the others. In other words, if the parent changes the value of its variable, the modification will only affect the variable in the parent process's address space. Other address spaces created by fork() calls will not be affected even though they have identical variable names.

Is This Answer Correct ?    15 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the various schemes available in ipc?

720


Please explain fork() system call?

737


Explain the advantage of executing a process in background?

700


Explain what are the system calls used for process management?

701


What is ipc port?

749


Explain the initial process sequence while the system boots up?

722


How to write the program on full-duplex communication on bidirectional(e.g using two pipes)?

766


Explain how do you execute one program from within another?

722


What are the various schemes available?

706


Tell me set-user-id is related to (in unix)?

698


How to write the program on full-duplex communication on bidirectional?

750


Explain about daemon?

777


Explain the system calls used for process management?

728


Which ipc is the fastest in unix?

757


What is the condition required for dead lock in unix system?

738