Click here to Skip to main content
15,843,144 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I could not actually figure out the need of writing a virtual file system when the OS itself provides a file system for use.

While there are many file systems? Could you please highlight with a simple example of how a VFS could be better solution than a file system provided by OS?

Anyways if a user wants data from hard drive, he needs to access the hard drive and in this case OS already provides a file system interface to deal with. But on top of it
why again another layer?
Is that not an overhead?

please suggest :)
Posted

1 solution

I find that it's not so easy to answer such simple question seriously.

Ideally, there would not be a place for such things. Ideal world is supposed to be built by one single plan. The only trouble is that the plans for creation of ideal words tent to fail. Perhaps this is because someone pretends he is more clever than you are and knows better how an ideal file system should work. And, voilà — the wanna-be-ideal word becomes a not-so-ideal word, with two, very different file systems. Or three. How many are there in real world? Let's see:
http://en.wikipedia.org/wiki/File_system[^].

Well, there many more than listed here, trust me. Let's go further.

The bigger trouble, though, it that fist guy who thought he is more clever than you, is in fact is not as clever as you are, actually, a pretty stupid one. He was only clever enough to create one single stupid file system. Very stupid. Unreliable. Hard to work with. Requiring regular fix-ups. But — oh, shock! — his systems becomes much more popular than the ideal-file-system-for-ideal world you have devised. No jokes here, your system is really nearly perfect, but now is almost forgotten. This is also quite explainable. This guy thinks this is because his system is far superior and your system sucks, but you and me understand that this is because in many situations stupid people tend to dominate. And this is because the stupid people more easily flock into crowds and press with their number, nothing else. Also, it's important to understand that a person who feels a bit above the crowd level often feels a strong desire of leadership. This only increase the level of crowded conglomeration. Some call it "democracy", but this is a stupid idea. This is just one of natural phenomena.

And now, we come to some far-from-ideal world where we have several file systems, and most of them look very attractive to the crowd, but in fact they are mostly pretty bad. But most people think that their preferred system is better, because it's "easy". This is you and me who understand that it is "easy" only on first steps, and further steps make the whole activity devastating. The problem is: as most people tend to do only these few steps, almost nobody can see these problems. You and me, and somebody else, not many.

And now, gradually, step by step, education system and industry generate more and more developers who have to work with most of those systems. The progress can not be stopped, so there are more and more really clever developers. Really clever. They would immediately understand that your system was one of the best… if they had a chance to learn if. But they are too busy to master the systems available on the market. Think about it. Let's say, there are N file systems well demanded on the market. And there are M application fields. And imagine that in some greatly-idealized-world, there is a demand only for M applications, and only one team is about to develop just one universal application in each field. We understand that in real world, the number of such applications will be much greater then M. Why? See my previous considerations. How these applications can work with files to satisfy the market? The humankind would need develop N * М different software versions, in total. And I did not even consider existing of different Operating Systems and all kinds of Platform, to take into account all the cases when several file systems are supported by one Operating System (which is often the case in Real Life). And here something called Incompatibility. In essence, all N versions of each application from M are essentially the same, but they are incompatible with every other file system. And even in real life people need Compatibility, just to be able to work. Call it "culture". In the field of technology, there is a good term for the full set of compatible and incompatible parts of technologies: Techosphere (don't mix up with the digital environment known under this name).

Are you getting the idea?

Now, the same set social of social phenomena has one aspect called Specialization. Imagine what happens if all developers in the world, according the the schematic considerations I demonstrated above, get involved with the N * M set of Compatibility Problems. Compare it with the following situation: yes another team of developers, #M+1, start specializing exclusively on the Compatibility Problem, and the problem of only one sort: Interoperability Between Different File Systems. Let's say, they are developing — oh, no! — yes another Ideal File System. And the sole purpose of it is to represent a single platform for all other previously created file system. Let's call it "Virtual File System". Is it good or not, yet another file system? Let's see.

Before we move forward, let's take a look at one design pattern called "façade pattern":
http://en.wikipedia.org/wiki/Facade_pattern[^],
http://en.wikipedia.org/wiki/Software_design_pattern[^].

Just to keep in mind. Let's go further now.

In fist model, the humankind would need M "application" teams, but each team would need N "sub-teams" each sub-team specializing in File Operations and collaboration with the rest of the team, with all the Application Level sub-teams. So, the whole humankind will in fact need N * M such additional sub-teams. In the "Virtual File System" model, we only have M "application-level" teams, plus just one more, "Virtual File System" team, well, maybe having just N sub-teams in it. But only N, not N * M. Can you see how better it is? Other "application-level" teams just use the result of this Compatibility Team. See the point?

Of course, no world is well described by the simple arithmetic I just demonstrated. But does it provide the idea?

Oh, by the way, it was written just in case if the following article did not look convincing enough:
http://en.wikipedia.org/wiki/Virtual_file_system[^]. :-)

Good luck. Keep thinking.
—SA
 
Share this answer
 
v6
Comments
Nelek 1-Nov-12 19:13pm    
nice answer
Sergey Alexandrovich Kryukov 1-Nov-12 19:14pm    
Thank you, Nelek. (OK, you too :-)
--SA
Nelek 1-Nov-12 19:20pm    
You are welcome. Me too???? :confused:
Sergey Alexandrovich Kryukov 1-Nov-12 19:34pm    
If you don't mind, it was a joke... refers to "you and me" in the text, please see. :-)
Cheers,
--SA
Nelek 2-Nov-12 4:18am    
Thanks, it was a bit late here and I didn't get it :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900