Model-driven development for multicore-based software

by Ravi Patil , TechOnline India - March 09, 2011

Model-driven development methods will help software design teams perform multicore design trade-off studies, visualize and refactor code for greater reuse, and automatically generate code for hardware configuration and communication protocols.

In a quest to bring innovative and differentiated products to market faster, the electronics industry will increasingly adopt multicore processing to reap the benefits of higher performance, longer battery life and increased flexibility, as well as lower power consumption and lower cost. Vendors can only realize those advantages, however, when they architect software specifically for multicore devices. 

Model-driven development methods will help software design teams perform multicore design trade-off studies, visualize and refactor code for greater reuse, and automatically generate code for hardware configuration and communication protocols.

With software a critical factor in delivering on the promise of multicore, let’s take a look at the landscape of multicore computing and examine several cutting-edge software development methods.
 
The promise of multicore 
 
The tide has turned in the drive to increase performance and reduce power consumption in the computing platforms used for building today’s advanced electronic products. From PCs and workstations to smartphones and other portable devices, consumer demand for ever-improving performance, battery life and advanced features has led device manufacturers to build and deliver products that use multicore technologies. The next generation of smarter products will rely on multicore processors to deliver even greater usability and productivity to an increasingly technology-savvy clientele. 

Traditional processors deliver better performance by cramming more transistors on a die and increasing the clock rate in a never-ending challenge to Moore’s Law. While that trend will continue, true leaps in performance and power management lie in innovation around multicore technologies.

Multicore-based systems typically operate at slower clock speeds, which can significantly improve battery life and reduce heat production. The cooler operating temperatures allow for quiet (fanless) cooling systems and products with smaller form factors. thanks to a reduction in the number of distinct processors.

Further, multicore operating environments support true multitasking and better application performance than single-core environments. And multicore makes true parallelism possible when handling increasing loads of compute-intensive applications.
 
Environmental challenges
 
For system designers, decisions about the actual number of necessary processors and cores, operating system characteristics (symmetric or asymmetric) and required middleware are difficult. They must take into account new issues regarding application partitioning and both intercore and intertask communication, as well as the scalability of a multicore design. Features of the operating system(s) and potential middleware increase the complexity of the overall software design as well.

Simply put, organizations moving to multicore will require changes in the skill set of their software design teams.

For parallelism to become the norm, application design must map to the advantages of the parallel architecture available in a multicore operating environment. Considerations regarding increased use of multiple tasks, intertask communication mechanisms and task-to-core allocation all become critical in successful application development. Also, reuse increases in importance for tasks and components of these software-intensive systems.

Debug and test are critical when deploying software for a multicore system. Traditional code-level debug and late-cycle testing techniques often do not scale to multicore environments. So new techniques and test environments are needed to ensure that software is operating correctly and providing the required level of functionality.

Three methods

Experience has taught us three useful methods for effective multicore development.
 
• Perform trade-off studies to assess alternatives. Moving an existing system to a multicore processor can cause it to run at the same speed or even slower. This is because the actual cores are typically slower on an individual basis than on the original processor. 

As a result, the whole application may run at the speed of a single core because shared data can slow down communication. Implementing trade-off studies is therefore critical in assessing alternatives to ensure desired improvements in performance, speed and resource utilization. 

Modeling your product’s software architecture and creating options for it to run on multiple cores make trade-offs easier to diagnose. By mapping existing tasks to cores and adding more tasks as needed, you can learn how to optimize communications between the tasks involved in your applications. 

An important related assessment method is to simulate the model you build to verify that everything works as expected. 
 
• Use existing software to accelerate development. If your application runs well in the existing single-core operating environment, it may function properly in the new multicore environment. So you’ll want to retain its value by reusing as much code as you can while working to ensure that it will perform correctly and scale to meet the demands of the new environment.
 
Development for multicore—anchored by a model-driven approach—should present significant software reuse opportunities. From the simple visualization of the structure and relationships of the software and its component parts, to refactoring the code for deployment within a multicore environment and on to integration and extension into completely new design architectures, the right model-driven tooling can accelerate your ability to reuse your code. 

Existing software components can be used in new designs built for multicore-based products. Again, visualization, refactoring and automated generation capabilities in a strong model-driven development tool greatly enhance your ability to make these reuse decisions.

New applications can be written and delivered for products, and the model-driven approach limits the need to design from scratch. The successful track record of the reused components means their behavioral aspects are understood and tested, thereby allowing the test-and-debug efforts to focus on performance. 

 

• Automate software generation to improve quality. Because multicore technology inherently provides a highly parallel environment, communication between tasks within an application becomes critical. Tasks must use different mechanisms as they communicate between one core and another, further necessitating good interfaces between tasks. 
 
Implementing a modeling environment to enable the automatic generation of supporting communication mechanisms helps you better understand, specify and explore alternatives involved in task switching. Modeling also helps you analyze different hardware and communication protocols, and model-driven tools further speed the process with automatic code generation. This allows for the visualization of the design and its systematic replication in the generated code.

When moving a task from one core to another, you can—as needed—regenerate and reflect the modeled change in code that is specific to the new core, even if it uses a different operating system or has to use a different protocol to communicate to tasks on the original core. Typically, this requires hand coding, but a modeled application provides simple assignment of the options, with the automatic generation taking care of the rest of conversion.

About the Author:

Ravi Patil is industry marketing manager for IBM Rational Software. He has an MSME from MIT and an MBA from the University of Michigan.

 

About Author

Comments

blog comments powered by Disqus