文件系统上下文中的原子性是什么?

发布于 2024-12-09 22:24:49 字数 662 浏览 0 评论 0原文

根据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技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

憧憬巴黎街头的黎明 2024-12-16 22:24:50

这是正确的。基本属性是,即使某些操作可能包含较小的一组步骤,但您永远无法在发生了部分但不是全部步骤的状态下观察到它。

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.

北音执念 2024-12-16 22:24:50

你的定义看起来很合理。 这里有一篇关于计算机软件和硬件原子性的麻省理工学院精彩演讲。我对你的定义有一个小小的抱怨,那就是你让事情看起来好像是一步发生的“原子”事情。这既是对的,也是错的。

正如您将在演讲中看到的,原子性的定义如下:

Recoverable + Isolated = Atomic
A sequence of composite steps but whose invoker cannot discover is composite.

这里的主要思想是,某些“原子”可能会在离散步骤中(在实现中)分离,但调用者永远不会知道这一点。例如,即使是原子写入也有多个步骤。

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:

Recoverable + Isolated = Atomic
A sequence of composite steps but whose invoker cannot discover is composite.

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.

单挑你×的.吻 2024-12-16 22:24:50

来自 Seth Gilbert 和 Nancy Lynch 撰写的Brewer 猜想和一致、可用、分区容忍 Web 服务的可行性

原子一致性或线性化一致性是大多数人期望的条件
今天的 Web 服务。3 在这种一致性保证下,必须
所有操作都存在总顺序,使得每个操作看起来
仿佛是在一瞬间完成的。这相当于o
要求分布式共享内存的请求就像它们一样
在单个节点上执行,响应某个操作
时间。原子读/写共享内存的一个重要属性是
写操作完成后开始的任何读操作
必须返回该值,或稍后写入操作的结果。

From Brewer’s Conjecture and the Feasibility of Consistent, Available, Partition-Tolerant Web Services written by Seth Gilbert and Nancy Lynch:

Atomic, or linearizable, consistency is the condition expected by most
web services today.3 Under this consistency guarantee, there must
exist a total order on all operations such that each operation looks
as if it were completed at a single instant. This is equivalent o
requiring requests of the distributed shared memory to act as if they
were executing on a single node, responding to operations one at a
time. One important property of an atomic read/write shared memory is
that any read operation that begins after a write operation completes
must return that value, or the result of a later write operation.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文