The kernel documentation talks a lot about this in various places, and the best way to consider this sort of issue is to browse through the drivers and so-on to see how they do it. (For example, notice how udev communicates with its helper daemon.)
Also consider what might be most useful for your programs. It's very nice when a program can simply do a blocking-read or blocking-write to a "device," because any ol' program can do that. And it's also very easy, on the kernel side of things, to "write something."
The entire notion of the "/proc" and "/sys" filesystems is brilliant, because it lets "any ol' program" retrieve, and set, all sorts of funky information just by reading and writing to "a file."
|