From: John Hodge Date: Sun, 27 Feb 2011 11:13:27 +0000 (+0800) Subject: Notes on how to implement select() X-Git-Tag: rel0.10~191 X-Git-Url: https://git.ucc.asn.au/?a=commitdiff_plain;h=58d2f56cd5211d93b4984e1f66a8aba5f0599942;p=tpg%2Facess2.git Notes on how to implement select() --- diff --git a/Design Notes/VFS - Select.txt b/Design Notes/VFS - Select.txt new file mode 100644 index 00000000..cceef5ce --- /dev/null +++ b/Design Notes/VFS - Select.txt @@ -0,0 +1,12 @@ +select() +- Implemented using a wait queue for every file descriptor +- That requires waiting on sockets to be centeralised + +All wait tasks (reads on VTerm, Pipes, PTYs, network sockets) use the kernel +version of select with an inifinite timeout. +They then signal the VFS using their VFS node pointer as a reference + +The VFS function select() +- Maintains a list of processes on each node (if select has been called on that node) +- Each process maybe has a semaphore on it (to use the semaphore code to maintain the process list) + > Could maybe use a mutex instead