iWave Japan      Welcome to iWave Systems

Symmetric Multi-Processing support verification on Windows Embedded Compact 7 with i.MX6 Quad Core platform

Multicore Processor Technology’ will be the key in the development of next generation of advanced computing devices. With major silicon vendors such as Freescale, Texas Instruments (TI) and others, bringing multi-core application processors for the mainstream embedded devices, there is  need to have the multi-core processing support in the embedded operating systems.Windows Embedded Compact 7  will enhance the perfromance of ARM based multi-core platfroms with the addition of Symemtric Multi-Processing (SMP) support. iWave systems has done a SMP support verification on its Freescale’s i.MX6 Quad core processor running Windows Embedded Compact 7 platform.

Symmetric Multi-Processing (SMP) support in Windows Embedded Compact 7:

The most important update in the Windows Embedded Compact 7 is the support for Symmetric Multi-Processing (SMP) which takes the full advantage of multi-core systems providing a perfromance boost when the multithreaded applications are being used. The multicore processor platforms such as Freescale’s i.MX6Q which has 4 identical CPU cores, can effectively take advantage of SMP support in Windows Embedded Compact 7.

SMP enabled kernel can use several CPU cores simultaneously and distribute the execution of different processes and threads to them. The number of available cores can be determined by SMP API from the application – the processing and assignment of a thread to a specially selected core is also possible.

Along with the performanceimprovement, the primary benefit of SMP is to prevent a single, runaway thread (having a considerably high priority) from severely affecting the overall performance of the system. As shown below, Thread 1 which is at high priority, blocks the CPU completely and effects the execution of Thread 2 which is at considerably lower priority. 

Symmetric Multi-Processing support verification on Windows Embedded Compact 7 with i.MX6 Quad Core platform

In a SMP based Windows Embedded Compact 7 system, the runaway thread would consume the capacity of only one of the cores, but the other cores in the CPU would remain available to the operating system for other threads. Kernel would then schedule the other threads on the available cores thus utilizing the multi-core capability of the system.

Windows Embedded Compact 7

Threads and Processor assignment using Windows Embedded Compact 7 SMP API’s:

Following table shows the SMP functions available in the Windows Embedded Compact 7 for handling thread or processor scheduling on multi-core systems.


Obtains the number of the processor on which the current thread is running during the call to this function.


Obtains the idle time for the specified processor.


Obtains the process affinity for the specified process.


Obtains the thread affinity of the specified thread.


Obtains the total number of processors in the system.


Turns off the specified processor.(Kernel mode function)


Turns on the specified processor. (Kernel mode function)


Sets a processor affinity for the specified process.


Sets a processor affinity for the specifie

 Demo Application:

A sample application is created which demonstrates the SMP feature capability of Windows Embedded Compact 7 on Freescale’s i.MX6Q platform.

WinCE 7

CeGetTotalProcessors returns the total number of processor cores available on i.MX6Q which would be 4 in this particular case.

GetCurrentProcessorNumber will return the processor core number on which the current thread or process is running.

CeSetProcessAffinity and CeSetThreadAffinity changes the processor core from current to the one which is been specified in the argument for a process or a thread respectively.

CePowerOffProcessor and CePowerOnProcessor turns OFF or ON a particular processor core which would result in the power optimization without any side effects on the system performance. These two functions are available only in the kernel mode.


As shown below current thread is running on processor core 3 in the beginning, when the affinity of the thread is changed to processor core 4 using SMP functions, it has started running on processor core 4.

Symmetic Multi Processing on Windows Embedded Compact 7
Figure 1: SMP Test on Freescale's i.MX6Q with Windows Embedded Compact 7

Benefits of SMP: 

  1. In situations where more than one program executes at the same time, an SMP supported multicore system will have better performance than single-processor because different programs can run on different CPUs simultaneously.
  2. SMP feature will allow to execute the hard real-time application on one core while a User Interface (UI) app or other application threads can be scaled on other cores.
  3. In addition to the distribution of processes and threads, however the cores themselves can be managed: With the exception of the main core, all other cores can be switched on or off dynamically by API at runtime which will result in the efficient power utilization.

AshfaqueAhamed-Software Engineer
iWave Systems Technologies
Windows Embedded CE Developer