What are your real-time deadlines exactly? It's meaningless to state real-time without specifying that.
If you happen to be using a four core Pi you can isolate one or more cores from any Linux kernel scheduling activity and dedicate it to doing nothing but your real time task.
With these techniques I can eliminate all kernel action on a core except an interrupt that fires off every few ms and eats only 5us of time.
There is a discussion of these techniques here : viewtopic.php?f=63&t=200793&start=25#p1252388
and in the rest of that thread.