login
Header Space

 
 

Re: Nonstandard /proc? (Re: /proc directory, dosemu, and boot questions)

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

everettm@merlin.think.com (Mark J. Everett) writes:


If you look at top or ps for SVr4, you'll see that using /proc
involves you in system-specific struct declarations, which are not
even exactly the same for different versions of SVr4.  Although Linux
might be able to provide a compatibility-mode /proc of some sort for
use with SVr4 emulation, it's unlikely that any real Linux ps or other
program would really want to use the SVr4 struct declarations.  So I
don't think doing /proc the same way as SVr4 would buy you much.  Note
that SVr4's /proc is not part of the "mainstream Unix" that Linux
normally tries to implement.  Linux normally tries to implement POSIX,
plus other features that are present in enough Unix implementations
that portable code is likely to use them.  /proc is a definite
SVr4'ism.

What Linus has done with /proc is in my opinion far more interesting
than SVr4. He's using it as an general window into the kernel, so that
software that needs kernel status doesn't have to real /dev/kmem, and
doesn't have to be modified as new information is added.  Thus it's
used only only by ps and top, but by the network code and other
software.  Because the actual kernel structures are different than in
BSD or System 5, the software that uses /proc would not be portable
from other systems in any case.  /proc just makes it easier to do
Linux versions.

Making information about a process a directory makes it easier to add
information without causing problems to old software.  Using text
where possible allows human beings to look at the data, makes it
possible to write status programs as small shell or perl scripts, and
makes it easier to add new information without causing problems.  In
general, the Linux /proc implementation is very much in the spirit of
the original Unix design, unlike many of the frobs that have been
added to Unix in the last few years.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: Nonstandard /proc? (Re: /proc directory, dosemu, and boo..., Charles Hedrick, (Sat Jul 31, 2:24 pm)
speck-geostationary