LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2006, 02:35 PM   #1
iw05t
LQ Newbie
 
Registered: Jan 2006
Posts: 2

Rep: Reputation: 0
How does a blocking select return (kernel)?


Hi,

I've been looking around but could not find anything that's relevant to kernel space.

I'm having trouble understanding how a blocking select (timeout = NULL) would return.

For instance, in the 2.6 kernel, if do_select() doesn't find any sockets available for read, it would block with schedule_timeout(MAX_SCHEDULE_TIMEOUT) with current->state = TASK_INTERRUPTIBLE.

Now when the read resource becomes available, how does the kernel put the blocked task (select() caller) back on the runqueue?

Thanks in advance for any help or pointers to other documentation.
 
Old 11-09-2006, 03:52 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,569

Rep: Reputation: 171Reputation: 171
Blocking socket returns when an event occurs. As a part of such handling there's a check made and if it's needed, owner of the descriptor is woken up. That's the most basic way. There are different factors, however. To see it all, browse driver code (eg. serial driver) to see what happens when it's notfied that there's new data (when we think about communication-related drivers).

Last edited by Mara; 11-09-2006 at 03:55 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I select the kernel version when installing? davcefai Debian 3 01-02-2006 04:37 PM
How do I select which kernel the server boots with? grub.conf? abefroman SUSE / openSUSE 3 06-20-2005 02:56 PM
2.6 kernel will only boot when I select it with LILO foamrotreturns Linux - Newbie 4 11-29-2004 11:18 AM
Select some modules in the kernel! romasport Linux - General 4 05-25-2004 12:05 PM
can't select reiserfs during kernel configuration paavaka Linux - General 2 10-15-2001 04:58 PM


All times are GMT -5. The time now is 05:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration