By Rob Oshana
I met several application developers at the Freescale Technology Forum two weeks ago. There was a lot of talk about how multicore processors are becoming ubiquitous in embedded processing and many discussions centered on architectural considerations and development challenges.
As these processors become more and more complex, the application developer needs to understand many important architectural details to facilitate proper partitioning of applications across multiple processing elements. These processing elements could include multiple heterogeneous or homogeneous CPUs as well as function acceleration blocks and complex peripheral subsystems. Multicore processors are complex systems and require the following to be successfully adopted:
- System configuration and partitioning to achieve the best overall performance of the application
- System virtualization to abstract the complexity from the developer and provide flexibility in the solution model
- System visualization to understand the system performance and profile as data flows through the cores, accelerators, peripherals, and communicate interconnect
System configuration and partitioning
System configuration for a multicore solution involves decisions about how to partition the application services across multiple cores and accelerators. There are two approaches to configuring a multicore system using operating system resources. The first approach is to control the cores on the device with a single operating system. This approach is called Symmetric Multi-Processing (SMP). This is how many desktop systems work. The OS controls all of the major management functions of the system including scheduling, messaging, synchronization, memory management, and the other services required to implement the complete system. This approach works well for relatively simple systems but is hard to scale as the system complexity grows. An alternative approach is to run an independent copy of the OS on each of the cores. This is referred to as Asymmetric Multi-Processing (AMP ) . This approach provides support for added system complexity and flexibility. For example, each core can be independently restarted if needed using an AMP approach. The OS’s can also be different (Linux plus a RTOS for example running on different cores).
System virtualization
There are scenarios where multiple operating systems may be required on a multicore device. There may even be the need to have more than one OS share the same core if you choose to enable a legacy application or provide performance capability where low latency is required. To accomplish this and also manage the resulting complexity, you must take additional steps to transform the multicore system into a virtual machine. A virtual machine is created by running the OS’s on a software implementation of the device. This software is called a hypervisor and sits below the operating system(s) and manages access to the system resources such as memory, peripherals, and other system resources that are not duplicated for each core.
System visibility
One disadvantage of integrating multiple cores and accelerators on a single die is the vanishing visibility that this causes. There is limited access to the on-chip capability from the outside world (e.g. the device pins), so bus analyzers and logic analyzers become more difficult to use. In order to overcome this, more of the instrumentation, debug, and profiling logic is being moved from the logic analyzer to the chip itself. We accomplish this by integrating the various cores, accelerators, peripherals, and interconnect with the appropriate triggers, counters, and trace capability. The developer then needs the proper software tooling to gain access to this important visibility for both profiling and debug, to aid with system integration and performance enhancement.
So in summary, multicore processors are complex systems that you can use to solve complex problems. In order to take full advantage of these powerful devices, they must be configured properly to achieve the best overall performance of the application,virtualized to abstract the complexity from the developer and provide flexibility in the solution model, and visualized to understand the system profile and performance as data flows through the cores, accelerators, peripherals, and communication interconnect. Proper support and understanding of these three multicore paradigms will give the developer the tools needed to effectively produce high performing multicore solutions.
I would love to hear from you on what you think are the key challenges of multicore software development.
4 Trackbacks
[...] the challenges and need for good data visualization as a key to multicore software development in Top 3 Keys to Multicore Software Development. I couldn’t agree [...]
[...] a software perspective, as Rob Oshana noted in the Top 3 Keys to Multicore Software Development, the advent of all this processing real estate can be daunting. One of his keys was system [...]
[...] code really works. Rob Oshana talked about the importance of visibility in his blog article on the Top 3 Keys to Multicore Software Development. These themes have a way of reappearing because they are fundamental. The simple truth is, without [...]
[...] Top 3 Keys to Multicore Software Development [...]