Archive

Posts Tagged ‘preemptive’

为什么Erlang是软实时的

January 16th, 2013 6 comments

原创文章,转载请注明: 转载自系统技术非业余研究

本文链接地址: 为什么Erlang是软实时的

之前在微博上@老师木 同学发起了个关于Erlang抢占式调度的讨论,相对于其他语言Erlang是真正的抢占式调度服务,这也是erlang能够号称软实时的很重要的原因之一,另外二个原因分别是erlang的GC是针对每个进程的,每次GC通常只需要收集几K或者几十个对象;BIF是用trap机制来保证公平的。

erlang_preemptive

今天在微博上看到erlang调度器的工作细节的文章来源见这里。这篇文章很准确的描述了Erlang调度器是如何工作的,很好的澄清了大家对各种语言调度器的误解。 本来我前段时间想自己写,看来没必要了,就顺手贴出来给大家。

How Erlang does scheduling

In this, I describe why Erlang is different from most other language runtimes. I also describe why it often forgoes throughput for lower latency.

TL;DR – Erlang is different from most other language runtimes in that it targets different values. This describes why it often seem to perform worse if you have few processes, but well if you have many.

From time to time the question of Erlang scheduling gets asked by different people. While this is an abridged version of the real thing, it can act as a way to describe how Erlang operates its processes. Do note that I am taking Erlang R15 as the base point here. If you are a reader from the future, things might have changed quite a lot—though it is usually fair to assume things only got better, in Erlang and other systems.
Read more…

Post Footer automatically generated by wp-posturl plugin for wordpress.

Categories: Erlang探索 Tags: , ,