Quote:
Originally Posted by
gacanepa
In your opinion, am I missing anything?
Maybe...
Sit down, young one, while i tell you a story from the times of yore...
At first, there was UNIX ("UNICS", actually), and one absolutely new paradigma to this OS (and a prominent reason for its success) was the idea that
everything is a file. UNIX does most of its workings in files: devices? There is a device file. Inter-process communication? There are named pipes and semaphores and FIFOs. Drivers? Interact with a pseudo device (file)! And so on, and so on.
Now, this was a very simple yet efficient and flexible design, but humans always seek to improve on even the best ideas and so a successor for UNIX was conceived by some of the people who built UNIX: it was called "Plan 9" and it took whatever was good in UNIX and tried to improve on it. One of these improvements was to take the idea of "everything is a file" one step further and do even process accounting in the filesystem: this was the invention of the
/proc filesystem.
Well, sometimes even the best laid plans fall short and, sadly enough, this was the case with Plan 9 (from outer space) too - it never gained momentum and it never took off, let alone replaced UNIX. Still, many ideas from Plan 9 were good and have been built (Plan-9-developers would probably say "backported") into various UNIX flavours. The
/proc filesystem was such an idea. It was built into the Linux kernel and since then most UNIX-derivates have - under the impression of the Linux success - also incorporated a
/proc filesystem. My "home" OS, IBMs AIX, has it since version 5 (~2000). Also SunOS has it, but i don't know since when. I do not know enough about HP-Ux to know if there is a
/proc filesystem or not.
I hope this story has enriched your understanding. I know, it will not answer any concrete questions of "how to ..." but i think knowing some historical dimensions of the things we deal with helps us doing better work in the long run.
bakunin