<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1265.21">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 15.0px; font: 12.0px Helvetica; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 12.0px; font: 16.0px Helvetica; color: #011892}
p.p4 {margin: 0.0px 0.0px 0.0px 12.0px; font: 16.0px Helvetica; color: #011892; min-height: 19.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 12.0px; font: 13.0px Helvetica; color: #011892}
p.p6 {margin: 0.0px 0.0px 0.0px 12.0px; font: 13.0px Helvetica; color: #011892; min-height: 16.0px}
p.p7 {margin: 0.0px 0.0px 0.0px 12.0px; line-height: 15.0px; font: 12.0px Helvetica; color: #011892}
p.p8 {margin: 0.0px 0.0px 0.0px 0.0px; line-height: 14.0px; font: 12.0px Helvetica; min-height: 14.0px}
span.s1 {text-decoration: underline}
span.s2 {font: 13.0px Helvetica; text-decoration: underline}
</style>
</head>
<body>
<p class="p1">Also recommend reading:</p>
<p class="p2"><br></p>
<p class="p1">http://jlouisramblings.blogspot.de/2013/01/how-erlang-does-scheduling.html</p>
<p class="p2"><br></p>
<p class="p1">-- Peer</p>
<p class="p2"><br></p>
<p class="p1">On 2014-08-06 14:33:57 +0000, Guilherme Andrade said:</p>
<p class="p2"><br></p>
<p class="p3">If you'd like more detail, I propose you read upon the low-level bells and whistles the process scheduler consists of, and it should become more intuitive by then. No need to look at source-code; a quick web search returns some straightforward stuff[1][2] that seems to be what you're looking for.</p>
<p class="p4"><br></p>
<p class="p3">Cheers,</p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p3">[1]: <a href="http://www.erlang.org/euc/08/euc_smp.pdf"><span class="s1">http://www.erlang.org/euc/08/euc_smp.pdf</span></a></p>
<p class="p3">[2]: <a href="http://erlang.org/pipermail/erlang-questions/2001-April/003132.html"><span class="s1">http://erlang.org/pipermail/erlang-questions/2001-April/003132.html</span></a></p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p3">On 06/08/14 15:30, Guilherme Andrade wrote:</p>
<p class="p5">Hello Ladislav,</p>
<p class="p6"><br></p>
<p class="p5">On 06/08/14 15:15, Ladislav Lenart wrote:</p>
<p class="p5">Is it because Erlang process occupies an order of magnitude less space than an</p>
<p class="p5">OS process?</p>
<p class="p5">Is it because a userspace scheduler such as Erlang VM is faster at process</p>
<p class="p5">switching? If so, why is that?</p>
<p class="p5">Is it somehow related to Erlang's share nothing philosophy? If so, how exactly?</p>
<p class="p5">Something else?</p>
<p class="p5">Partially, yes. Some reasons I can think of:</p>
<p class="p6"><br></p>
<p class="p5"><span class="Apple-converted-space">    </span>- Much smaller process footprint; Erlang processes aren't visible to</p>
<p class="p5">the OS, their footprint is much lighter (the context they need to keep</p>
<p class="p5">track of, etc.) OS processes are traditionally heavy, even more-so than</p>
<p class="p5">OS threads, which are pretty big themselves.</p>
<p class="p6"><br></p>
<p class="p5"><span class="Apple-converted-space">    </span>- By not being visible to the OS, context & execution switching</p>
<p class="p5">between different processes by the scheduler doesn't have to deal with</p>
<p class="p5">userland/kernelspace shenanigans (for the most part, anyway.)</p>
<p class="p6"><br></p>
<p class="p5"><span class="Apple-converted-space">    </span>- By being shared-nothing, traditional concurrency control</p>
<p class="p5">mechanisms (which have considerable overhead -- specially on SMP</p>
<p class="p5">machines) are not needed;</p>
<p class="p6"><br></p>
<p class="p5"><span class="Apple-converted-space">    </span>- Shooting in the dark here, but the per-process GC might also help</p>
<p class="p5">on this -- concerning stability and expectable availability variations,</p>
<p class="p5">anyway.</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p5">With some oversimplifications, of course; but this is the general idea.</p>
<p class="p6"><br></p>
<p class="p6"><br></p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p5">_______________________________________________</p>
<p class="p5">erlang-questions mailing list</p>
<p class="p5"><span class="s1"><a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org<span class="s2"></span></a></span></p>
<p class="p5"><span class="s1"><a href="http://erlang.org/mailman/listinfo/erlang-questions">http://erlang.org/mailman/listinfo/erlang-questions<span class="s2"></span></a></span></p>
<p class="p4"><br></p>
<p class="p5">--<span class="Apple-converted-space"> </span></p>
<p class="p5">Guilherme</p>
<p class="p6"><br></p>
<p class="p5"><span class="s1"><a href="https://www.gandrade.net/">https://www.gandrade.net/<span class="s2"></span></a></span></p>
<p class="p5">PGP: 0x35CB8191 / 1968 5252 3901 B40F ED8A<span class="Apple-converted-space">  </span>D67A 9330 79B1 35CB 8191</p>
<p class="p7"><image></p>
<p class="p8"><br></p>
</body>
</html>