Kernel Internals

James Mohr (jimmo@blitz.net)
Tue, 21 Jan 1997 21:49:49 +-100


Hi Gang!

A couple of kernel internal questions have come up and I have trouble finding a definitive answer.

First is where the PID comes from. I understood it to be the entry in the task[] array. That matches the way other *NIXes do it. That is, the PID is just the offset into the process table (task[] array). However, I cannot find anything definitive that says this.

I am unclear about the differences between bdflush and update. I understand that bdflush is "part" of update and per the man-page is "called by a user without superuser priveledges." Do I take this to mean that processes not owned by root call bdflush and the others call update?

Some one said that "Clearing the process table slot of an exiting process is not the responsability of init, but of the parent. If all the forefathers have died, init will take over." To me that says that if I write a simple "Hello, World!" program, it will have the code to clean up the process table. (maybe in a dynamically linked library) To me that is system work and the parent process should do it.

When I do a ps, I see that more than open process is waiting on read_chan. No problem. What annoys me is that when I look at the numeric output for the WCHAN, they are all the same one. Other UNIXes will have a different WCHAN for each tty that is being waited upon. Therefore, the number here is different.

That's it for now, thanks for your time.

Regards,

jimmo