Issues on system with vxWorks 6.9 without round robin

Questions regarding the use of the C++ SDK for Server or Client development or integration into customer products ...

Moderator: uasdkcpp

Post Reply
SvenPC
Full Member
Full Member
Posts: 7
Joined: 22 Jul 2016, 12:46

Issues on system with vxWorks 6.9 without round robin

Post by SvenPC »

We have running vxWorks 6.9 and for several reasons the scheduler is configured that there is no "round robin" for tasks on same priority.
So we got issues that the task wich is running IOManagerUaNodePrivate::run() is going into non cooperative mode.
We are using OPCUA SDK V1.5.6. I have checked for OPCUA SDK V1.6.1: still the same.

The solution is very easy: if timeTillNextSampling is <= 0 you have to call msleep(0) to give CPU slices to other OPCUA tasks.
I would be happy to find that in newer SDK versions.

// only call sleep if we need to wait
if (timeTillNextSampling > 0)
{
sleepTime = timeTillNextSampling;
msleep(sleepTime);
}
else
{ // if we go without sleep the other OpcUA tasks never gets CPU time (no round robin in scheduler in vxworks)
msleep(0); // be cooperative and give other tasks the chance to execute
}


Regards.

User avatar
Support Team
Hero Member
Hero Member
Posts: 3068
Joined: 18 Mar 2011, 15:09

Re: Issues on system with vxWorks 6.9 without round robin

Post by Support Team »

Hello SvenPC,

I understand and agree with what you are saying. I created a ticket for the development to take account of this.
Best regards
Unified Automation Support Team

Post Reply