Unexpected periodic behaviour of an ultra low latency hard real time multi-threaded x86 code

Hi Experts,

If any of you (or know someone who) work or have worked on hard real time implementation on x86, maybe you can you help me with this:

I have been struggling to solve this problem from weeks.