operating system - vfork:Understanding Issue: -


i have confusion around functionality of vfork(). read in case of vfork(), parent , child process used share pages between them. doesn't support copy on write functionality. means, if during timeslice child process makes changes, these changes visible parent process when return. mentioned, vfork() syscall been useful when child process executes exec system call after creation.

let say, child process executes exec system call ls. now, according exec calls, ls program loaded on address space of child process. now, when parent process' timeslice start, might have different intruction execute on pc, might cause process behave differently.

can please make scenario clear me, how vfork() call helpful in such situations?

the point of vfork() not allocate new address space child going throw away again. such, vfork() omits part of fork() creates new address space (page tables , allocations) child, , instead sets flag execve() interprets meaning should allocate new page table , stack process before populating new executable , requested initial heap (bss).


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -