 |
|
 |
|
08-31-07 12:21 AM
"In UNIX every thing is a file"
I am quite able to understand this concept.....but to be able to
appreciate the difference in a clear way.....I need to understand why
is everything not a "file" in windows........and if every thing is not a
file.....than what exactly it is? (I read in a site that everything in
windows is an "object")
This is a basic thing to know in Unix and being a Unix resource.....it's
very much required that I make this conception very clear....I request
you geeks to help me make my perception more clear......
I don't need complete details.....any pointers to the subject will
suffice well.........
Please help.....
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 12:21 AM
On Aug 30, 3:21 pm, alkara.op...@gmail.com wrote:
> "In UNIX every thing is a file"
>
> I am quite able to understand this concept.....but to be able to
> appreciate the difference in a clear way.....I need to understand why
> is everything not a "file" in windows
Why? Well, because Microsoft designed it that way.
As for what "everything is a file" means, it means that
a) to access basic hardware, you don't use a special hardware-specific
API. Instead, you use standard file I/O against a "special" file
b) to access OS settings and values, you don't use a special set of
system control APIs. Instead, you use standard file I/O against a
special file
c) to access network services, you don't use a special set of network-
specific APIs (well, mostly you dont :-) ). Instead, you use standard
file I/O against a special file (opened using a network-generic API)
d) to read or write to kernel memory... same as above
e) to read or write to the raw video... same as above
You get the picture
> ........and if every thing is not a
> file.....than what exactly it is? (I read in a site that everything in
> windows is an "object")
And each type of object, in Windows, has it's own API for access.
Wouldn't it be nice if you could read system stats with the same code
as you could read a flat file? Or tune the system with the same API as
one that writes a file? Only one simple API to learn.
> This is a basic thing to know in Unix and being a Unix resource.....it's
> very much required that I make this conception very clear....I request
> you geeks to help me make my perception more clear......
>
> I don't need complete details.....any pointers to the subject will
> suffice well.........
>
> Please help.....
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 12:21 AM
On 2007-08-30, alkara.opesh@gmail.com wrote:
>
> "In UNIX every thing is a file"
The original statement was, "In UNIX everything is a stream of
bytes." A file was one example of a stream of bytes.
--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 12:21 AM
On Thu, 30 Aug 2007 17:24:06 -0400, Chris F.A. Johnson <cfajohnson@gmail.com> wrote:
> On 2007-08-30, alkara.opesh@gmail.com wrote:
>
> The original statement was, "In UNIX everything is a stream of
> bytes." A file was one example of a stream of bytes.
OK since we're on the topic, just this year I first noticed the
existance of a special file type in Unix called a "door". Can someone
explain what that is? I asked our high guru and his answer was probably
accurate but not very enlightening.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 06:18 AM
In article <5jp4baFlusqU2@mid.individual.net>,
Dave Hinz <DaveHinz@gmail.com> writes:
> On Thu, 30 Aug 2007 17:24:06 -0400, Chris F.A. Johnson <cfajohnson@gmail.c
om> wrote:
>
> OK since we're on the topic, just this year I first noticed the
> existance of a special file type in Unix called a "door". Can someone
> explain what that is? I asked our high guru and his answer was probably
> accurate but not very enlightening.
>
Errmmmm. This on Solaris? Apart from the concept of jail
doors, Sun/Solaris is evidently the only commercial version
of Unix to use this - at least a quick google search would
seem to indicate that. What it is, what it does, dunno - I'm
about 4 years out of date (retirement's great!).
Bob Melson
--
Robert G. Melson | Rio Grande MicroSolutions | El Paso, Texas
-----
"People unfit for freedom---who cannot do much with it---are
hungry for power." ---Eric Hoffer
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 12:17 PM
On 31 Aug 2007 00:06:02 GMT Dave Hinz <DaveHinz@gmail.com> wrote:
> On Thu, 30 Aug 2007 17:24:06 -0400, Chris F.A. Johnson <cfajohnson@gmail.c
om> wrote:
>
> OK since we're on the topic, just this year I first noticed the
> existance of a special file type in Unix called a "door". Can someone
> explain what that is? I asked our high guru and his answer was probably
> accurate but not very enlightening.
An extremely low latency IPC mechanism.
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 12:17 PM
On Fri, 31 Aug 2007 05:21:42 -0000
melsonr@aragorn.rgmhome.net (Robert Melson) wrote:
> In article <5jp4baFlusqU2@mid.individual.net>,
> Dave Hinz <DaveHinz@gmail.com> writes:
> Errmmmm. This on Solaris? Apart from the concept of jail
> doors, Sun/Solaris is evidently the only commercial version
> of Unix to use this - at least a quick google search would
> seem to indicate that. What it is, what it does, dunno - I'm
> about 4 years out of date (retirement's great!).
It's a fast RPC mechanism. From the man page:
> Doors are a fast light-weight RPC mechanism for secure con-
> trol transfer between processes on the same machine. Concep-
> tually, a thread in one process can issue a call using a
> door descriptor that causes code to be executed in another
> process and then returns using the traditional synchronous
> RPC model. Doors can also be used to pass data and file
> descriptors between processes.
It's pretty neat actually.
--
Stefaan A Eeckels
--
"We have gone from a world of concentrated knowledge and wisdom to one
of distributed ignorance. And we know and understand less while being
increasingly capable." Prof. Peter Cochrane, formerly of BT Labs
(With thanks to Brian Hamilton Kelly)
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 12:17 PM
On Thu, 30 Aug 2007 12:21:52 -0700
alkara.opesh@gmail.com wrote:
> "In UNIX every thing is a file"
In most (if not all) OSes that preceded Unix, devices were treated in a
non-uniform way. In Unix, the file system is used as a
universal name-space.
Basic access to anything (disk file, terminal, printer, the disk
devices themselves etc) is done using the same API. You can look at a
disk the same way you look at a file on that disk, without knowing that
one is a high-level structure in a file system, and the other a
low-level device:
$ od -cx /dev/rdsk/c0d0t0s1
$ od -cx /var/adm/messages
In the first example you'll see the raw bytes on the disk (including
the headers etc), in the second example the contents of a file. In both
cases the "od" program is blissfully unaware of the difference.
Contrast this to some early microcomputer operating systems where
different size floppy disks needed different programs to copy files to
and from them.
MS-DOS and Windows NT also treat devices as files, but do not use the
Unix concept of using the file system as a universal name space.
--
Stefaan A Eeckels
--
"Technically, Windows is an 'operating system,' which means that it
supplies your computer with the basic commands that it needs to
suddenly, with no warning whatsoever, stop operating." -Dave Barry
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
08-31-07 06:19 PM
In article <20070831100950.46e47ecf.hoendech@ecc.lu>,
Stefaan A Eeckels <hoendech@ecc.lu> writes:
> On Fri, 31 Aug 2007 05:21:42 -0000
> melsonr@aragorn.rgmhome.net (Robert Melson) wrote:
>
>
> It's a fast RPC mechanism. From the man page:
>
>
> It's pretty neat actually.
>
Thank you. Retired or not, there's always something new to
learn.
Bob Melson
--
Robert G. Melson | Rio Grande MicroSolutions | El Paso, Texas
-----
"People unfit for freedom---who cannot do much with it---are
hungry for power." ---Eric Hoffer
[ Post a follow-up to this message ]
|
|
|
 |
|
 |
|
 |
|
|
 |
Re: Every thing is a file |
 |
 |
|
|
09-01-07 12:17 AM
Dave Hinz <DaveH...@gmail.com> wrote:
> Chris F.A. Johnson <cfajohn...@gmail.com> wrote:
>
>
> OK since we're on the topic, just this year I first noticed the
> existance of a special file type in Unix called a "door". Can someone
> explain what that is? I asked our high guru and his answer was probably
> accurate but not very enlightening.
Having established that it passes rpc/ipc messages from
thread/process to thread/process, I'd like to move on to
what uses doors?
The first time I saw a file of type door was a version of
Solaris some years ago. Running truss on various processes
never seemed to show any of them using it.
I would think that apps like Oracle that use bunches of process
would use doors. Nope, IPC. I would think that apps like Java
that use bunches of thread would use doors. Nope.
[ Post a follow-up to this message ]
|
|
|
 |
|
|
|
|
Sponsored Links |
 |
 |
|
|
 |
All times are GMT. The time now is 06:14 PM. |
 |
|
|
 |
|
 |
|
|
 |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
|
|
|
|
Medical and Health forum | Computer Games Reviews | Graphics design forum
|
 |
|
 |
|