NickJohnson wrote:That makes sense. I forgot to mention that my VFS is not contained within a server, but is instead distributed across all drivers, which sort of makes a big difference.
Indeed, that's quite a different structure. The idea of distributing VFS management across drivers is interesting, though I wonder how it works in practice when an applications wants to access the VFS : who does the application contact ?
But what if you want to control a specific driver? Let's say I wanted to tell my graphics driver to change it's resolution, which is clearly an interface that not all drivers implement, but one that more than one driver could at a time. How would I do that? It seems like making that type of request go through the VFS would be sort of ugly.
In the same way as previously, we could imagine a unifying "display manager" process that centralizes all graphics drivers behind big system abstractions, just like the VFS does for disk drivers.
Let's assume that it is safe to say that only one graphics driver is behind each screen for the sake of explanation clarity. When an application tells the display manager that she wants to change the resolution, the display manager checks on which screen(s) the application is, which graphics driver(s) are associated to each screen, and checks if all drivers have resolution changing capability. If not, it aborts the process, if so, it broadcasts the resolution changing order to all drivers.
Here I assumed that the display manager had support for resolution changing, because it's a very common feature of graphics adapters, but I suppose you might think about other situations where the application truly wants to communicate with the driver directly, either because it's faster ("direct rendering" comes to mind) or because it wants to check for the existence of some driver-specific extensions that are not supported by the system abstractions. While definitely not a good practice, and some pretty hell to secure, I guess it should definitely be supported.
In that case, we can imagine having a remote call by which the application may ask the display manager to give it the name of the driver(s) associated to the display(s) which it's on. After that, it can contact the drivers directly and do whatever it wants with them -- within the limits of its security permissions, that is.