Re: multi-core software

2009-06-11 Thread Jon Harrop
Matthias Blume wrote: Jeff M. mass...@gmail.com writes: But, assuming that your program works and does what it's supposed to, I agree with Jon that performance needs to be right near the top of the list of concerns. Why? Performance isn't about looking good as a programmer, or having fun

Re: multi-core software

2009-06-10 Thread Jon Harrop
Arved Sandstrom wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: No. Concurrent programming is about interleaving computations in order to reduce latency. Nothing to do with parallelism. Jon, I do concurrent programming all the time, as do most of my peers. Way down on the

Re: multi-core software

2009-06-10 Thread Jeff M.
On Jun 9, 9:08 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon, I do concurrent programming all the time, as do most of my peers. Way down on the list of why we do it is the reduction of latency. What is higher on the list? Correctness.

Re: multi-core software

2009-06-10 Thread Matthias Blume
Jeff M. mass...@gmail.com writes: On Jun 9, 9:08 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon, I do concurrent programming all the time, as do most of my peers. Way down on the list of why we do it is the reduction of latency. What is

Re: multi-core software

2009-06-10 Thread Paul Rubin
Jon Harrop j...@ffconsultancy.com writes: I'm not being facetious. I write applications that run on application servers, and from time to time I have had to write various special purpose servers. This kind of programming is all about managing concurrent execution of computations. The

Re: multi-core software

2009-06-10 Thread Jeff M.
On Jun 10, 12:49 pm, Seamus MacRae smacrae...@live.ca.invalid wrote: Jeff M. wrote: On Jun 9, 9:08 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon, I do concurrent programming all the time, as do most of my peers. Way down on the list of why

Re: multi-core software

2009-06-10 Thread Seamus MacRae
Jeff M. wrote: On Jun 9, 9:08 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon, I do concurrent programming all the time, as do most of my peers. Way down on the list of why we do it is the reduction of latency. What is higher on the list?

Re: multi-core software

2009-06-10 Thread Dimiter malkia Stanev
Jeff M. wrote: On Jun 9, 9:08 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon, I do concurrent programming all the time, as do most of my peers. Way down on the list of why we do it is the reduction of latency. What is higher on the list?

Re: multi-core software

2009-06-10 Thread Arved Sandstrom
Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: No. Concurrent programming is about interleaving computations in order to reduce latency. Nothing to do with parallelism. Jon, I do concurrent programming all the time, as do most of my

Re: multi-core software

2009-06-10 Thread Arved Sandstrom
Jeff M. wrote: On Jun 9, 9:08 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon, I do concurrent programming all the time, as do most of my peers. Way down on the list of why we do it is the reduction of latency. What is higher on the list?

Re: multi-core software

2009-06-09 Thread Piet van Oostrum
Seamus MacRae smacrae...@live.ca.invalid (SM) wrote: SM Piet van Oostrum wrote: By the way, there is a series of articles about concurrency on ACM Queue which may be interesting for those participating in or just following this discussion:

Re: multi-core software

2009-06-09 Thread toby
On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote: Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance Frequently when they shouldn't. and

Re: multi-core software

2009-06-09 Thread Jon Harrop
toby wrote: On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote: Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance Frequently when they

Re: multi-core software

2009-06-09 Thread George Neuner
On Tue, 9 Jun 2009 10:47:11 -0700 (PDT), toby t...@telegraphics.com.au wrote: On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote: Arved Sandstrom wrote: Jon Harrop wrote: performance means mutable state. Hm, not sure Erlangers would wholly agree. Erlang uses quite a bit of mutable

Re: multi-core software

