File system structure/layered file system:
Programs developed by the user Or file which is written by the user are known as Application programs.
Example: We have written a C program to print a value. That C file is an application program.
The Filename acts as an input to the logical file system. This logical file system checks whether the file is present in the directory or not. If it is there, then the logical file system finds the file's location and the logical block number of the file. This logical block number acts as an input for the file organization module.
The file organization module accepts the logical block number of the file and finds the file's physical block number (i.e., the exact location of the file in the hard disk).
The physical block number of the file acts as an input to this Basic file system layer. After accepting the input from the File organization module layer, this Basic File System issues a command to I/O control with a block number.
Read the content in block 123.
Print the content in block 123.
I/O control accepts the command from the Basic file system. I/O control contains the device driver's files. So, as per the command from the Basic file system, device drivers can interact with the devices.
As per the device drivers, the corresponding device action takes place and so that the corresponding action is done.