I'm reading Operating System Concepts by Avi Silberschatz(9thE), in section 11.4 File-System Mounting, the author explains the steps of filesystem mounting as follows:

  1. The operating system is given the name of the device and the mount point—the location within the file structure where the file system is to be attached.
  2. Next, the operating system verifies that the device contains a valid file system.
  3. Finally, the operating system notes in its directory structure that a file system is mounted at the specified mount point.

I'm confused with the final step, since to the best of my knowledge, the directory structure is stored somewhere on the disk, which records the files' information -- such as name, location, size, and type. Then what does the author mean by directory structure in operating system? Is it the same directory on disk?

Additionally, which part finishes the conversion from file name to physical address on disk? Is it the disk driver or the disk controller or done by processor with memory?

  • $\begingroup$ Have you ever worked with a UNIX or similar? $\endgroup$
    – Raphael
    Mar 15 '18 at 15:27
  • $\begingroup$ @Raphael Yeah, I worked with Ubuntu $\endgroup$
    – Mengfan Ma
    Mar 15 '18 at 15:39

Step 3 of that description is indeed a bit confusing, and your comments are right. The short answer is that the OS keeps track, in memory, of the set of mounted file systems and where they are mounted.

  • $\begingroup$ Could you please be more specific? or any related links would also be helpful. $\endgroup$
    – Mengfan Ma
    Mar 16 '18 at 1:14
  • 1
    $\begingroup$ It's not just confusing, it is wrong. The OS doesn't keep track of directory structures in memory. It does keep track of a mount table (where which file system is mounted), but not necessarily in memory. For instance. on Unix, it records this in the file /etc/mtab. Linux still uses this file. In some modern Unix-like systems, the OS uses the /proc filesystem (which is really a representation of information the OS kernel keeps in memory) to record this; for instance, on Linux and Cygwin, the mount table can be seen in /proc/mounts. $\endgroup$ May 22 '18 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.