Fork

Why Trust Techopedia

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.

Advertisements

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.

Advertisements

Related Terms

Margaret Rouse
Senior Editor
Margaret Rouse
Senior Editor

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.