For Programmers: Free Programming Magazines  


Home > Archive > Unix Programming > January 2005 > Re: How to "sleep" or "delay"?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: How to "sleep" or "delay"?
André Goddard Rosa

2005-01-16, 8:58 pm

Hi, there!!!

We have an application that process a lot of data. While we were using
select (no fd set, just the timeou delay) the process terminates in +-
3 hours.
After we changed the implementation to use nanosleep(), _surprise_, the
process terminated in just 1 hour. Looks like our process was being
preempted and put in the end of the run queue at each call to select.

Does anyone can explain that? It happens both in solaris and Linux.
Thanks!

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com