虚拟文件系统的优势 [英] advantages of virtual file systems

查看:118
本文介绍了虚拟文件系统的优势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


当操作系统本身提供了可供使用的文件系统时,我实际上无法确定是否需要编写虚拟文件系统.

虽然有很多文件系统?您能否举一个简单的示例来突出显示VFS如何比OS提供的文件系统更好的解决方案?

无论如何,如果用户要从硬盘驱动器中获取数据,则他需要访问硬盘驱动器,在这种情况下,操作系统已经提供了要处理的文件系统接口.但最重要的是
为什么还要再铺一层呢?
那不是开销吗?

请建议:)

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 :)

推荐答案

我发现认真回答这样一个简单的问题并不容易.

理想情况下,不会有这样的地方.理想世界应该由一个单一的计划来构建.唯一的麻烦是创建理想单词的计划会失败.也许这是因为有人假装他比您更聪明,并且更了解理想的文件系统应该如何工作.而且,voilà–想要成为理想的单词成为一个不太理想的单词,它具有两个非常不同的文件系统.或三个.现实世界中有几个?让我们看看:
http://en.wikipedia.org/wiki/File_system [
现在,我们来到了一个远离理想环境的世界,那里有多个文件系统,其中大多数看上去对人群很有吸引力,但是实际上它们非常糟糕.但是大多数人认为他们偏爱的系统更好,因为它简单".这是您和我,谁知道这仅在第一步是容易的",而进一步的步骤会使整个活动毁灭性的.问题是:由于大多数人倾向于只执行这几个步骤,所以几乎没人能看到这些问题.您和我以及其他人并不多.

现在,逐步,逐步地,教育系统和行业产生了越来越多的开发人员,他们必须使用其中的大多数系统.进展无法停止,因此,越来越多的真正聪明的开发人员.真的很聪明.他们将立即了解到您的系统是最好的系统之一……如果他们有机会学习是否.但是他们忙于掌握市场上可用的系统.想一想.假设市场上有N个文件系统需求殷切.并且有M个应用领域.想象一下,在一个高度理想化的世界中,只需要M个应用程序,并且只有一个团队要在每个领域中只开发一个通用应用程序.我们了解到,在现实世界中,此类应用程序的数量将比M多得多.为什么?
请参阅我以前的考虑. 这些应用程序如何与文件配合使用以满足市场需求?人类总共需要开发N * М个不同的软件版本.而且,我什至没有考虑到存在不同的操作系统和各种平台,而是要考虑一个操作系统支持多个文件系统的所有情况(在现实生活中通常是这种情况).这就是所谓的不兼容.本质上,每个应用程序从M到N的所有版本本质上都是相同的,但是它们与其他所有文件系统都不兼容.甚至在现实生活中,人们也需要兼容性,才能工作.称之为文化".在技​​术领域,技术的全部兼容和不兼容部分都有一个很好的名词:Techosphere(不要与以该名称命名的数字环境混淆).

你有主意吗?

现在,同一组社会现象的社会有一个方面叫做专业化.想象一下,如果世界上所有开发人员都按照我上面演示的示意图考虑,参与了N * M套兼容性问题,将会发生什么情况.将其与以下情况进行比较:是的,另一个开发人员团队#M + 1开始专门研究兼容性问题以及仅一种问题:不同文件系统之间的互操作性.假设他们正在发展-哦,不! —是的,另一个理想文件系统.它的唯一目的是为所有其他先前创建的文件系统表示一个平台.我们称其为虚拟文件系统".好的还是不好,还有另一个文件系统?让我们看看.

在我们前进之前,让我们看一下一种称为外观模式"的设计模式:
http://en.wikipedia.org/wiki/Facade_pattern [ http://en.wikipedia.org/wiki/Software_design_pattern [
当然,我刚才演示的简单算法无法很好地描述世界.但这提供了这个主意吗?

哦,顺便说一句,它是为防止以下文章看起来不够有说服力而编写的:
http://en.wikipedia.org/wiki/Virtual_file_system [
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


这篇关于虚拟文件系统的优势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