Software simplified: StreamIt is a software language and compiler that allows programmers to easily program multicore machines--a task called parallel programming that is otherwise time-consuming and difficult.
Saman Amarasinghe

Computing

Simpler Programming for Multicore Computers

A new programming language could make it easier to write software for multicore machines.

  • Friday, April 27, 2007
  • By Kate Greene

The number of cores--or number-crunching units--in microprocessors is doubling with each generation, providing enormous computing potential for desktops, laptops, and, eventually, handheld gadgets. Current quadcore machines, for example, are particularly useful for such computation-hungry applications as video processing and gaming. However, the new multicore machines are basically small-scale supercomputers, and in order to take full advantage of the computing power they offer, software must be written with multiple cores in mind--a time-consuming and difficult task known as parallel programming. And many experts believe that unless parallel programming can be made easier, computing progress will come to a grinding halt.

Researchers at MIT are looking for a way to ease the pain of parallel programming. They have designed a computer language and a compiler--a specialized tool that converts the language into computer instructions--that essentially hides the parallel-programming challenges, yet takes advantage of the power of multiple cores. The language and compiler, called StreamIt, were developed by Saman Amarasinghe, a professor of electrical engineering and computer science at MIT. StreamIt currently runs on a specialized multicore machine built at MIT, but by this summer, Amarasinghe expects to have the software ready to run on commercial chips made by IBM, Sony, and Toshiba found in Sony's PlayStation 3 machines.

"Creating software is still something a lot of people can do, but if they had to deal with parallelism, it becomes much more difficult," says Amarasinghe.

In single-core machines, software code runs, for the most part, sequentially. This means that tasks--such as accessing certain chunks of memory to open a program--occur one after another, in a predictable way. In a multicore system, tasks get split up among cores. And when different tasks need to access the same chunk of memory, the tasks have to work together to carefully orchestrate--or synchronize--the accesses. If multiple tasks inadvertently access the same data without proper synchronization, the data will get corrupted, producing incorrect results or crashing the program.

Advertisement

In single-core machines, it's fairly easy to debug programming errors or unintended problems because the cause can be traced back to a particular instruction. But Amarasinghe says that some bugs in parallel systems are more difficult to fix because they are probabilistic--meaning that they only arise occasionally; each time the program runs, the multiple cores execute their tasks independently, leading to billions of possible execution orders for the program.

Amarasinghe's solution is based on a well-known concept called data flow, in which data is streamed sequentially through a sort of pipeline of functions. As the data flows the compiler sees which functions are independent. Thus, the compiler can place separate tasks on different cores, not worrying that they will interfere with one another or touch the same piece of memory.

A programmer only needs to write software that operates in a sequential way. The compiler sees all the interactions that need to occur, based on the code written by the programmer, and allocates the instructions appropriately to keep bugs from arising.

It is a sound idea based on well-known concepts, says Ras Bodik, a professor of computer science at the University of California, Berkeley. "If you want programmers who are not experts in parallelism to be productive, if you want them to effectively write programs, you want to give them a language like StreamIt," he says. However, Bodik suspects that software engineers will need to rely on a hierarchy of tools that operate at different levels. For instance, transactional memory, which allows numerous tasks to share the same memory at the same time, could operate behind the scenes, helping maximize StreamIt's potential. (See "The Trouble with Multi-Core Computers.")

Print

Related Articles

New Language for Programming in Parallel

Writing code for the latest multicore chips is notoriously tricky, but a new language could make it simpler, and make computers more efficient in the process.

New Languages, and Why We Need Them

Creators introduced the programming languages that they hope will revolutionize computing.

The Future of Computing, According to Intel

Massively multicore processors will enable smarter computers that can infer our activities.

Close Comments

To comment, please sign in or register

Forgot my password

Guest (eightwings)

  • 1744 Days Ago
  • 04/27/2007

Non-algorithmic, Visual Programming

""Creating software is still something a lot of people can do, but if they had to deal with parallelism, it becomes much more difficult," says Amarasinghe."

It's even worse when they have to use a natural language (usually English) which may not even be their native language. The real reason that people find it hard to program parallel code is that they are forced to use a linguistic tool which is inherently sequential. Switch to a proper visual tool based on a non-algorithmic, reactive software model and all the problems (e.g., low productivity and unreliability) will disappear.

Reply

zzyzzy

