Messages in this thread | | | Date | Mon, 28 Aug 2000 14:41:12 -0700 | From | Reto Baettig <> | Subject | Re: newbie question: tcp/ip in kernel |
| |
"Richard B. Johnson" wrote: > > Unix and Unix variants such as Linux have kernels that perform functions > in behalf of tasks (processes) . The kernel, alone, does not have a > process context so it can't do something for "itself".
I am sorry. I did not make myself clear enough: It's a kernel-thread which is doing TCP/IP, not the "kernel itself". The thread should be associated with the init process.
> > To do any kind of communication requires a file-descriptor or socket > that is associated with a process (task). It is essential that a fd > be associated with some process. In fact, since the kernel performs > functions on behalf of the current process, this association is > established as "current" in the kernel. Look into "current" and see > what an amazing object it is! > > Alone, there will be no "current". You would be stealing the context > of some task that might not even continue to exist between two uses > of your fd. You would also be using memory and other resources from > some task that you will surely eventually destroy. > > It is possible to create a "kernel thread". This is a process that > exists in the kernel but has all the characteristics of a task. > `ps` will show kflushd, kupdate, kpiod, and kswapd. These are kernel > threads. They each have their own pid and they each have their own > context. In principle, such a task could perform TCP/IP.
...see previous explanation. Is that ok?
> > > What is the proper way to make that thing SMP-Safe in 2.4? > > You gotta be kidding.
Sorry, I don't understand this answer. Please explain
Reto - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/
| |