Don't miss an insight. Subscribe to Techopedia for free.



What Does Fork Mean?

Fork is a function in Unix that is used to generate a duplicate of particular process by creating two simultaneous executing processes of a program. These two processes are typically called the "parent" and "child" processes. They use multitasking protocols to share system resources.


Techopedia Explains Fork

One big element of the way that forking is implemented is the copy-on-write system used to store progressive changes to a process after forking. Typically, the static code is not duplicated, but shared. At the time that a process modifies shared code, the changes are created and stored separately. This promotes efficiency in the use of forked processes.

Developers also have to be aware of some issues with using fork to generate a duplicate process. One of these is the issue of multithread programs; because the child process only inherits a single thread, there can be problems related to what happens to multiple threads when the fork function is called. These and other considerations are often mentioned by those who have worked with the fork function.


Related Terms