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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The “Eat What You Kill” execution strategy (2015)

70 点作者 tragiclos超过 4 年前

1 comment

twic超过 4 年前
This sounds rather similar to the &quot;leader &#x2F; followers&quot; pattern that came out of ACE back in the CORBA era of the late &#x27;90s [1]:<p>&gt; Structure a pool of threads to share a set of event sources efficiently by taking turns demultiplexing events that arrive on these event sources and synchronously dispatching the events to application services that process them.<p>&gt; In detail: design a thread pool mechanism that allows multiple threads to coordinate themselves and protect critical sections while detecting, demultiplexing, dispatching, and processing events. In this mechanism, allow one thread at a time - the leader - to wait for an event to occur from a set of event sources. Meanwhile, other threads - the followers - can queue up waiting their turn to become the leader. After the current leader thread detects an event from the event source set, it first promotes a follower thread to become the new leader. It then plays the role of a processing thread, which demultiplexes and dispatches the event to a designated event handler that performs application-specific event handling in the processing thread. Multiple processing threads can handle events concurrently while the current leader thread waits for new events on the set of event sources shared by the threads. After handling its event, a processing thread reverts to a follower role and waits to become the leader thread again.<p>The &#x27;Known Uses&#x27; section in the paper is fun.<p>[1] Leader&#x2F;Followers: A Design Pattern for Efficient Multi-threaded Event Demultiplexing and Dispatching - D. C. Schmidt, C. O&#x27;Ryan, I. Pyarali, M. Kircher, F. Buschmann; Proceedings of the 7th Pattern Languages of Programs Conference (August 2000) <a href="https:&#x2F;&#x2F;www.dre.vanderbilt.edu&#x2F;~schmidt&#x2F;PDF&#x2F;lf.pdf" rel="nofollow">https:&#x2F;&#x2F;www.dre.vanderbilt.edu&#x2F;~schmidt&#x2F;PDF&#x2F;lf.pdf</a>