what is difference between fork() and exec() system calls in operating system

  fork():
  • fork() starts a new process which is a copy of the one that calls it,
  • Both parent and child processes are executed simultaneously in case of fork()




 exec():


  •  exec replaces the current process image with another (different) one.
  • Control never returns to the original program unless there is an exec() error.

Comments

Popular posts from this blog

Write C programs to simulate the Paging techniques of memory management

Write C programs to simulate the Two level directory File organization technique

Write C programs to simulate the Hierarchical directory File organization technique