I have a Ubuntu 16.04 machine talking to a Uno board. This arduino board is sending 100 chars of line at baud rate of 115200 as fast as possible. Usually I get a line every 7ms to 10 ms (I am going to call this value DT). Let's say, on a good day, when I start my trial at time 0. I receive lines at 0, 0+DT, 0+2DT etc. But on not so rate bad days, I receive lines at 0+DT+t, 0+2DT+t, ... where
t is the lag.
This lag can be quite large sometime (upto 200 ms). This lag remains consistent (not surprising). I am suspecting that running firefox/imagej during the trial on the same system might have caused this lag.
But I am not sure. Any pointer on specification/documentation on how kernel handle serial communication would be appreciated. Essentially the question I am looking for: Can other heavy processes cause lag in serial port communication?