Hi,
I'm hoping someone can help me with finding some in-depth information about how select() and file descriptors work. In particular, how it can wait on several descriptors at once, and without the file descriptors blocking.
I'm also interested how to implement this in my own OS, and not necessarily using C (or lower level languages).
Kindest Regards,
Jonathan Roewen
How select & file descriptors work...
- Pype.Clicker
- Member
- Posts: 5964
- Joined: Wed Oct 18, 2006 2:31 am
- Location: In a galaxy, far, far away
- Contact:
Re:How select & file descriptors work...
if you have a thread 'sleeping' on a file descriptor, and the ability to wake it up when data get available (or when some space to write data get free), it is then sufficient to have the kernel code to check which file descriptors are now readable/writeable, modify the user-level array accordingly and remove the "send notification if state change" on the other file descriptors.