[PLUG] followup note on nanosleep()

Bill Barry bill at billbarry.org
Wed Apr 17 20:07:40 UTC 2013


On Mon, Apr 15, 2013 at 5:02 PM, website reader
<website.reader3 at gmail.com>wrote:

> I carefully added extra error capture code to the timestamping
> routine, nanosleep is always returning with a good "0" status.  What
> is unusual is that sometimes it doesn't return when it is supposed to,
> the system seems to place it on the shelf for awhile, then eventually
> get back to it, sometimes 0.5 seconds later than it is supposed to.
>
> Has anyone come across this problem before?  I am running 12 cores 64
> bit smp, Ubuntu 12.04.2 LTS.
>
> Randall
>


If your application really has to have accurate reliable timing then you
will need to write a real time application and install a kernel built with
the PREEMPT_RT  patch https://rt.wiki.kernel.org/index.php/Main_Page
otherwise you will be subject to the type of problem you are
encountering.

Bill



More information about the PLUG mailing list