Well I made some progress on improving the stack. It's not that huge. Now, there's no limit on how many sockets can one program open.
Also, I've added a check if the socket belongs to the program going to work with it. Since there's no big difference between processes and threads in Kolibri (I'd like to change that in next few days when I have time), this change also means that one program can't use the same socket in different threads.
Changing the process-thread architecture can negatively impose already present programs. What I want to do is separate "process id" and "thread id", giving all newly created threads the "process id" of the calling thread. This also means that when the "main" thread (the one where "process id" = "thread id") is quitting, all other threads are likely to also be killed (because in other way, process slot is being freed and another process with such PID could be created) which differs from current implementation.
That said, there could be another way - making process list dymanic (like I just did it with sockets). This would involve major internal kernel changes (not visible to the programs though) and could take some time to finish. And this, of course, will give us another step forward eliminating process count limit (does anybody need this?).
Oh well, I'm still thinking of this, who knows.
Wednesday, November 5, 2008
Network stack
Posted by
mike.dld
at
12:19 PM
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment