4 ms·
Thank you for this! I am wondering whether to include S for socket in the syntax for scheduling. So if you have M:N:S multiplexing you can share a socket over
by samsquire 4y ago
Thank you for this!
I am wondering whether to include S for socket in the syntax for scheduling.
So if you have M:N:S multiplexing you can share a socket over multiple lightweight threads which are themselves assigned to one kernel thread at a time.
My implementation is a toy compared to Loom. Loom is a serious API adaptation which causes the Thread API to work as lightweight threads, I am not sure if it handles process starvation as my M:N scheduler does.
if you put while (true) {} in a lightweight thread, I think that thread shall either be preempted by Loom if Loom implements that or it shall keep the lightweight thread assigned to that kernel thread, causing starvation of other lightweight threads.
So you might have
thread1:light1:socket1recv
thread2:light2:socket1send
thread1:light1:socket2recv
thread1:light2:socket2send