03-03-2004 03:10 PM
03-03-2004 09:08 PM
03-03-2004 09:39 PM
but the
lower priority VI will need to go through thread context switches to and
from the high priority subVI calls.
--- This was our inferred explanation - good to have confirmation. I'm still not sure why a priority-switch is equated to a thread switch, though.
Priorities do not pipe higher octane electrons through your computer. Priorities can only speed one thing up by slowing another down.
--- I understand that. What was a mystery
(and is now explained) is that the subVI is treated as a shared resource EVEN THOUGH there is no competition for it (only one caller). On the face of it, it doesn't make sense for priorities to be involved at all when a single call to a single VI is used. But, you have to go through the same motions, because you don't really know if another VI might call it or not.
Also, what was a mystery was the fact that if A calls B, then B's priority is boosted, if necessary, to match A's. And this occurs AT COMPILE TIME, whether the A--> B call is actually executed or not.
And threads add overhead, especially when not used appropriately.
--- Threads only entered into this as experiments to explain what is happening. I started with everything on the default (SAME AS CALLER) thread.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-03-2004 09:48 PM
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-04-2004 07:38 PM
> And threads add overhead, especially when not used
> appropriately.
This is done so that if you run A, then run B, C is already ready to go.
By the way, this doesn't happen at compile time as the VI doesn't need
to be recompiled for this to happen, but it does happen on load.
P
erhaps this could be moved to reserve time, but priority inversion is a
pretty big problem and deserves a pretty bulletproof solution.
Greg McKaskle
03-05-2004 06:31 AM
That makes sense, because in my real object the dummy caller is BROKEN and won't compile (required connections are missing), but the behavior happens anyway.
I wonder what happens if the high-priority caller is loaded WHILE the low-priority system is running. Do priorities change DURING execution?
No answer necessary- If I really want to know, I'll test it and find out.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
03-05-2004 08:52 AM