Multithreading Partition Scheduling navigation bar

Table of Contents > QUARC > User's Guide

Multiprocessing

Quanser was not content to merely support multiple threads. QUARC is capable of utilizing multiple processors or CPU cores in a symmetric multiprocessing (SMP) system. On a Windows target with four cores, QUARC can make use of all four cores. For example, in a multirate system QUARC allots one thread to each sampling rate. Each of those threads in turn, can run on any of the available CPU cores, leading to genuinely concurrent execution of those threads. QUARC's multiprocessing support allows you to make the maximum use of the computing resources available.

However, in industrial applications, fine-grained control over the use of multiple processors and cores is sometimes required for robust performance. It may be desirable in some circumstances to manage the use of each processor or core individually. QUARC is designed to provide such control through the use of bound multiprocessing.

To control the CPU time allotted to models sharing a single CPU or processor core, peruse the section on Partition Scheduling.

Bound Multiprocessing (BMP)

In QUARC's bound multiprocessing paradigm, each QUARC model may be constrained to run on a particular CPU or CPU core, or even restricted to a subset of those CPUs. Thus, it is possible to partition QUARC models into different groups, with each group dedicated to a particular set of CPUs or CPU cores. Better performance may be achieved for a model limited to a particular CPU if it means that the cache does not have to be reloaded when the model is rescheduled on that CPU. Bound multiprocessing can also ensure that a particular model is guaranteed to have CPU time available if the other processes are prevented from using that CPU.

This segregation is accomplished through setting the processor affinity of the model, which indicates the set of CPUs or CPU cores upon which the model may run. QUARC refers to this setting as the model affinity. The model affinity is configured via the Model affinity field of the Code Generation/QUARC tab of the Configuration Parameters dialog. Refer to this link for details.

 

navigation bar