Device Files ... dev directory and access



Hi,

Just wanted to ask this question that is quite basic but not answered
properly by any of the books out there...

With the devices in the /dev/ directory, how does the access mechanism
work.

i.e., how does a user program access the device (say /dev/hda) and
write to it? What is the order of the access mechanism i.e., does the
kernel then invoke the driver for that device and determine whether an
operation for which the device has been opened by the user program is
valid or not? Please elaborate on this topic as much as you can
because it is so conflicting in most of the books that I have read.
All the crazy authors talk about how the device can be accessed and
then they don't explain anything about what happens behind the scenes.
I am curious to know what happens in detail. Your time and help is
very much appreciated. Thanks

stony
.



Relevant Pages

  • Re: Device Files ... dev directory and access
    ... properly by any of the books out there... ... program/...that is assuming I want to splat over my hard disk including the ... VFS i.e., when the user program accesses the device, does the kernel ... I have done my research and I am trying to get good at linux and this ...
    (alt.os.linux)
  • Re: Device Files ... dev directory and access
    ... Or to put it another way, a user space program uses the "file"name /dev/hda to access the hard disk. ... operation for which the device has been opened by the user program is ... because it is so conflicting in most of the books that I have read. ... Why do you need to know all this (ie what happens behind the scenes) if what you're asking for is "how does a /user program/ access the device and write to it?" ...
    (alt.os.linux)