Please read here the definitions I use before responding to this post. If we don't agree on what we talk, we won't talk about much.
Questions
- Should the EventLoop and DispatcherLoop be merged together ?
- If they are separate, should the EventLoop run in its own thread or each thread would run a shared EventLoop ?
- Should each thread have its own task Dispatcher in addition to global task Dispatcher ?
- Should it have a fixed number of Threads ? If yes, how many ? If no, determined by what ?
- What design should the DispatcherLoop have ?
- FIFO for all tasks, except LIFO for last task for better caching/responsivness ?
- FIFO only ?
- Other considerations ?
Proposition of response
If I read correctly this paper shared from @mratsim : https://assets.ctfassets.net/oxjq45e8ilak/48lwQdnyDJr2O64KUsUB5V/5d8343da0119045c4b26eb65a83e786f/100545_516729073_DMITRII_VIUKOV_Go_scheduler_Implementing_language_with_lightweight_concurrency.pdf
The answers could be :
- No
- Separate thread for I/O pool
- Yes
- Should have 61 Os Threads (why ?)
- FIFO with LIFO for last item
However I am wondering how well a single selector can scale. But having multiple selectors by thread is trickier, even if the same fd can be registered in multiple dispatcher (with special considerations for thread safety, but this might be implementation specific).
Please read here the definitions I use before responding to this post. If we don't agree on what we talk, we won't talk about much.
Questions
Proposition of response
If I read correctly this paper shared from @mratsim : https://assets.ctfassets.net/oxjq45e8ilak/48lwQdnyDJr2O64KUsUB5V/5d8343da0119045c4b26eb65a83e786f/100545_516729073_DMITRII_VIUKOV_Go_scheduler_Implementing_language_with_lightweight_concurrency.pdf
The answers could be :
However I am wondering how well a single selector can scale. But having multiple selectors by thread is trickier, even if the same fd can be registered in multiple dispatcher (with special considerations for thread safety, but this might be implementation specific).