What is the processing unit that runs the flight controller?

How is the data from the RC and Inertial Measurement Unit processed to calculate the output to the ESC and provide stability and control of the flight?
What is the processing unit that runs the flight controller PID loops responsible for the stability and control of the MultiCopter?

We are running APM code on Raspberry Pi for that.

So there is no Programmable Real-time Processing Unit on NAVIO2 the runs the flight controller PID loops with guarantied low latencies?

Toma, APM runs on RT_PREEMPT Linux with guaranteed low latencies, control loop rate is 400Hz.