Photon/mouse priorities:what's the point of having a RT OS

I think this has been discussed in other threads before. However, I have not seen any definitive answer so far.

Here is the situation. I run part of my application in the Photon environment. I have some processes doing realtime data acquisition in the background. I don’t want the graphical display to compute with the data acquisition processes for CPU cycles. So I set the priority of the data acquisition processes to 62 or 63.

The problem is that if I drag a window on the screen, the graphics display is still able to get most the CPU cycles and the data acquisition system would fall behind and mess up. It seems the mouse and graphics have the highest priority. I can always drag and move a window around, even when the data acquisitions processes are starved. As far as I can tell, the highest priority associated with the display is 12 (Photon, io-graphices, etc). It does not make sense. :astonished: (The mouse I am using is PS2) I could not find any possible priority inversion problems, at least not in my applications.

I had the same application under QNX 4.25. The display, mouse and keyboard would simply freeze if the data acquisition processes need more CPU cycles, which is the correct behavior for a realtime acquisition system.

I am sure there is an explanation for this and I would appreciate the answer.

:confused:

I would bet you have the priorities set wrong. In QNX6 by default priority float. So if a pulse has priority 10 inside a process that has priority 64, when the pulse is received the priority will drop down to 10. That’s all well documented.

I’ve often seen Photon apps becoming unresponive when a thread on a higher priority was taking a lot or all CPU, so I guess the priority of your threads is going down, maybe for the reason Mario above mentions.