LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Need some clarification on Execution Systems, Priorities, and threads with Labview on Windows NT

Hi,
Can someone explain to me how execution system and priority equate directly to actual processor threads on a Win NT machine? How many actual threads does Windows give to each application? I've read App Note 114 and the manual, but I still can't seem to relate the two. The manual says there is a seperate execution system for each priority (not including user interface or subroutine) and each has two threads. So in total there are 26 execution systems (user interface = 1 and other = 25 (5 execution systems x 5 priorities)). Does this mean there are 52 threads? Help me understand this because I have a very large application that I think could bene
fit from efficient use of threaads.
0 Kudos
Message 1 of 4
(3,343 Views)
sal wrote:
>
> Hi,
> Can someone explain to me how execution system and priority equate
> directly to actual processor threads on a Win NT machine? How many
> actual threads does Windows give to each application? I've read App
> Note 114 and the manual, but I still can't seem to relate the two.
> The manual says there is a seperate execution system for each priority
> (not including user interface or subroutine) and each has two threads.
> So in total there are 26 execution systems (user interface = 1 and
> other = 25 (5 execution systems x 5 priorities)). Does this mean
> there are 52 threads? Help me understand this because I have a very
> large application that I think could benefit from efficient use of
> threaads.

Switch multithreading on an
d off under Edit menu | Preferences, see if
that helps. Sometimes it can help to switch multithreading off!

Many different execution systems and priorities are supported, but your
VIs may only use a few. E.g. only the user and data acquisition threads,
each at normal priority. Thus there are less than 52 threads!

I don't have NT but I have Win2000. In that Task Manager, choose the
Select Columns... option under the View menu, and check Threads. Now you
can look at the number of threads actually running.

For LabVIEW or my built app, I see about 4 threads normally, or about 6
if I enable multithreading.

Mark
Message 2 of 4
(3,343 Views)
.... Does this mean
> > there are 52 threads? Help me understand this because I have a very
> > large application that I think could benefit from efficient use of
> > threaads.
>

Starting with LV5.1, the threads for execution systems are created
as needed when VIs are loaded. LV5 created all of them in advance
and most of them spent their entire life sleeping. There is a
utility VI to make additional changes to how the execution system
behaves. It is possible to have many threads per execution system,
and in fact, the default is to have N threads per execution system
per priority where N is the number of processors on the motherboard.

Please do some reading and some tests before going thread wild.
They are like any other feature/tool. There are good a
nd bad
uses. If you have too many threads that never sleep, then the
CPU spends extra time cycling between them which can actually
result in less work getting done than when things are serialized.

Greg McKaskle
0 Kudos
Message 3 of 4
(3,343 Views)
I can't find anything in my edit menu regarding preferences or switching multithreading on or off.

Where is this feature?
0 Kudos
Message 4 of 4
(3,343 Views)