Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #18374
| From | Joshua Cranmer <Pidgeot18@verizon.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: thread vs fork? |
| Date | 2012-08-28 19:08 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <k1jmh9$t9k$1@dont-email.me> (permalink) |
| References | <15cf029d-e8bc-47de-8b83-44e70247d381@googlegroups.com> <euto38td1cm90mg7qg11b2375oh925hj7q@4ax.com> <dca1d3b6-47f2-4145-8797-b2b720af1bcb@googlegroups.com> |
On 8/28/2012 3:54 PM, Lew wrote: > Roedy Green wrote: >> Peter Cheung wrote, quoted or indirectly quoted someone who said: >>> hi, is fork runs faster then thread in java? >> > >> 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. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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