I have found out that in Linux there are "real files" and there are "virtual files", real files are files that resides on the hard disk, while virtual files are just data represented by the kernel as files.
For example, the files in the
/proc directory are virtual files.
I want to understand how a function like
read() knows how to read a real file and how to read a virtual file. I have created the following diagram to show my understanding of this subject, please correct me if I am wrong about my understanding: