Originally Posted by singapito
what are timing related functionalities in linux?
what does linux have to offer with respect to measuring time?
and does anyone know about the accuracy of timing for linux?
I'm not sure of the purpose of your questions. Are you building an application? Which parts are time critical?
It is quite possible to achieve microsecond level accuracy and resolution in a Linux application. It has high-resolution timers and the infrastructure required.
However, you are correct when you point out that Linux is not a real time operating system. The scheduling is normally non-preempting (since it would be inefficient to preempt), and the scheduling algorithms are oriented towards priorities rather than guaranteed response time.
You shouldn't use Linux for a critical real-time application, but for non-critical ones it could be useful (particularly if the latencies required are not less than say 10 microseconds).
There are ways to improve the real-time performance:
* use the real-time kernel patches
* remove any unnecessary daemons to reduce unpredictable disk access
* turn off the swap file
Many of the changes to allow the kernel to be preemptible have already been made in the mainstream kernel.
Latency times are reasonable (as compared to say Windows), but I would note that low latency is not the same thing as being 'real time'.