Re: pthreads question

2002-03-18 Thread Malcolm Kavalsky
> > > >based on nadav's suggestion, i added getrusage() in the server as >well. here are the results: > >[mulix@alhambra tmp]$ echo "without memsets:" ; ./b memcpy; ./b send >without memsets: >memcpy'ed 1000 blocks of size 1048576. user time: 7.98 secs, system time: >0.01 secs >clie

Re: pthreads question

2002-03-18 Thread mulix
On Mon, Mar 18, 2002 at 02:39:09PM +0200, Malcolm Kavalsky wrote: > > > mulix wrote: > > > > >i decided to play too. i took your code and modified it, so that the > >tests are run seperately (since i didnt want the after effects from > >fork's COW behaviour to affect the memcpy case). i also mo

Re: pthreads question

2002-03-18 Thread Malcolm Kavalsky
mulix wrote: > >i decided to play too. i took your code and modified it, so that the >tests are run seperately (since i didnt want the after effects from >fork's COW behaviour to affect the memcpy case). i also modified it to >use getrusage(). > >here are my results: > >[mulix@alhambra tmp]$ f

Re: pthreads question

2002-03-18 Thread mulix
On Mon, Mar 18, 2002 at 01:52:36PM +0200, Malcolm Kavalsky wrote: > Eureka! > > Nadav Har'El wrote: > > > On Mon, Mar 18, 2002, Malcolm Kavalsky wrote about "Re: pthreads > > question": > > > >> I asked one of the top Unix hackers that I k

Re: pthreads question

2002-03-18 Thread Malcolm Kavalsky
Eureka! Nadav Har'El wrote: > On Mon, Mar 18, 2002, Malcolm Kavalsky wrote about "Re: pthreads > question": > >> I asked one of the top Unix hackers that I know, and he said: >> >> "I would guess that if you do large af_unix transfers that are

Re: pthreads question

2002-03-18 Thread Malcolm Kavalsky
Eureka! Nadav Har'El wrote: >On Mon, Mar 18, 2002, Malcolm Kavalsky wrote about "Re: pthreads question": > >>I asked one of the top Unix hackers that I know, and he said: >> >>"I would guess that if you do large af_unix transfers that are page >&g

Re: pthreads question

2002-03-18 Thread Nadav Har'El
On Mon, Mar 18, 2002, Malcolm Kavalsky wrote about "Re: pthreads question": > I asked one of the top Unix hackers that I know, and he said: > > "I would guess that if you do large af_unix transfers that are page > aligned then the system doesn't have to actual

Re: pthreads question

2002-03-18 Thread Malcolm Kavalsky
guy keren wrote: > >On Sun, 17 Mar 2002, Malcolm Kavalsky wrote: > >>I forgot to mention that I am running Redhat 7.2 with kernel 2.4.14. My >>PIII has >>384Mb dram, and runs at 667Mhz. The results are completely reproducible, >>without >>running anything in the background. >> > >ok. obviously, w

Re: pthreads question

2002-03-18 Thread guy keren
On Sun, 17 Mar 2002, Malcolm Kavalsky wrote: > I forgot to mention that I am running Redhat 7.2 with kernel 2.4.14. My > PIII has > 384Mb dram, and runs at 667Mhz. The results are completely reproducible, > without > running anything in the background. ok. obviously, we're doing something wron

Re: pthreads question

2002-03-17 Thread Malcolm Kavalsky
not being done, isn't it surprising how much faster it is to send data over a socket than just to copy it from one buffer to another ;) Malcolm Matan wrote: >On Sun, 17 Mar 2002, Nadav Har'El wrote: > >>On Sun, Mar 17, 2002, guy keren wrote about "Re: pthreads ques

RE: pthreads question

2002-03-17 Thread Tzahi Fadida
> -Original Message- > From: guy keren [mailto:[EMAIL PROTECTED]] > Sent: Sunday, March 17, 2002 12:48 PM > To: Tzahi Fadida > Cc: Malcolm Kavalsky; [EMAIL PROTECTED] > Subject: RE: pthreads question > > > > On Sat, 16 Mar 2002, Tzahi Fadida wrote:

Re: pthreads question

2002-03-17 Thread Matan
On Sun, 17 Mar 2002, Nadav Har'El wrote: > On Sun, Mar 17, 2002, guy keren wrote about "Re: pthreads question": > > > > On Sat, 16 Mar 2002, Malcolm Kavalsky wrote: > > > > > I attach a program benchmark.c that compares speed of memcpy versu

RE: pthreads question

2002-03-17 Thread guy keren
On Sat, 16 Mar 2002, Tzahi Fadida wrote: > > that _is_ the nature ofdeadlocks. show me how java's mechanism help > > prevent deadlocks, please. give a concrete example - talking in the air > > and hand-waving are not acceptable proof techniques ;) > > There are mechanisms, its a matter of using

Re: pthreads question

2002-03-17 Thread Nadav Har'El
On Sun, Mar 17, 2002, guy keren wrote about "Re: pthreads question": > > On Sat, 16 Mar 2002, Malcolm Kavalsky wrote: > > > I attach a program benchmark.c that compares speed of memcpy versus data > > transfer > > over unix sockets. > > on my PC (A

Re: pthreads question

2002-03-17 Thread guy keren
On Sat, 16 Mar 2002, Malcolm Kavalsky wrote: > I attach a program benchmark.c that compares speed of memcpy versus data > transfer > over unix sockets. on my PC (AMD k-6 II 366MHz w/256MB RAM, kernel 2.2.20): [choo@simey ~]$ gcc -O2 benchmark.c [choo@simey ~]$ ./a.out Memcpy'ed 2000 blocks of

Re: pthreads question

2002-03-16 Thread Malcolm Kavalsky
Nadav Har'El wrote: [EMAIL PROTECTED]"> On Sat, Mar 16, 2002, Malcolm Kavalsky wrote about "Re: pthreads question": Before you attack me, try the following test:1. Malloc a 100 Mb buffer, fill it with random data2. Send the buffer over a Unix socket to another

Re: pthreads question

2002-03-16 Thread Nadav Har'El
On Sat, Mar 16, 2002, Malcolm Kavalsky wrote about "Re: pthreads question": > Before you attack me, try the following test: > > 1. Malloc a 100 Mb buffer, fill it with random data > 2. Send the buffer over a Unix socket to another process > 3. Time how long it takes to s

Re: pthreads question

2002-03-15 Thread Malcolm Kavalsky
There are a few points that I would like to make about the last postings to my "don't use threads" message. Nadav Har'El wrote: >Threads, especially on Linux (the common "LinuxThreads" implementation) >are the same thing as processes, with two things are shared between all >of them: > > 1. All

RE: pthreads question

2002-03-15 Thread Tzahi Fadida
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of guy keren > Sent: Saturday, March 16, 2002 1:24 AM > To: Tzahi Fadida > Cc: Malcolm Kavalsky; [EMAIL PROTECTED] > Subject: RE: pthreads question > > > > On Sat

RE: pthreads question

2002-03-15 Thread guy keren
On Sat, 16 Mar 2002, Tzahi Fadida wrote: > > how? what if one 'syncronized' method calls another in a different class, > > and that other object is also synchronized, and calls the first one? how > > does java handle this? in theory, it should deadlock. if java recognizes > > this and throws an

RE: pthreads question

2002-03-15 Thread Tzahi Fadida
> -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of guy keren > Sent: Saturday, March 16, 2002 12:21 AM > To: Tzahi Fadida > Cc: Malcolm Kavalsky; [EMAIL PROTECTED] > Subject: RE: pthreads question > > > > On Fri

RE: pthreads question

2002-03-15 Thread guy keren
On Fri, 15 Mar 2002, Tzahi Fadida wrote: > Well, i am not so savy about threads as most people here, its ok, neither are most people here, to bgin with ;) > but i think my opionion is middle ground. I think that threads should > not be used on C user applications as is, because of the > low le

Re: pthreads question

2002-03-15 Thread Nadav Har'El
On Fri, Mar 15, 2002, Malcolm Kavalsky wrote about "Re: pthreads question": > Linux has a very efficient process model and if you are writing any > reasonable > size program and don't want to get into trouble, then I suggest you > split it into > multiple pro

RE: pthreads question

2002-03-15 Thread Tzahi Fadida
Well, i am not so savy about threads as most people here, but i think my opionion is middle ground. I think that threads should not be used on C user applications as is, because of the low level implementation of threads and mutexs there. Instead if you realy need threads you should use some lib

Re: pthreads question

2002-03-15 Thread Nadav Har'El
On Fri, Mar 15, 2002, guy keren wrote about "Re: pthreads question": > or online tutorials. i'll offer my usual plug (what took me so long? ;) ) > for lupg, http://www.actcom.co.il/~choo/lupg/tutorials/ , and click on the > 'Multi-Threaded Programming With The Pt

Re: Threads - Good or Evil [was Re: pthreads question]

2002-03-15 Thread guy keren
On Fri, 15 Mar 2002, Malcolm Kavalsky wrote: > >This is the standard "Use qmail instead" reply to "I want to do this with > >sendmail". Perhaps pertinent, but not what the one who asked the question > >wishes to hear. > > I got the idea that the original poster was a young programmer, and > want

Re: pthreads question

2002-03-15 Thread guy keren
On Thu, 14 Mar 2002, Nadav Har'El wrote: > That's where books are better than manuals - given their length, they can > also give examples and explain the ideas behind why certain things were > done the way they were done, and what they are good for. or online tutorials. i'll offer my usual plug

Re: Threads - Good or Evil [was Re: pthreads question]

2002-03-14 Thread Malcolm Kavalsky
Shlomi Fish wrote: > >This is the standard "Use qmail instead" reply to "I want to do this with >sendmail". Perhaps pertinent, but not what the one who asked the question >wishes to hear. > I got the idea that the original poster was a young programmer, and wanted to warn him before he got start

Threads - Good or Evil [was Re: pthreads question]

2002-03-14 Thread Shlomi Fish
ed "Why threads are bad" which > goes into more > detail ( you can STW for it). > > > Just my 2 cents worth ... > > Malcolm > > Shlomi Fish wrote: > > >On Thu, 14 Mar 2002, Nadav Har'El wrote: > > > >>On Thu, Mar 14, 2002, Isaac Aa

Re: pthreads question

2002-03-14 Thread Malcolm Kavalsky
Oops, sorry about the block copy on my previous mail. Malcolm _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com = To unsubscribe, send mail to [EMA

Re: pthreads question

2002-03-14 Thread Malcolm Kavalsky
to use threads. Ousterhout wrote a seminal article titled "Why threads are bad" which goes into more detail ( you can STW for it). Just my 2 cents worth ... Malcolm Shlomi Fish wrote: >On Thu, 14 Mar 2002, Nadav Har'El wrote: > >>On Thu, Mar 14, 2002, Isaac Aaron w

Re: pthreads question

2002-03-14 Thread Shlomi Fish
On Thu, 14 Mar 2002, Nadav Har'El wrote: > On Thu, Mar 14, 2002, Isaac Aaron wrote about "RE: pthreads question": > > The thing is, I Read the F Manual (over and over, even considered trying > > mit-pthreads instead), did didn't think that I WANT to detach the

Re: pthreads question

2002-03-14 Thread Nadav Har'El
On Thu, Mar 14, 2002, Daniel Feiglin wrote about "Re: pthreads question": > I take it that we can now "join" this thread - effectively terminating it! What join()ing a thread actually means is that you'll block, doing nothing, until the thread naturally ends :) W

Re: pthreads question

2002-03-14 Thread Daniel Feiglin
>[mailto:[EMAIL PROTECTED]]On Behalf Of Daniel Feiglin >>Sent: Thursday, March 14, 2002 12:24 PM >>To: Nadav Har'El >>Cc: Isaac Aaron; [EMAIL PROTECTED] >>Subject: Re: pthreads question >> >> >> >> >>Nadav Har'El wrote: >> &g

Re: pthreads question

2002-03-14 Thread Nadav Har'El
On Thu, Mar 14, 2002, Isaac Aaron wrote about "RE: pthreads question": > Sorry for the disclaimer, will do something about it. It's just strange that that thing appears at the top of the message, and the actual message appears as an additional attachment. Makes you thi

RE: pthreads question

2002-03-14 Thread Isaac Aaron
--Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Daniel Feiglin > Sent: Thursday, March 14, 2002 12:24 PM > To: Nadav Har'El > Cc: Isaac Aaron; [EMAIL PROTECTED] > Subject: Re: pthreads question > > > > > Nadav Har&#x

Re: pthreads question

2002-03-14 Thread Daniel Feiglin
Nadav Har'El wrote: > On Thu, Mar 14, 2002, Isaac Aaron wrote about "pthreads question": > >>- (on server-express.q-bytes.com) >> >>This mail was scanned by Trend Micro InterScan VirusWall when leaving Quality Byt

Re: pthreads question

2002-03-14 Thread Christoph Bugel
> This is my example of pthread not releasing memory resources when the thread > function exits (I would REALLY like to have that memory back). > I have written (copied and modified...) a small program that creates 200 > threads which exit after 10 seconds. > The main function then sleeps for 20 s

Re: pthreads question

2002-03-14 Thread Nadav Har'El
On Thu, Mar 14, 2002, Isaac Aaron wrote about "pthreads question": > - (on server-express.q-bytes.com) > > This mail was scanned by Trend Micro InterScan VirusWall when leaving Quality Bytes Agggh!!! What an ugly mailer you'r

pthreads question

2002-03-14 Thread Isaac Aaron
- (on server-express.q-bytes.com) This mail was scanned by Trend Micro InterScan VirusWall when leaving Quality Bytes - HiThis is my example of pthread not releasing memory resources when the th