2009-06-09 Thread Dimiter malkia Stanev
Erlang uses quite a bit of mutable state behind the scenes ... the programmers just don't see it. George Heh... The CPUs use quite a bit of mutable state behind the scenes ... the programmers just don't see it. Actually with CPU they see it more, than... say Erlang (that's why you need to

Re: multi-core software

2009-06-09 Thread Emile van Sebille
On 6/9/2009 11:59 AM Jon Harrop said... toby wrote: On Jun 7, 2:41 pm, Jon Harrop j...@ffconsultancy.com wrote: snip No. Most programmers still care about performance Frequently when they shouldn't. I disagree. A lot of software is still far too slow because the programmers failed to pay

Re: multi-core software

2009-06-09 Thread Arved Sandstrom
Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: Arved Sandstrom wrote: Lew wrote: Interesting distinction. Would it be fair to compare concurrent programming to the bricks used to build the parallel program's edifice? Way too much of a fine distinction. While they are in fact

Re: multi-core software

2009-06-08 Thread Piet van Oostrum
By the way, there is a series of articles about concurrency on ACM Queue which may be interesting for those participating in or just following this discussion: http://queue.acm.org/listing.cfm?item_topic=Concurrencyqc_type=theme_listfilter=Concurrencypage_title=Concurrency Here is one

Re: multi-core software

2009-06-08 Thread Paul Wallich
rossb...@mpi-sws.org wrote: On Jun 8, 6:28 am, Ken T. nowh...@home.com wrote: Let's not forget Elite for the 6502 exploiting predictable performance in order to switch graphics modes partway down the vsync! That actually didn't require predictable timing. You could tell the video chip to send

Re: multi-core software

2009-06-08 Thread Seamus MacRae
Piet van Oostrum wrote: By the way, there is a series of articles about concurrency on ACM Queue which may be interesting for those participating in or just following this discussion:

Re: multi-core software

2009-06-08 Thread rossberg
On Jun 8, 6:28 am, Ken T. nowh...@home.com wrote: Let's not forget Elite for the 6502 exploiting predictable performance in order to switch graphics modes partway down the vsync! That actually didn't require predictable timing.  You could tell the video chip to send you an interrupt when

Re: multi-core software

2009-06-07 Thread Jeff M.
On Jun 7, 1:56 am, Paul Rubin http://phr...@nospam.invalid wrote: Jeff M. mass...@gmail.com writes: Even the lightest weight user space (green) threads need a few hundred instructions, minimum, to amortize the cost of context switching There's always a context switch. It's just

Re: multi-core software

2009-06-07 Thread Jon Harrop
Roedy Green wrote: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false cache coherency communication where no actual sharing is taking

Re: multi-core software

2009-06-07 Thread Jon Harrop
George Neuner wrote: On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green see_webs...@mindprod.com.invalid wrote: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be

Re: multi-core software

2009-06-07 Thread Lew
Scott David Daniels wrote: the nub of the problem is not on the benchmarks. There is something to be said for the good old daays when you looked up the instruction timings that you used in a little document for your machine, and could know the cost of any loop. We are faster now, but part of

Re: multi-core software

2009-06-07 Thread Arved Sandstrom
Jon Harrop wrote: Roedy Green wrote: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false cache coherency communication where no actual

Re: multi-core software

2009-06-07 Thread Jon Harrop
Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance and performance means mutable state. -- Dr Jon D Harrop, Flying Frog Consultancy Ltd.

Re: multi-core software

2009-06-07 Thread Joshua Cranmer
Jon Harrop wrote: No. Most programmers still care about performance and performance means mutable state. [ Citation needed ]. Most programmers I've met could care less about performance. -- Beware of bugs in the above code; I have only proved it correct, not tried it. -- Donald E. Knuth --

Re: multi-core software

2009-06-07 Thread Patricia Shanahan
Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance and performance means mutable state. I don't see why that would affect whether one

Re: multi-core software

2009-06-07 Thread Jon Harrop
Arved Sandstrom wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance and performance means mutable state. Quite apart from

Re: multi-core software

2009-06-07 Thread Jon Harrop
Joshua Cranmer wrote: Jon Harrop wrote: No. Most programmers still care about performance and performance means mutable state. [ Citation needed ]. Most programmers I've met could care less about performance. Then they have no need for parallelism in the first place. -- Dr Jon D

Re: multi-core software

2009-06-07 Thread Jeff M.
On Jun 7, 3:19 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance and performance means

Re: multi-core software

2009-06-07 Thread Lew
Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. Patricia Shanahan wrote: In my opinion, shared mutable state has a lot of problems. It is also sometimes the best design for performance reasons. As Dr. Jon pointed out upthread,

Re: multi-core software

2009-06-07 Thread Jon Harrop
Jeff M. wrote: On Jun 7, 3:19 pm, Arved Sandstrom dces...@hotmail.com wrote: Jon Harrop wrote: Arved Sandstrom wrote: Jon Harrop wrote: I see no problem with mutable shared state. In which case, Jon, you're in a small minority. No. Most programmers still care about performance and

Re: multi-core software

2009-06-07 Thread Jon Harrop
Lew wrote: As Dr. Jon pointed out upthread, one can write decent code with mutable shared state. It is also true that mutable state presents a lot of problems - potential problems, ones that can be solved, but not ones that can be solved thoughtlessly. On the flip side, one can write a

Re: multi-core software

2009-06-07 Thread Lew
Jon Harrop wrote: I agree entirely but my statements were about parallelism and not concurrency. Parallel and concurrent programming have wildly different characteristics and solutions. I don't believe shared mutable state is overly problematic in the context of parallelism. Indeed, I think it

Re: multi-core software

2009-06-07 Thread Ken T.
On Sun, 07 Jun 2009 11:16:46 -0400, Lew wrote: So the good old days are a matter of degree and self-deception - it was easier to fool ourselves then that we could at least guess timings proportionately if not absolutely, but things definitely get more unpredictable over evolution. As I

Re: multi-core software

2009-06-07 Thread Arved Sandstrom
Lew wrote: Jon Harrop wrote: I agree entirely but my statements were about parallelism and not concurrency. Parallel and concurrent programming have wildly different characteristics and solutions. I don't believe shared mutable state is overly problematic in the context of parallelism. Indeed,

Re: multi-core software

2009-06-07 Thread Jon Harrop
Arved Sandstrom wrote: Lew wrote: Interesting distinction. Would it be fair to compare concurrent programming to the bricks used to build the parallel program's edifice? Way too much of a fine distinction. While they are in fact different, the point of concurrent programming is to

Re: multi-core software

2009-06-07 Thread Jon Harrop
Lew wrote: Jon Harrop wrote: I agree entirely but my statements were about parallelism and not concurrency. Parallel and concurrent programming have wildly different characteristics and solutions. I don't believe shared mutable state is overly problematic in the context of parallelism.

Re: multi-core software

2009-06-07 Thread Patricia Shanahan
Jon Harrop wrote: ... Historically, concurrency has been of general interest on single core machines in the context of operating systems and IO and has become more important recently due to the ubiquity of web programming. Parallelism was once only important to computational scientists

Re: multi-core software

2009-06-07 Thread Dave Angel
Lew wrote: div class=moz-text-flowed style=font-family: -moz-fixedScott David Daniels wrote: the nub of the problem is not on the benchmarks. There is something to be said for the good old daays when you looked up the instruction timings that you used in a little document for your machine, and

Re: multi-core software

2009-06-07 Thread Jon Harrop
Ken T. wrote: On Sun, 07 Jun 2009 11:16:46 -0400, Lew wrote: So the good old days are a matter of degree and self-deception - it was easier to fool ourselves then that we could at least guess timings proportionately if not absolutely, but things definitely get more unpredictable over

Re: multi-core software

2009-06-07 Thread Arved Sandstrom
Jon Harrop wrote: Arved Sandstrom wrote: Lew wrote: Interesting distinction. Would it be fair to compare concurrent programming to the bricks used to build the parallel program's edifice? Way too much of a fine distinction. While they are in fact different, the point of concurrent

Re: multi-core software

2009-06-07 Thread Jon Harrop
Arved Sandstrom wrote: Jon Harrop wrote: Arved Sandstrom wrote: Lew wrote: Interesting distinction. Would it be fair to compare concurrent programming to the bricks used to build the parallel program's edifice? Way too much of a fine distinction. While they are in fact different, the point

Re: multi-core software

2009-06-07 Thread Ken T.
On Mon, 08 Jun 2009 02:39:40 +0100, Jon Harrop wrote: Ken T. wrote: On Sun, 07 Jun 2009 11:16:46 -0400, Lew wrote: So the good old days are a matter of degree and self-deception - it was easier to fool ourselves then that we could at least guess timings proportionately if not absolutely, but

Re: multi-core software

2009-06-07 Thread Paul Rubin
George Neuner gneun...@comcast.net writes: Even the lightest weight user space (green) threads need a few hundred instructions, minimum, to amortize the cost of context switching. I thought the definition of green threads was that multiplexing them doesn't require context switches. --

Re: multi-core software

2009-06-07 Thread Paul Rubin
Jeff M. mass...@gmail.com writes: Even the lightest weight user space (green) threads need a few hundred instructions, minimum, to amortize the cost of context switching There's always a context switch. It's just whether or not you are switching in/out a virtual stack and registers

Re: multi-core software

2009-06-07 Thread Jon Harrop
Paul Rubin wrote: Jeff M. mass...@gmail.com writes: Even the lightest weight user space (green) threads need a few hundred instructions, minimum, to amortize the cost of context switching There's always a context switch. It's just whether or not you are switching in/out a virtual

Re: multi-core software

2009-06-07 Thread Jon Harrop
Scott David Daniels wrote: Lew wrote: Scott David Daniels wrote: the nub of the problem is not on the benchmarks. There is something to be said for the good old daays when you looked up the instruction timings that you used in a little document for your machine, and could know the cost of

Re: multi-core software

2009-06-07 Thread Scott David Daniels
Lew wrote: Scott David Daniels wrote: the nub of the problem is not on the benchmarks. There is something to be said for the good old daays when you looked up the instruction timings that you used in a little document for your machine, and could know the cost of any loop. We are faster now,

Re: multi-core software

2009-06-07 Thread Roedy Green
On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false cache coherency communication where no actual sharing is taking place. Or locks that

Re: multi-core software

2009-06-07 Thread Raymond Wiker
Roedy Green see_webs...@mindprod.com.invalid writes: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false cache coherency communication

Re: multi-core software

2009-06-06 Thread George Neuner
On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green see_webs...@mindprod.com.invalid wrote: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false

Re: multi-core software

2009-06-06 Thread John Thingstad
På Sat, 06 Jun 2009 21:46:51 +0200, skrev George Neuner gneun...@comcast.net: On Fri, 05 Jun 2009 16:26:37 -0700, Roedy Green Add to that the fact that programmers have shown themselves, on average, to be remarkably bad at figuring out what _should_ be done in parallel - as opposed to what

Re: multi-core software

2009-06-06 Thread Jeff M.
On Jun 6, 9:58 pm, Paul Rubin http://phr...@nospam.invalid wrote: George Neuner gneun...@comcast.net writes: Even the lightest weight user space (green) threads need a few hundred instructions, minimum, to amortize the cost of context switching. I thought the definition of green threads

Re: multi-core software

2009-06-05 Thread Roedy Green
On Thu, 4 Jun 2009 09:46:44 -0700 (PDT), Xah Lee xah...@gmail.com wrote, quoted or indirectly quoted someone who said : • Why Must Software Be Rewritten For Multi-Core Processors? Threads have been part of Java since Day 1. Using threads complicates your code, but even with a single core

Re: multi-core software

2009-06-05 Thread Kaz Kylheku
On 2009-06-05, Vend ven...@virgilio.it wrote: On Jun 4, 8:35 pm, Roedy Green see_webs...@mindprod.com.invalid wrote: On Thu, 4 Jun 2009 09:46:44 -0700 (PDT), Xah Lee xah...@gmail.com wrote, quoted or indirectly quoted someone who said : • Why Must Software Be Rewritten For Multi-Core

Re: multi-core software

2009-06-05 Thread Scott Burson
On Jun 4, 9:46 am, Xah Lee xah...@gmail.com wrote: Of interest: • Why Must Software Be Rewritten For Multi-Core Processors?  http://xahlee.org/UnixResource_dir/writ/multi-core_software.html plain text version follows. -- Why Must Software Be

Re: multi-core software

2009-06-05 Thread Vend
On Jun 6, 1:26 am, Roedy Green see_webs...@mindprod.com.invalid wrote: On Fri, 5 Jun 2009 18:15:00 + (UTC), Kaz Kylheku kkylh...@gmail.com wrote, quoted or indirectly quoted someone who said : Even for problems where it appears trivial, there can be hidden issues, like false cache

Re: multi-core software

2009-06-04 Thread Kaz Kylheku
[Followup-To: header set to comp.lang.lisp.] On 2009-06-04, Roedy Green see_webs...@mindprod.com.invalid wrote: On Thu, 4 Jun 2009 09:46:44 -0700 (PDT), Xah Lee xah...@gmail.com wrote, quoted or indirectly quoted someone who said : • Why Must Software Be Rewritten For Multi-Core Processors?

Re: multi-core software

2009-06-04 Thread MRAB
Kaz Kylheku wrote: [Followup-To: header set to comp.lang.lisp.] On 2009-06-04, Roedy Green see_webs...@mindprod.com.invalid wrote: On Thu, 4 Jun 2009 09:46:44 -0700 (PDT), Xah Lee xah...@gmail.com wrote, quoted or indirectly quoted someone who said : • Why Must Software Be Rewritten For