I'm building a data logging system (in C) that sends data from a series of sensors via GSM but also has a 16x2 LCD screen. The data logging program loops every minute and but I would like the LCD program to loop much faster so it can respond quickly to changes. For example, if an extra device was plugged into the load, you would see the information on the screen react immediately, rather than having to wait a minute for the rest of the program to loop. I've read about a number of ways to run several programs at the same time including pipe, fork and pthread. pthread appears to be the one favoured by most but I wanted to check that it was still suitable for an application of this kind.
So my question is, is pthread a suitable way to achieve the outcome mentioned above? If not, perhaps you could suggest an alternative to look into.
Any thoughts greatly appreciated, thanks.