Skip to Content
数据库系统内幕
book

数据库系统内幕

by Alex Petrov
May 2020
Beginner to intermediate
319 pages
7h 3m
Chinese
China Machine Press
Content preview from 数据库系统内幕
152
|
第
8
章
加法线程
加法线程
结果a
)
c
)
b
)
d
)
结果
结果
结果
乘法线程
乘法线程
加法线程
加法线程
乘法线程
乘法线程
图
8-1
:并发执行中可能的交错情形
为了精确定义执行历史并减少可能的结果数量,我们需要
一致性模型
。一致性模型描述
并发执行的过程,并且确定了运算执行以及对其他参与者可见的顺序。使用不同的一致
性模型,我们可以约束或放松系统可能的状态数量。
分布式系统和并发计算在术语和学术研究上有许多重叠之处,但也存在一些差异。并发
系统中存在
共享内存
,进程可以用它来交换信息。在分布式系统中,各个进程拥有自己
的本地状态,参与者之间通过传递消息进行通信。
并发和并行
我们经常互换使用
并发
和
并行
计算这两个术语,但是这两个概念在语义上有细微的
差异。当两个步骤序列并发执行时,二者都在进行中,但任意时刻都只有其中一个
在执行。当两个步骤序列并行执行时,它们的步骤可以(在某一时刻)同时执行。并
发的操作时间上存在重叠,而并行的操作由多个处理器执行 [WEIKUM01]。
Erlang 编程语言的创建者 Joe Armstrong 举过一个例子:并发执行就像一台咖啡机前
排了两队,而并行执行就像两台咖啡机前排了两队。即便如此,绝大部分资料都用
术语“并发”来描述拥有多个并行执行线程的系统,而“并行”这个词则很少见。
分布式系统中的共享状态
我们可以尝试在分布式系统中引入共享内存的概念,例如,单一信息源(比如数据库)。
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

解密金融数据

解密金融数据

Justin Pauley

Publisher Resources

ISBN: 9787111655169