Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

stupid fork() the waster!!

  • 26-10-2005 05:48PM
    #1
    Closed Accounts Posts: 110 ✭✭


    hows thing's

    ok here is my issue

    Im doing a course in computer systems and I’m having trouble understanding the fork () system call and was looking to see if anyone could clarify this.

    Ok so for example I am in Linux/UNIX and I type

    cp file1 file2

    Now I don’t quite understand where fork comes into play. I assume somewhere in the OS files there is a program called cp and this program takes a number or args, namely the files it is to compare. But what is fork doing I mean in layman’s terms.

    Could someone if they know, talk about how the computer boots up gets its initial process running then goes about calling fork? I mean in all the OS books they say fork() get called by process A and creates an exact copy of itself [process B the child process] then they go there separate ways. Etc…… OK But what was process A? what did it look like?[ie was it running any programs etc], what was it doing before it called fork. Why do I need to exact process to do the same task? Ahhh this is driving me nuts.

    Any help would be great thanks.


Comments

Advertisement