OSDev.org

The Place to Start for Operating System Developers
It is currently Tue Mar 19, 2024 1:24 am

All times are UTC - 6 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: why is fork() called fork()?
PostPosted: Fri Apr 01, 2016 11:37 am 
Offline
Member
Member

Joined: Sat Oct 16, 2010 3:38 pm
Posts: 587
Just wondering. Why is the fork() function actually called fork()? It has nothing to do with dining instruments.


Top
 Profile  
 
 Post subject: Re: why is fork() called fork()?
PostPosted: Fri Apr 01, 2016 12:14 pm 
Offline
Member
Member

Joined: Mon Mar 25, 2013 7:01 pm
Posts: 5069
A fork is something that splits into several (usually two) similar parts. The utensil's name comes from the fact that its shape is a fork. Other things can have fork shapes too; you may occasionally hear of roads or rivers that fork. (Yes, "fork" is also a verb.)

This concept of "one thing that splits into many" is a very good description for the process of turning one thread into two nearly-identical threads, so the system call that performs that task is called "fork". You can also have forks in source control and filesystems.


Top
 Profile  
 
 Post subject: Re: why is fork() called fork()?
PostPosted: Fri Apr 01, 2016 12:15 pm 
Offline
Member
Member
User avatar

Joined: Fri Jan 16, 2009 8:34 pm
Posts: 284
Location: Louisiana, USA
Image

Quote:
fork
fôrk/Submit
noun
1.
an implement with two or more prongs used for lifting food to the mouth or holding it when cutting.
2.
a device, component, or part with two or more prongs, in particular.
verb
1.
(especially of a road or other route) divide into two parts.
"the place where the road forks"
synonyms: split, branch (off), divide, subdivide, separate, part, diverge, go in different directions, bifurcate; More
2.
dig, lift, or manipulate (something) with a fork.
"fork in some compost"

Look at verb:1

EDIT: seems I wasn't fast enough with my reply ;)

_________________
BOS Source Thanks to GitHub
BOS Expanded Commentary
Both under active development!
Sortie wrote:
  • Don't play the role of an operating systems developer, be one.
  • Be truly afraid of undefined [behavior].
  • Your operating system should be itself, not fight what it is.


Top
 Profile  
 
 Post subject: Re: why is fork() called fork()?
PostPosted: Fri Apr 01, 2016 1:35 pm 
Offline
Member
Member

Joined: Sat Oct 16, 2010 3:38 pm
Posts: 587
Oh, i see, i wasn't aware of the other meaning outside of IT.


Top
 Profile  
 
 Post subject: Re: why is fork() called fork()?
PostPosted: Sun May 22, 2016 3:37 am 
Offline
Member
Member

Joined: Thu Dec 16, 2010 3:08 pm
Posts: 36
It's because you give your program a fork, so it can eat more resources! :D

_________________

Daniel Broder Jensen
UNICORN OS


Top
 Profile  
 
 Post subject: Re: why is fork() called fork()?
PostPosted: Tue May 24, 2016 11:34 am 
Offline
Member
Member

Joined: Mon Aug 25, 2014 1:27 pm
Posts: 67
I'm working on a more modern and feature full implementation of fork()... It will be called spork()!


Top
 Profile  
 
 Post subject: Re: why is fork() called fork()?
PostPosted: Tue Jun 28, 2016 2:32 am 
Offline

Joined: Tue Jun 28, 2016 12:16 am
Posts: 16
hi, i found this piece of information.. it is a very good read.. http://www.foodreference.com/html/art-h ... k-729.html


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group