Discuss the mount and unmount system callsMount system call makes a directory accessible by attaching a root directory of one file system to another directory. In UNIX directories are represented by a tree structure, and hence mounting would mean attaching them to the branches. This means the file system found on one device can be attached to the tree. The location in the system where the file is attached is called as a mount point.
Mount –t type device dir
- This will attach or mount the file system found on device of type type to the directory dir.
- Unmount system calls does the opposite. It un mounts or detaches the attached file front the target or mount point. If a file is opened or used by some process cannot be detached.
Discuss the mount and unmount system callsThe attaching of a file system to another file system is done by using mount system call. At the time of mounting, there is an essential splicing one directory tree onto a branch in another directory tree is done. The mount takes two arguments. One – the mount point, which is a directory in the current file naming system, two – the file system to mount to that point. At the time of inserting CDROM into the system, the corresponding CDROM file system will automatically mounts to the directory - /dev/cdrom in the system.
The unmount system call is used to detach a file system.