As designers transition to the latest generation multicore processors, software must be divided into separate partitions to gain the performance benefits of parallel execution. With Intel® Core™ processors, developers have access to multiple techniques to enable this performance gain including symmetric or asymmetric multiprocessing and virtualization. In the symmetric multiprocessing (SMP) configuration, a single operating system allocates threads or tasks across the available cores while managing common memory and hardware resources. Asymmetric multiprocessing (AMP) allows each core to run independent software so that a single system can easily combine real-time, deterministic tasks with a graphical user interface. With virtualization, a hypervisor isolates and allocates system resources between the operating environments so that real-time, general-purpose, and legacy software can be readily integrated in a multicore system.
Each of these performance improvement techniques has some risks especially for safety-critical applications. For example, when parallel, multithreaded applications become part of the software structure they are vulnerable to “race conditions” which occur when concurrent routines have access to, and one of them modifies, a shared memory location. Software failures and bugs caused by these race conditions are not deterministic and may be extremely difficult to locate with normal testing procedures. When developing parallel software, programmers must anticipate these simultaneous activities and once a routine begins to access memory, it must lock out other activities until the transaction is completed. Although this approach sounds feasible, in practice it may run into problems if two routines are trying to “lock out” other activities simultaneously. To tackle these somewhat subtle coding problems, a number of software vendors have integrated analysis tools into their development packages to optimize the transition from serial applications to parallelism.
For C, C++, Java, and C# software development projects, Klocwork offers the Insight static code analysis tools to automatically locate critical programming bugs and security vulnerabilities in source code (See figure 1). Klocwork has developed several approaches to locate and eliminate coding problems associated with multicore architectures. In a whitepaper entitled “Developing Software in a Multicore & Multiprocessor World”, Klocwork CTO Gwyn Fisher discusses techniques to identify unique software problems - specifically concurrency errors and endian incompatibilities. The paper also cites a VDC Research report that multicore and multiprocessor software projects are 4.5 times more expensive and have 25% longer schedules than the single core equivalents. In addition, Klocwork offers an on-demand webinar outlining the complexity of porting software to multiprocessor architectures and demonstrating the use of their Truepath automated, whole-program analysis engine.
Unlike other source code analyzers that run as separate tools, DoubleCheck from Green Hills Software is an integrated static analyzer built directly into the MULTI Integrated Development Environment allowing compilation and defect analysis in the same pass. DoubleCheck evaluates potential execution paths through the code to determine how the values of program variables could change across these paths. To simplify the debugging of complex projects with multiple threads of execution, multiple cores, or multiple boards, the Green Hills Integrated Target List displays all system components hierarchically, making it easier to see relationships among applications, address spaces, tasks, and threads (See figure 2). Status information is displayed for all components, so you can quickly check the system state. The target list in the debugger allows you to follow application execution from one context to another with a single click. You can watch as different threads interact and sort out complex interdependencies easily.
After software has been successfully divided into secure code segments using static analysis tools, the 2nd generation Intel® Core™ architecture provides multiple features that augment the performance benefits of parallel execution. For example, specialized Intel® functions such as Extended Page Tables (EPT) and Page Attribute Table (PAT) provide a hardware assist to the partitioning and allocation of physical memory among multiple cores. The processors also feature Intel® Virtualization Technology for flexible virtualization and Intel® QuickPath Technology to maximize multi-core performance. If you are starting a new multicore project with and you have questions about static analysis tools, please share your concerns with fellow followers of the Intel® Embedded Community. You can also keep up with the latest technical details and product announcements at the Embedded Computing Design archives on Multicore static code analysis.
To view other community content on interoperability, see "Interoperability - Top Picks”
OpenSystems Media®, by special arrangement with Intel® Embedded Alliance
Klocwork and Green Hills Software are Affiliate members of the by Intel® Embedded Alliance.