ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
Google
   
 
Categories  >>  Software  >>  Operating Systems  >>  Linux  >>  Linux Socket Programming
 
 


 

 
 Linux Commands interview questions  Linux Commands Interview Questions
 Linux Threads interview questions  Linux Threads Interview Questions
 Linux IPC interview questions  Linux IPC Interview Questions
 Linux Socket Programming interview questions  Linux Socket Programming Interview Questions
 Linux System Calls interview questions  Linux System Calls Interview Questions
 Linux General interview questions  Linux General Interview Questions
 Linux AllOther interview questions  Linux AllOther Interview Questions
Question
what is the difference between fork() & exec()
 Question Submitted By :: Alka
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is the difference between fork() & exec()
Answer
# 1
fork() creates a new process where exec() not....
exec() shares memory of parent here fork() process operates
independently...
 
Is This Answer Correct ?    33 Yes 11 No
Alka
 
  Re: what is the difference between fork() & exec()
Answer
# 2
fork: Create a new process

exec: replace a process's objectcode with contents of file
(executable)
 
Is This Answer Correct ?    40 Yes 9 No
Laxman Masadi
 
 
 
  Re: what is the difference between fork() & exec()
Answer
# 3
fork() creates a child process with most of the attributes
of the parent process. Both parent and child processes are
executed simultaneously.
exec() replaces the current process with a the executable
pointed by the function. Control never returns to the
original program unless there is an exec() error.
 
Is This Answer Correct ?    53 Yes 3 No
Nitin
 
  Re: what is the difference between fork() & exec()
Answer
# 4
processes began through a process called "fork and exec".
that is when one command starts another, the child process
first forks , the kernel copying over pages of memory from
the present process to a new location for the child process.
The child then execs, executing the new command and
overwriting the data
 
Is This Answer Correct ?    7 Yes 14 No
Dheeraj Gahtori
 
  Re: what is the difference between fork() & exec()
Answer
# 5
fork() creates a new process
exec() excecte the process
 
Is This Answer Correct ?    6 Yes 29 No
Chander
 
  Re: what is the difference between fork() & exec()
Answer
# 6
fork()- used to eat noodles
exec()-used to wash clothes
 
Is This Answer Correct ?    19 Yes 67 No
Dimo
 
  Re: what is the difference between fork() & exec()
Answer
# 7
what is the difference between fork() & exec()?

fork() creates a new child process and subsequently a new
entry in process table is made for the new process.

exec(), if successful, replaces the existing text segnent
of the process with that of new process. and hence, the old
process does not exists in the system any more. i dont
think, any new entry is created in the process table after
successful exec().
 
Is This Answer Correct ?    11 Yes 2 No
Amit
 
  Re: what is the difference between fork() & exec()
Answer
# 8
fork() created a newly independent process that has it's own
space in memory and also has own permission depends upon
what you assign

Using exec() the created process is a sub thread of calling
process. They also share area in memory and so that also
share all permission and resources.
 
Is This Answer Correct ?    5 Yes 2 No
Anand
 
  Re: what is the difference between fork() & exec()
Answer
# 9
fork creates a new process where the childs and the parents
address space wil be different
wen we use exec system cal,the child wil be made to share
the pages of the parent..also the permissions wil be shared
between the 2.
 
Is This Answer Correct ?    4 Yes 2 No
Mahitha
 

 
 
 
Other Linux Socket Programming Interview Questions
 
  Question Asked @ Answers
 
Q. what is the difference between socket & port ? Cavium-Networks2
what is the difference between fork() & exec() Subex9
What is the difference between a process task and threads and what are the things that are acquired by the child process from the parent process  5
how to get client port number in server socket programming??  5
Why bind system call is required in socket programming ? what is it;s Significance ? Cavium-Networks3
 
For more Linux Socket Programming Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2012  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com