The READIN Family Album
Me and Sylvia, smiling for the camera (August 2005)

READIN

Jeremy's journal

At first I didn't quite know what I would do with the book, other than read it over and over again. My distrust of history then was still strong, and I wanted to concentrate on the story for its own sake, rather than on the manuscript's scientific, cultural, anthropological, or 'historical' value. I was drawn to the author himself.

Orhan Pamuk


(This is a page from my archives)
Front page
More recent posts
Older posts
More posts about:
Programming
Programming Projects
Projects

Archives index
Subscribe to RSS

This page renders best in Firefox (or Safari, or Chrome)

🦋 Timeouts

Question about timeouts on select(): if anyone has ideas about this, please let me know in comments.

Obviously select() is not a real-time operation; if you pass in a 1-second timeout, you cannot assume that you will get to run again in one second, since the operating system is allotting time to all the processes on the machine: in an extremely busy environment, it could be several seconds before you get the processor back. But I'm wondering whether the timeout is 1 second of real time, or 1 second of execution time -- in the very busy environment where your process does not get another time slice for more than a second, would select() continue to wait on the files you passed in until it had waited for a second? Or would it return immediately?

(select() as it is used in this post should be read to mean "select() and poll()," since I'm assuming both API's behave the same in this regard. Who knows, maybe they don't! But that seems unlikely to me.)

posted afternoon of Friday, May 9th, 2008
➳ More posts about Programming
➳ More posts about Programming Projects
➳ More posts about Projects

The timeout is one second of real time, and the process goes into a kernel wait once it calls select, it's the kernel that is keeping track of time. Once the process becomes runnable again, the scheduler still has to actually run it, so when it runs isn't predictable. The process might be put into a wait anyway, just before it calls select(). So the wait is one second plus whatever delays the kernel adds.

posted evening of May 10th, 2008 by Randolph Fritz

Thanks!

posted evening of May 10th, 2008 by Jeremy

Respond:

Name:
E-mail:
(will not be displayed)
Link:
Remember info

Drop me a line! or, sign my Guestbook.
    •
Check out Ellen's writing at Patch.com.

What's of interest:

(Other links of interest at my Google+ page. It's recommended!)

Where to go from here...

Friends and Family
Programming
Texts
Music
Woodworking
Comix
Blogs
South Orange
readinsinglepost