Path Management
Posted: Thu Jun 07, 2007 8:37 am
Hi All,
I now have a basic working task manager, device manager, TUI (which just has a 'help' command at present!) and everything seems to be going fairly smoothly so far.
I'm now thinking about my system directory structure and wondered how the OS normally interprets paths accessed by apps. To clarify:
The user app may access /dev/hda1/x - at some point the character array "/dev/hda1/x" needs to be interpreted by the kernel and the correct device selected. If on the other hand I have something like "/root/processes", I need to enter a state where the app can get information from my task manager. I'm thinking that perhaps it should be the job of the device management system to interpret this information at the moment. The alternative would be to have a separate "Path Interpretation Module" that parses paths and passes (try saying that when you're drunk
) requests on to the appropriate kernel module or device driver.
Also, once an app has changed to a particular "current directory", I also need to keep track of that. I'm wondering whether the runtime should keep track of this infomation in user space and pass the full path to the kernel on every call, or whether the kernel should keep track of the current directory and just allow relative paths to be passed from user space.
It's not so much the string manipulation I have problems with, it's more the concepts - I come from a Windows background but would like to access my devices like files - as in unix-type systems.
Does anyone know of any decent reading material about how other systems deal with this?
Thanks,
Adam
I now have a basic working task manager, device manager, TUI (which just has a 'help' command at present!) and everything seems to be going fairly smoothly so far.
I'm now thinking about my system directory structure and wondered how the OS normally interprets paths accessed by apps. To clarify:
The user app may access /dev/hda1/x - at some point the character array "/dev/hda1/x" needs to be interpreted by the kernel and the correct device selected. If on the other hand I have something like "/root/processes", I need to enter a state where the app can get information from my task manager. I'm thinking that perhaps it should be the job of the device management system to interpret this information at the moment. The alternative would be to have a separate "Path Interpretation Module" that parses paths and passes (try saying that when you're drunk
![Smile :)](./images/smilies/icon_smile.gif)
Also, once an app has changed to a particular "current directory", I also need to keep track of that. I'm wondering whether the runtime should keep track of this infomation in user space and pass the full path to the kernel on every call, or whether the kernel should keep track of the current directory and just allow relative paths to be passed from user space.
It's not so much the string manipulation I have problems with, it's more the concepts - I come from a Windows background but would like to access my devices like files - as in unix-type systems.
Does anyone know of any decent reading material about how other systems deal with this?
Thanks,
Adam