Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Herb Sutter is arguing that current clockspeeds have hit a practical limit, and the only way to keep Moore's "Law" going is with multi-core CPUs:

http://www.gotw.ca/publications/concurrency-ddj.htm

Critique of the Article

I think some of his points are flawed. First, there are too few datapoints at the end of his chart to note a trend. However, the point that clock speeds are leveling off is probably correct, considering announcements of future processors from Intel and AMD.

What Sutter doesn't do is make the First Most Common CPU Mistake, which is assuming that clock speed is the only factor. Instead, he makes the Second Most Common CPU Mistake, which is acknowledging that clock speed isn't the only factor, but then ignoring this fact for the rest of the prose.

Notice in his chart that although clock speeds might be leveling off, transister counts keep going up. Further, note that other types of processors have much higher transister counts than Intel or AMD CPUs. An nVidia 6800 Ultra graphics card has a processor with 222mil transisters. The latest Pentium 4 processors have 149mil transisters, and much of that is cache. (Modern graphics cards are fully programmable and could be used as a general-purpose CPU if you're willing to put the effort into it).

He seems to assume throughout the article that because clock speeds are falling off, the only way to get future performace gains is through multi-threaded programms running on multi-core CPUs. However, he mistakes the reasons for not aiming for higher clock speeds:

We’ll probably see 4GHz CPUs in our mainstream desktop machines someday, but it won’t be in 2005. Sure, Intel has samples of their chips running at even higher speeds in the lab—but only by heroic efforts, such as attaching hideously impractical quantities of cooling equipment. You won’t have that kind of cooling hardware in your office any day soon, let alone on your lap while computing on the plane.

According to the recent CPU guide on Tom's Hardware, the current Pentium 4 processors are maxing at 115 watts of heat loss (note that the Athlon Thunderbirds were considered very high at around 70-80 watts). This would seem to go along with his point.

However, according to the same article above, the latest Athlon64 processors are maxing at an impressive 33 watts. So the heat problem isn't a problem (at least for the forseeable future), but is rather due to an inefficiency in Intel's processor lineup.

In short, his statement that the old ways of increasing CPU speeds are hitting practical limits is flawed. Transister counts are still rising, and designs can still be improved. Eventually, we will hit that limit, but we're not close yet. Just when we'll hit that limit is the matter of some debate, but we can safely leave it alone for now.

But he Still has a Point

With multi-core CPUs, we'll see a good reason for enhancing concurrency in software, even when targetted for low-end desktops and servers.

He compares this to the way OO finally caught on in the '90s. "In the 1990s, we learned to grok objects", he says. Many would say that in the '90s, we learned to grok objects poorly. We can all list off projects that had a flawed OO design that still passes user requirements. The only people directly affected by bad OO design are the people doing the coding on the project.

Concurrency is different because bad concurrency will have obvious (though often transient) bugs that can leak through in either testing or production. Bad concurrency will be noticed by users at some point. As such, I think programmers will have more incentive (compared to OO) for groking concurrency well.

I'm employed as a web programmer. Many are quick to say that web applications usually don't need threads, but this isn't entirely true. Most web servers for serious web sites use a threading model for handling requests that can take advantage of multi-processor/multi-core/hyperthreaded systems. Your own code may not use threads or fork off, but it is one thread/processes in a larger program tree. Even so, this has been the situation for a long time, and experianced web programmers know how to deal with it.

However, web programming isn't the only place Perl is located, and has been known to move into new areas whenever it wants to (once for sys admins, then for the web, and more recently for genetics). Wherever Perl is found, and wherever it may one day be, concurrency may not be as prevelent as it was for web sites, and Perl will have to deal with that.

So I leave this brain-dump with a question: what can we do to improve Perl's concurrency? The Lambda the Ultimate fourm has a posting that discusses the way many other languages are dealing with it, and may provide a source of inspiration for continuing the grand Perl tradition of stealing good ideas from other languages.

Update: Title correction per erix's suggestion.

"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.


In reply to Concurrency in Perl by hardburn

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (2)
As of 2024-04-25 19:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found