TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A Science of Concurrent Programs [pdf]

187 点作者 paulolc超过 1 年前

8 条评论

Animats超过 1 年前
It&#x27;s appropriate that this is appearing at the death of Niklaus_Wirth. He really was the first to get serious about formalizing concurrency. P and V, and all that.<p>This feels very retro. I used to work on this sort of thing, but that was back in the early 1980s. This reads like something from back then, when people were first figuring out how to think about concurrency.[1] That&#x27;s how people thought about this back then.<p>There&#x27;s been progress in the last four decades. There are completely different approaches, such as symbolic execution. The Microsoft Static Driver Verifier is an example. There&#x27;s also a theory of eventually-consistent systems now, with conflict-free replicated data types. It&#x27;s also more common today to think about concurrency in terms of messages rather than variable access, which is easier to reason about. There&#x27;s also more of a handle on the tooling problem. Not enough of a handle, though. Proof of correctness software still hasn&#x27;t really gone mainstream. (In IC design, though...)<p>There&#x27;s a tendency in this area to fall in love with the notation and formalism, rather than viewing it as a means for making better software. In practice, most of the things you need to prove in program proving are trivial, and have to be mechanized or you never get anything done. Once in a while, a theoretically difficult problem shows up. You need some way to address those abstractly and feed the results back into the semi-automated system.<p>The main concurrent problem addressed in this paper is the Paxos algorithm. That&#x27;s similar to the earlier arbiter problem.[2] The arbiter problem is also about resolving who wins access to a shared resource in a parallel system. It&#x27;s down at the hardware level, where two processors talk to one memory, and has to be resolved in nanoseconds or less. There&#x27;s no sound way to select a winner in one round. But, for each round, you can tell if the algorithm has settled and produced a winner. You have to iterate until it settles. There&#x27;s no upper bound on how many rounds it takes, but it is statistically unlikely for it to take very many. Arbiters were the first hardware device to have that property, and it was very upsetting at the time. Multiprocessor computers were built before the arbiter problem was solved, and they did indeed have hardware race conditions on access to memory. I used to debug operating systems for those things, and we did get crashes from that.<p>Good to see someone is still plugging away on the classics.<p>[1] <a href="https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;manualzilla-id-5928072&#x2F;mode&#x2F;2up" rel="nofollow">https:&#x2F;&#x2F;archive.org&#x2F;details&#x2F;manualzilla-id-5928072&#x2F;mode&#x2F;2up</a><p>[2] <a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Arbiter_%28electronics%29" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Arbiter_%28electronics%29</a>
评论 #38864717 未加载
评论 #38869979 未加载
spenczar5超过 1 年前
Section 1.2 has an essential warning for many Hacker News readers!<p>&quot;You probably belong to one of two classes of people who I will call scientists and engineers. Scientists are computer scientists who are interested in concurrent computing. If you are a scientist, you should be well-prepared to decide if this book interests you and to read it if it does.<p>&quot;Engineers are people involved in building concurrent programs. If you are an engineer, you might have a job title such as programmer, software engineer, or hardware designer. I need to warn you that this book is about a science, not about its practical application. Practice is discussed only to explain the motivation for the science. If you are interested just in using the science, you should read about the language TLA+ and its tools, which are the practical embodiment of the science [27, 34]. But if you want to understand the underlying science, then this book may be for you.&quot;
评论 #38864024 未加载
omeid2超过 1 年前
Also from Leslie Lamport is this amusing course on TLA+ which is a good intro into Formal Specifications.<p><a href="https:&#x2F;&#x2F;lamport.azurewebsites.net&#x2F;tla&#x2F;tla.html" rel="nofollow">https:&#x2F;&#x2F;lamport.azurewebsites.net&#x2F;tla&#x2F;tla.html</a>
mirzap超过 1 年前
Posted yesterday: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38859393">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=38859393</a>
coolThingsFirst超过 1 年前
The thing that always confused me about concurrency and multithreading problems is the fact that books either are too practical(programming examples) or too theoretical(Lamport), they never have a good balance.<p>Does anyone have a suggestion for a good book? It should discuss CAS and how it&#x27;s implemented on hardware level as a bare minimum.
paulolc超过 1 年前
This is Science. Computer Science. From one of the greatest alive.<p>&quot;This is a preliminary version of a book. If you have any comments to make or questions to ask about it, please contact me by email. But when you do, include the version date. I expect there are many minor errors in this version. (I hope there are no major ones.) Anyone who is the first to report any error will be thanked in the book. If you find an error, please include in your email your name as you wish it to appear as well as the version date.&quot;
评论 #38863645 未加载
librasteve超过 1 年前
i see Tony Hoare is referenced, but no mention of Bill Roscoe and his bottom<p><a href="https:&#x2F;&#x2F;www.cs.ox.ac.uk&#x2F;people&#x2F;bill.roscoe&#x2F;publications&#x2F;1.pdf" rel="nofollow">https:&#x2F;&#x2F;www.cs.ox.ac.uk&#x2F;people&#x2F;bill.roscoe&#x2F;publications&#x2F;1.pd...</a>
petters超过 1 年前
”This is not the place for modesty. I was very good at concurrency.” Agreed!
评论 #38870906 未加载
评论 #38870921 未加载