MeeGo's Multicore Optimization Options
Now that many MeeGo tablets, netbooks, and other handheld devices feature dual-core Intel Atom microprocessors with Intel Hyper-Threading technology, you shouldn't lose the chance to optimize your apps to take advantage of multicore and SIMD instructions. In this post, I explain some of the available options to optimize your C++ MeeGo apps for the newest dual-core Intel Atom microprocessors.More than a year ago, I wrote an article for Dr. Dobb's about one of MeeGo's parents, Moblin. In "Moblin 2.0 Is Multicore Ready," I explained that Moblin 2.0 provided support for multicore microprocessors. The article is also useful for Moblin's son, MeeGo. The MeeGo 1.1 stack contains Linux kernel 2.6.35 already optimized for Intel Atom microprocessors. If you aren't a kernel expert, you can check all the features supported in the same release for the generic kernel in the kernelnewbies.org page for this kernel version. You can find the complete details about each version at http://www.kernel.org/pub/linux/kernel/v2.6/.
The aforementioned article provides detailed steps to check the complete kernel version under Moblin, but you can use the same steps for any MeeGo version. Linux kernel 2.6.35 provides support for Atom multicore microprocessors, Intel Hyper-Threading Technology and Intel Advanced Vector Extensions, known as Intel AVX. If you want more details about the support for Intel AVX in different operating systems, you can read my previous post "Windows 7 and Windows Server 2008 R2 Service Pack 1 Bring AVX Support."
MeeGo 1.1 and future MeeGo 1.2 are already prepared to take advantage of the newest Intel Atom multicore microprocessors. MeeGo's main development framework is Qt. If you plan to use Qt and C++, the following options allow you to optimize your code for multicore and SIMD instructions:
* Qt Threads - You can easily run functions in a separate thread, perform concurrent Filter-Reduce and MapReduce. Qt Threads provide thread pool management but you cannot work with tasks.
* Intel Threading Building Blocks 3.0, known as Intel TBB - You can combine a Qt GUI code with code that uses TBB to distribute work in many tasks. Intel TBB provides a scalable task-based programming approach. Intel TBB uses a high level abstraction for expressing parallelism, and therefore, you leave the low-level threading details to TBB. You can read "Combining TBB and IPP with Intel Parallel Studio," by Bob Davies.
* Boost.Thread library - Boost is a high quality set of C++ libraries. You can launch and manage Boost portable threads to distribute the execution of code in the available cores. In addition, you can use the other Boost optimized libraries. You can read the excellent article written by Anthony Williams to understand the basics of this library
* GCC 4.5.0 - MeeGo 1.1 includes GCC 4.5.0 toolchain. The compiler provides processor specific optimizations for Intel Atom. The run-time library functions are optimized for the Intel SSSE3 instruction set. You can check the new options that provide specific Intel Atom optimizations at the GCC 4.5.0 release series page
* Intel C++ Compiler 12.0 - You can take advantage of vectorization to use SIMD instructions. The compiler provides processor specific optimizations for Intel Atom. However, some compiler options aren't available for MeeGo. You can read this release notes for more information about the compiler options not supported.
* Intel Integrated Performance Primitives 7.0, known as Intel IPP - Intel IPP is a library of highly optimized math software functions for digital media and data-processing applications. The functions use multiple threads and SIMD instructions to achieve the best performance according to the underlying hardware. IPP includes multiple DLLs, and you can call IPP's functions from your Qt apps. Intel IPP has been updated to include optimizations for the latest Intel Atom microprocessors.
A few months ago I had told you dual-core tablets were just around the corner. MeeGo tablets with dual-core Intel Atom microprocessors are already available and these tablets require apps that provide an exciting User eXperience. At the time of this writing, it is still very difficult to make MeeGo run in a virtualized environment. However, you should expect better virtualization support, developer tools and emulators in the near future. If MeeGo wants to be a serious option for tablets and handheld devices, MeeGo will have to provide a serious emulator.