6 Comments

  • 1742 Days Ago
  • 04/29/2007

Re: Non-algorithmic, Visual Programming

Hi
I am going to study programing for VR. What programming method do you recommend? I am hoping to a create a VR programing environment that allows use of sight, touch and sound inside a VR simulation of a multi-threaded program. Thanks in advance for your help.

Cheers

Charles Odin

Reply

JamesF

1 Comment

  • 1306 Days Ago
  • 07/08/2008

Re: Non-algorithmic, Visual Programming

"It's even worse when they have to use a natural language (usually English) which may not even be their native language. The real reason that people find it hard to program parallel code is that they are forced to use a linguistic tool which is inherently sequential. Switch to a proper visual tool based on a non-algorithmic, reactive software model and all the problems (e.g., low productivity and unreliability) will disappear."

I completely agree. The guys over at DataRush did exactly that, they created a graphical way of representing parallel processing. Its based on Flow Based Programming, and works with java. It based on some pretty cool Kahn process network ideas here. I thought it was pretty interesting and easy to use.

Reply

Guest (runtime)

Reply

michaelrh

2 Comments

  • 1744 Days Ago
  • 04/27/2007

Broken Link

As of 4/27/11:00 PDT the link works.

Reply

Silacon

55 Comments

  • 1744 Days Ago
  • 04/27/2007

Parallel demons

We invented a way of applying HMM, Microsoft Project and recurrent neural networks with multiple delay FB loops in hidden layers that sort task runtimes. We can set up the parallel tasks on a modification of MS Project that is pictorial thus the task gantt bars and PERT bubbles tell the story so one accesses memory without damaging it and the tasks shift as the code runtime on each task shifts on dependent tasks.  Try MS Project to set up your program tasks using minutes as microseconds, etc. Many tasks then can go in parallel and quasi-parallel and the program is optimized. Note that 'virtual memory zones' can appear as tasks that cannot be accessed until the accessing task is done.  Visually, one can see instantly where you are in your code development cycle.

Charles G. Nutter, Silacon Valley Corporation "Technologies that change industries"  See our www.bizino.com, in addition

Reply

Cpt_Nemo

17 Comments

  • 1744 Days Ago
  • 04/27/2007

modifying preexisting tools for multiple cores and A.I.

My approach to solving both the use of multiple core hardware and AI is to implement Java applets with a small program that explains how they relate to each other.

The use of Java applets allows for the expansion beyond 1000s of cores on the one chip.

The inclusion of procedurally generated content reduces the file size and presumably provides shortcuts to the amount of work required


My thoughts are similar with regards to efforts at A.I.

Computer intelligence can learn from the study of emergence - like an ant colony where thousands of workers cooperate to function as a single organism.

One widget or applet keeps track of the temperature, another has as its primary constraint that 10 degrees celsius is too cold and the heater must turn ON, a third has the contraint that 27 degrees is too warm and turns the heater OFF.

The nett result is to increase the intelligence of automated houses, etc. with simple pieces of code that minimise the occurence of bugs and various glitches

Reply

Advertisement

harkiratbedi

1 Comment

  • 991 Days Ago
  • 05/19/2009

Offshore programmer rates

www.ibosstechsolutions.com
Best software development rates & Quality software development

Reply

Advertisement

MAGAZINE

Can We Build Tomorrow's Breakthroughs?

Manufacturing in the United States is in trouble. That's bad news not just for the country's economy but for the future of innovation.

Sponsored Content

Technologies from National Instruments

Taking a Measurement
Learn how to use your PC to take measurements

> Click here for more National Instruments Videos <
Whitepaper

BUILD VERSUS BUY
Understanding the Total Cost of Embedded Design

National Instruments has gathered customer information and data regarding some of the cost differences between building a custom solution versus using NI off-the-shelf tools. Using this data, we built the Graphical System Design ‘Build vs. Buy’ Calculator. The calculator can help show the financial differences between building a custom solution versus buying an off-the-shelf system. This paper discusses the benefits and drawbacks of both a traditional custom design approach and off-the-shelf embedded tools.

View full PDF > Listen to story >
Find us on Youtube

Videos

Windows on an iPad

More

Advertisement

Technology Review Lists

TR50

Our list of the 50 most innovative companies, including the following:

Siemens

Life Technologies

1366 Technologies

SpaceX

More

Advertisement

Facebook

Advertisement