文件系统上下文中的原子性是什么?
根据webopedia,这是当处理器读取和写入总线时。 .排除其他处理器访问它。
在数据库中,这意味着一组操作要么全部发生,要么不发生,根据 wikipedia< /a>
在并发编程中,这意味着一组操作在系统看来是瞬时发生的 wikipedia
但是我需要知道文件系统上下文中原子性指的是什么,特别是 Google 文件系统。
似乎是一个被过度使用的词,人们使用它听起来很酷..但是关于文件系统有更学术的定义吗?
在一般情况下,原子似乎是指不分解某些东西,即原子。我不断听到用于 Google 文件系统的术语“原子读取”和“原子写入”。
我的猜测是,它要么完全发生,要么根本不发生,而且是一步到位。指时间(出现瞬间)和成分(所有部分都完成)的统一。
这听起来正确吗?
According to webopedia it is when a processor both reads and writes to the bus...excluding other processors from accessing it.
In databases, it means that a set of operations either all occur or none do, according to wikipedia
In concurrent programming, it means that a set of operations occur instantaneously as seen by the system wikipedia
However I need to know what atomicity refers to in in the context of file systems, particularly Google File System.
Seems to be an over-used word which people use b.c. it sounds cool..but is there a more academic definition in regards to file systems?
It seems atomic refers to not breaking something up i.e. the atom...in a general case. I keep hearing the term atomic reads and atomic writes being used for the Google File System.
My guess would mean that it happens completely or not at all and in one "step". Referring to the unity of time (appears instantaneous) and composition (all parts are completed).
Does this sound correct?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这是正确的。基本属性是,即使某些操作可能包含较小的一组步骤,但您永远无法在发生了部分但不是全部步骤的状态下观察到它。
That's right. It is the basic property that even though some operation may consist of a smaller set of steps, you can never observe it in a state where some but not all of those steps have taken place.
你的定义看起来很合理。 这里有一篇关于计算机软件和硬件原子性的麻省理工学院精彩演讲。我对你的定义有一个小小的抱怨,那就是你让事情看起来好像是一步发生的“原子”事情。这既是对的,也是错的。
正如您将在演讲中看到的,原子性的定义如下:
这里的主要思想是,某些“原子”可能会在离散步骤中(在实现中)分离,但调用者永远不会知道这一点。例如,即使是原子写入也有多个步骤。
Your definition seems pretty sound. There's a great MIT talk here about atomicity with regards to computer software and hardware. A small gripe that I have with your definition is that you make it seem as if something "atomic" occurs in one step. This is both right and wrong.
As you'll see in the talk, atomicity is defined by:
The main idea here is that something "atomic" may be separated in discrete steps (in implementation) but the invoker will never know this. Even an atomic write has multiple steps, for example.
来自 Seth Gilbert 和 Nancy Lynch 撰写的Brewer 猜想和一致、可用、分区容忍 Web 服务的可行性:
From Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services written by Seth Gilbert and Nancy Lynch: