Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #18376

Re: thread vs fork?

Newsgroups comp.lang.java.programmer
Date 2012-08-28 17:48 -0700
References <15cf029d-e8bc-47de-8b83-44e70247d381@googlegroups.com> <euto38td1cm90mg7qg11b2375oh925hj7q@4ax.com> <dca1d3b6-47f2-4145-8797-b2b720af1bcb@googlegroups.com> <k1jmh9$t9k$1@dont-email.me>
Message-ID <0c7750b2-3c6c-416e-8cfe-2673aee3259b@googlegroups.com> (permalink)
Subject Re: thread vs fork?
From Lew <lewbloch@gmail.com>

Show all headers | View raw


Joshua Cranmer wrote:
> Lew wrote:
>> Roedy Green wrote:
>>> Peter Cheung wrote, quoted or indirectly quoted someone who said:
>>>> hi, is fork runs faster then thread in java [sic]?
> 
>>> There is obviously less overhead with a new thread than forking off a
>>> new process.  A thread shares the same pool of objects.  A fork has
> 
>> What does that have to do with Java?
> 
> Traditionally, the term "fork" has been used to refer to "creating a new 
> process" (the traditional way of handling concurrency in Unix code)--the 
> Unix syscall for this step is literally called "fork." On Unix-based 
> system, process creation is extremely low overhead, so process-based 
> parallelism was more common than on Windows where making a new process 
> is painfully slow.
> 
> When I first saw the OP's question, I first thought he was referring to 
> fork in the process-creation sense, so it's not clear to me offhand if 
> he is referring to the process-creation fork or Java-framework fork.

The OP explicitly said, "in java [sic]". That clears up that question completely.

-- 
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

thread vs fork? Peter Cheung <cmk128@gmail.com> - 2012-08-25 23:40 -0700
  Re: thread vs fork? "John B. Matthews" <nospam@nospam.invalid> - 2012-08-26 03:27 -0400
  Re: thread vs fork? Arne Vajhøj <arne@vajhoej.dk> - 2012-08-26 09:34 -0400
  Re: thread vs fork? Roedy Green <see_website@mindprod.com.invalid> - 2012-08-28 00:52 -0700
    Re: thread vs fork? Lew <lewbloch@gmail.com> - 2012-08-28 13:54 -0700
      Re: thread vs fork? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-08-28 19:08 -0500
        Re: thread vs fork? Lew <lewbloch@gmail.com> - 2012-08-28 17:48 -0700
          Re: thread vs fork? Joshua Cranmer <Pidgeot18@verizon.invalid> - 2012-08-28 20:01 -0500
            Re: thread vs fork? Lew <lewbloch@gmail.com> - 2012-08-29 11:01 -0700

csiph-web