
I've read about as much code and documentation as my brain will handle on the subject, and I'm still not getting the whole picture.
I see implementation which use the open, read, write, close -style of device driver, but I don't understand how they actually work with requests.
My current train of thought is... (And please feel free to correct my thinking, because I am truely lost at the moment)
Device drivers cover everything from graphics cards to network cards, pci devices in general, keyboard, serial ports, parallel ports.. the list is really endless.
What I don't understand is how one interface can work for all these different devices (Perhaps this is where my understanding is flawed?)
On top of that, if you have a device driver for a hard disk controller how does it know that there is a file system attached?
If it "program -> filesystem -> device" or "program -> device -> filesystem", and how do they all link together.
I realise this is a far-reaching question, and I'm not expecting the holy-grail of answers, but a few suggestions or comments to give direction would be appreciated.
Cheers