Manually Assigning CPUs
- Updated2025-08-15
- 2 minute(s) read
LabVIEW makes it easy to take advantage of multiple CPU systems, also known as multi-core, multiprocessor, or SMP systems, using parallelism or pipelining. In certain cases, you might be able to achieve an even more efficient CPU utilization by manually assigning particular threads to particular processors.
(Real-Time, Windows) You can use the Timed Loop to manually control CPU allocation. For example, consider an application with parallel Timed Loop X, Y, and Z running on a system with two CPUs. The Timed Loops take 100 ms, 100 ms, and 200 ms, respectively, to execute. If the Timed Loops are all set to the default priority, the CPU scheduler might assign Timed Loop X and Z to run on one CPU and Timed Loop Y to run on the other CPU, resulting in a total execution time of 300 ms, as shown in the following illustration.
You could optimize the VI by manually assigning Timed Loop X and Y to one CPU and Timed Loop Z to the other CPU, as shown in the following block diagram.
In this case, manual CPU assignment reduces the total execution time to 200 ms, as shown in the following illustration.