Close
  • Latest News
  • Cybersecurity
  • Big Data and Analytics
  • Cloud
  • Mobile
  • Networking
  • Storage
  • Applications
  • IT Management
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
Read Down
Sign in
Close
Welcome!Log into your account
Forgot your password?
Read Down
Password recovery
Recover your password
Close
Search
Menu
Search
  • Latest News
  • Cybersecurity
  • Big Data and Analytics
  • Cloud
  • Mobile
  • Networking
  • Storage
  • Applications
  • IT Management
  • Small Business
  • Development
  • Database
  • Servers
  • Android
  • Apple
  • Innovation
  • Blogs
  • PC Hardware
  • Reviews
  • Search Engines
  • Virtualization
More
    Home Development
    • Development

    Progressing with Parallel Processing

    By
    Peter Coffee
    -
    September 25, 2006
    Share
    Facebook
    Twitter
    Linkedin

      The proliferation of parallel processing hardware is creating a fast-growing need for multithreading skills. A developer who cant write safe and efficient concurrent code may waste up to half the power of the dual-core CPUs already found in laptop PCs and up to three-quarters of the power of the quad-core CPUs that Intel announced it plans to ship in November.

      Even Intel—formerly a loud promoter of clock rate as the metric of microprocessor leadership—has clearly drunk the Kool-Aid of getting more work done per clock cycle.

      Hyperthreading within a single core, single CPUs with multiple cores and multiple CPUs in even the most compact servers are the pathways that are being most actively explored by both Intel and Advanced Micro Devices in the x86 world and by Sun Microsystems and others for other CPU architectures.

      Intels investments in college curricula and resources for multithread development training and its August release of new tools for multithread code optimization send additional signals that no developer should ignore.

      Guru Jakob Nielsen offers advice on designing applications for usability.

      Click here

      to watch the video.

      The Java programming language, like Ada before it, lets developers express concurrency in the same language that theyre already using for application logic. This avoids the need to devise a new meta-language, bloating and complicating their code, for that purpose.

      Developers using languages such as C++ are not being left behind: Concurrency tool kits and frameworks, including Intels Threading Building Blocks for C++ (which debuted at the end of August), also offer powerful abstractions. A developer using Intels library can summon up, for example, an instance of the class Parallel_Task and fill that fully managed container with the task-specific details of the computations to be made.

      Even so, developers should not underestimate the challenges that they still face. They may wrongly expect that theyll be able to count the threads that theyre using on the fingers of one hand: one for user input, one for network interaction, one for graphical operations and so on. Thats a naively optimistic view, according to Brian Goetz, principal author (with five co-authors) of “Java Concurrency in Practice,” an Addison-Wesley title published in May.

      The authors were members of the Java Community Process Expert Group that defined new high-level components and low-level mechanisms for improved concurrent development in Java 5.0 (more here).

      “The need for thread safety is contagious,” these authors warn, since “frameworks may create threads on your behalf, and code called from these threads must be thread-safe. … Frameworks by their nature make callbacks to application components that in turn access application state.” The need for thread safety, they observe, further “extends to all code paths that access the program state accessed by those components.”

      There are two key ideas in just this brief passage that developers may find useful. The first is the suggestion by the authors that developers should not let themselves become overwhelmed by the mechanisms of threading but should rather stay focused on the question of application state.

      If developers can accurately identify the places where an application is maintaining state, they may then be able to form a clear mental picture of the pathways in their code that have the power to alter that state. Developers can then take measures to ensure that no such alterations can create invalid state. For example, a developer can write code (or use a thread-safe counter) to make sure that an event-counting variable has been incremented by one thread before any other thread is allowed to look at the variables previous value.

      Developers must also appreciate that multithread environments may expose careless habits that are wrong, but tolerable, in simpler single-thread environments.

      “Code confidence is about as close as many of us get to correctness,” the authors of “Java Concurrency in Practice” warn. A clear specification has always been a good starting point for any nontrivial code, but in multithread environments it becomes even more essential.

      What the brain lacks language to describe, the mind cant even imagine—or so some linguists claim. As coders face the challenge of writing programs for multicore and multi-CPU machines, they depend on designers of programming languages and builders of application frameworks to create an effective vocabulary of concurrency.

      Peter Coffee can be reached at [email protected]

      Check out eWEEK.coms for the latest news, reviews and analysis in programming environments and developer tools.

      Avatar
      Peter Coffee
      Peter Coffee is Director of Platform Research at salesforce.com, where he serves as a liaison with the developer community to define the opportunity and clarify developers' technical requirements on the company's evolving Apex Platform. Peter previously spent 18 years with eWEEK (formerly PC Week), the national news magazine of enterprise technology practice, where he reviewed software development tools and methods and wrote regular columns on emerging technologies and professional community issues.Before he began writing full-time in 1989, Peter spent eleven years in technical and management positions at Exxon and The Aerospace Corporation, including management of the latter company's first desktop computing planning team and applied research in applications of artificial intelligence techniques. He holds an engineering degree from MIT and an MBA from Pepperdine University, he has held teaching appointments in computer science, business analytics and information systems management at Pepperdine, UCLA, and Chapman College.

      MOST POPULAR ARTICLES

      Android

      Samsung Galaxy XCover Pro: Durability for Tough...

      Chris Preimesberger - December 5, 2020 0
      Have you ever dropped your phone, winced and felt the pain as it hit the sidewalk? Either the screen splintered like a windshield being...
      Read more
      Cloud

      Why Data Security Will Face Even Harsher...

      Chris Preimesberger - December 1, 2020 0
      Who would know more about details of the hacking process than an actual former career hacker? And who wants to understand all they can...
      Read more
      Cybersecurity

      How Veritas Is Shining a Light Into...

      eWEEK EDITORS - September 25, 2020 0
      Protecting data has always been one of the most important tasks in all of IT, yet as more companies become data companies at the...
      Read more
      Big Data and Analytics

      How NVIDIA A100 Station Brings Data Center...

      Zeus Kerravala - November 18, 2020 0
      There’s little debate that graphics processor unit manufacturer NVIDIA is the de facto standard when it comes to providing silicon to power machine learning...
      Read more
      Apple

      Why iPhone 12 Pro Makes Sense for...

      Wayne Rash - November 26, 2020 0
      If you’ve been watching the Apple commercials for the past three weeks, you already know what the company thinks will happen if you buy...
      Read more
      eWeek


      Contact Us | About | Sitemap

      Facebook
      Linkedin
      RSS
      Twitter
      Youtube

      Property of TechnologyAdvice.
      Terms of Service | Privacy Notice | Advertise | California - Do Not Sell My Information

      © 2021 TechnologyAdvice. All Rights Reserved

      Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.

      ×