I want to use an RPi to control some water pumps. My question is, what kind of guaranties can I make about the "real timeness"? I have a pump filling a container, and when a sensor signals the RPi that it is full the pump should turn off. How much extra room in the container needs to be left for the worst case response time?
From a theoretical perspective, Python running as a userspace process on a Linux kernel makes no realtime guarantees whatsoever.
In practice, interrupt response times will usually be in the low millisecond range. In all probability, the pump will take considerably longer to shut off than the rPi will take to respond.
Python/Raspberry Pi guaranty about interrupt response time