Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


What do fork() internally call?

Answers were Sorted based on User's Feedback



What do fork() internally call?..

Answer / sasidhar

fork internally calls sys_fork() where sys_fork() calls do_fork().

sys_fork() do the following functions
-> calls do_fork()
-> return PID

do_fork() does the following functions
-> creates a new process
-> Assign a new PCB
-> copies PCB of parent to new PCB with little bit changes in context.
-> return

so if any process calls fork() two number of returns occur and after returning from do_fork() to sys_fork(). sys_fork decides what value to be returned to parent process and child process

Is This Answer Correct ?    3 Yes 0 No

What do fork() internally call?..

Answer / bhushan bachhav

Linux implements fork() via the clone() system call.
The clone() system call, in turn, calls do_fork().
The bulk of the work in forking is handled by do_fork(),
which is defined in kernel/fork.c.This function calls
copy_process() and then starts the process running.
If copy_process() returns successfully, the new child is
woken up and run. Deliberately, the kernel runs the child
process first.

Is This Answer Correct ?    4 Yes 3 No

What do fork() internally call?..

Answer / vikash

It calls clone function

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Linux System Calls Interview Questions

What do fork() internally call?

3 Answers  


what are Softirq's and how many major numbers be allocated in the linux kernel(2.4) ?

1 Answers  


what is bus trap.

1 Answers   NetApp,


How to get microseconds of system time from Redhat Linux 4.0

2 Answers  


what is iptabe on redhat linux?

3 Answers   CDAC,


what is segmentation fault?

11 Answers   AdTel, NetApp,


what are different ways the context switch happens from user to kernel space or vice-versa ?

0 Answers   Alcatel,


What is the use of proc structure?

2 Answers   NetApp,


How to give the root permision to users?

3 Answers   Wipro,


what is stored at /lib/modules ?

2 Answers   NetApp,


what are the different ways the Linux can swich from User Space to Kernel Space & vice-versa ?

2 Answers   NetApp,


why the kernel panic error was appering?

13 Answers   Air2Web, Allianz,


Categories