• Z3_969905
    了解作者
  • 5.5MB
    文件大小
  • zip
    文件格式
  • 0
    收藏次数
  • VIP专享
    资源类型
  • 0
    下载次数
  • 2022-04-20 05:21
    上传日期
机密联盟框架 持续集成 每日制作 文献资料 货柜 机密联盟框架(CCF)是一个开放源代码框架,用于构建专注于多方计算和数据的新型安全,高可用性和高性能应用程序。 CCF可以启用满足关键企业要求的大规模机密网络-提供一种手段来加速基于联盟的区块链和多方计算技术的生产和企业采用。 利用受信任的执行环境(TEE),分散式系统概念和加密技术的强大功能,CCF可以实现企业级多方计算或区块链。 CCF入门 在Linux上CCF 阅读的并熟悉CCF的核心概念 TypeScript / JavaScript或C ++ 这个仓库,继 提交和 开始以提出问题或提出想法 了解更多 浏览 阅读以获得更详
CCF-master.zip
内容介绍
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"> <meta name="generator" content="pdf2htmlEX"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <link rel="stylesheet" href="https://static.pudn.com/base/css/base.min.css"> <link rel="stylesheet" href="https://static.pudn.com/base/css/fancy.min.css"> <link rel="stylesheet" href="https://static.pudn.com/prod/directory_preview_static/625f28ea2cc14f663635f4b2/raw.css"> <script src="https://static.pudn.com/base/js/compatibility.min.js"></script> <script src="https://static.pudn.com/base/js/pdf2htmlEX.min.js"></script> <script> try{ pdf2htmlEX.defaultViewer = new pdf2htmlEX.Viewer({}); }catch(e){} </script> <title></title> </head> <body> <div id="sidebar" style="display: none"> <div id="outline"> </div> </div> <div id="pf1" class="pf w0 h0" data-page-no="1"><div class="pc pc1 w0 h0"><img class="bi x0 y0 w1 h1" alt="" src="https://static.pudn.com/prod/directory_preview_static/625f28ea2cc14f663635f4b2/bg1.jpg"><div class="t m0 x1 h2 y1 ff1 fs0 fc0 sc0 ls0 ws0">snmalloc<span class="ff2">:<span class="_ _0"> </span>A<span class="_ _0"> </span>Message<span class="_ _0"> </span>Passing<span class="_ _0"> </span>Allocator</span></div><div class="t m0 x2 h3 y2 ff3 fs1 fc0 sc0 ls0 ws0">Paul<span class="_"> </span>Li&#233;tar</div><div class="t m0 x3 h4 y3 ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 x4 h5 y4 ff4 fs2 fc0 sc0 ls0 ws0">paul@lietar<span class="_ _1"></span>.net</div><div class="t m0 x5 h3 y2 ff3 fs1 fc0 sc0 ls0 ws0">Theodore<span class="_"> </span>Butler</div><div class="t m0 x6 h6 y5 ff5 fs3 fc0 sc0 ls0 ws0">&#8727;</div><div class="t m0 x7 h4 y3 ff3 fs2 fc0 sc0 ls0 ws0">Drexel<span class="_"> </span>University<span class="_ _1"></span>,<span class="_"> </span>USA</div><div class="t m0 x8 h5 y4 ff4 fs2 fc0 sc0 ls0 ws0">theodore.j.butler@drexel.edu</div><div class="t m0 x9 h3 y2 ff3 fs1 fc0 sc0 ls0 ws0">Sylvan<span class="_"> </span>Clebsch</div><div class="t m0 xa h4 y3 ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 xb h5 y4 ff4 fs2 fc0 sc0 ls0 ws0">Sylvan.Clebsch@microso&#58908;.com</div><div class="t m0 xc h3 y6 ff3 fs1 fc0 sc0 ls0 ws0">Sophia<span class="_"> </span>Drossopoulou</div><div class="t m0 xd h4 y7 ff3 fs2 fc0 sc0 ls0 ws0">Imperial<span class="_"> </span>College<span class="_"> </span>London,<span class="_"> </span>UK</div><div class="t m0 xe h5 y8 ff4 fs2 fc0 sc0 ls0 ws0">s.drossopoulou@imperial.ac.uk</div><div class="t m0 xf h3 y6 ff3 fs1 fc0 sc0 ls0 ws0">Juliana<span class="_"> </span>Franco</div><div class="t m0 x7 h4 y7 ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 x10 h5 y8 ff4 fs2 fc0 sc0 ls0 ws0">Juliana.Franco@microso&#58908;.com</div><div class="t m0 x11 h3 y6 ff3 fs1 fc0 sc0 ls0 ws0">Matthew<span class="_"> </span>J.<span class="_"> </span>Parkinson</div><div class="t m0 xa h4 y7 ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 x11 h5 y8 ff4 fs2 fc0 sc0 ls0 ws0">ma&#58909;park@microso&#58908;.com</div><div class="t m0 x12 h3 y9 ff3 fs1 fc0 sc0 ls0 ws0">Alex<span class="_"> </span>Shamis</div><div class="t m0 x3 h4 ya ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 xd h4 yb ff3 fs2 fc0 sc0 ls0 ws0">Imperial<span class="_"> </span>College<span class="_"> </span>London,<span class="_"> </span>UK</div><div class="t m0 x13 h5 yc ff4 fs2 fc0 sc0 ls0 ws0">alexsha@microso&#58908;.com</div><div class="t m0 x14 h3 y9 ff3 fs1 fc0 sc0 ls0 ws0">Christoph<span class="_"> </span>M.<span class="_"> </span>Wintersteiger</div><div class="t m0 x7 h4 ya ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 x15 h5 yb ff4 fs2 fc0 sc0 ls0 ws0">cwinter@microso&#58908;.com</div><div class="t m0 x16 h3 y9 ff3 fs1 fc0 sc0 ls0 ws0">David<span class="_"> </span>Chisnall</div><div class="t m0 xa h4 ya ff3 fs2 fc0 sc0 ls0 ws0">Microsoft<span class="_"> </span>Research,<span class="_"> </span>UK</div><div class="t m0 x17 h5 yb ff4 fs2 fc0 sc0 ls0 ws0">David.Chisnall@microso&#58908;.com</div><div class="t m0 x18 h7 yd ff2 fs1 fc0 sc0 ls0 ws0">Abstract</div><div class="t m0 x18 h8 ye ff6 fs2 fc0 sc0 ls0 ws0">Snmalloc</div><div class="t m1 x19 h4 yf ff3 fs2 fc0 sc0 ls0 ws0">is<span class="_"> </span>an<span class="_ _2"> </span>implementation<span class="_"> </span>of</div><div class="t m0 x1a h8 yf ff6 fs2 fc0 sc0 ls0 ws0">malloc</div><div class="t m1 x1b h4 yf ff3 fs2 fc0 sc0 ls0 ws0">aimed<span class="_ _2"> </span>at<span class="_"> </span>work-</div><div class="t m2 x18 h4 y10 ff3 fs2 fc0 sc0 ls0 ws0">loads<span class="_ _3"> </span>in<span class="_ _3"> </span>which<span class="_ _3"> </span>objects<span class="_ _3"> </span>are<span class="_ _3"> </span>typically<span class="_ _3"> </span>deallocated<span class="_ _3"> </span>by<span class="_ _3"> </span>a<span class="_ _3"> </span>di&#58909;erent</div><div class="t m1 x18 h4 y11 ff3 fs2 fc0 sc0 ls0 ws0">thread<span class="_ _2"> </span>than<span class="_ _4"> </span>the<span class="_ _4"> </span>one<span class="_ _2"> </span>that<span class="_ _4"> </span>had<span class="_ _2"> </span>allocate<span class="_ _5"></span>d<span class="_ _4"> </span>them.<span class="_ _2"> </span>W<span class="_ _1"></span>e<span class="_ _2"> </span>use<span class="_ _4"> </span>the</div><div class="t m3 x18 h4 y12 ff3 fs2 fc0 sc0 ls0 ws0">term<span class="_"> </span><span class="ff7">producer/consumer<span class="_ _4"> </span></span>for<span class="_"> </span>such<span class="_"> </span>w<span class="_ _6"></span>orkloads.</div><div class="t m0 x1c h8 y12 ff6 fs2 fc0 sc0 ls0 ws0">Snmalloc</div><div class="t m3 x1d h4 y12 ff3 fs2 fc0 sc0 ls0 ws0">uses</div><div class="t m4 x18 h4 y13 ff3 fs2 fc0 sc0 ls0 ws0">a<span class="_"> </span>novel<span class="_"> </span>message<span class="_"> </span>passing<span class="_"> </span>scheme<span class="_"> </span>which<span class="_"> </span>returns<span class="_"> </span>deallocated</div><div class="t m2 x18 h4 y14 ff3 fs2 fc0 sc0 ls0 ws0">objects<span class="_"> </span>to<span class="_ _3"> </span>the<span class="_ _3"> </span>originating<span class="_"> </span>allocator<span class="_ _3"> </span>in<span class="_ _3"> </span>batches<span class="_"> </span>without<span class="_ _3"> </span>taking</div><div class="t m2 x18 h4 y15 ff3 fs2 fc0 sc0 ls0 ws0">any<span class="_ _7"> </span>locks.<span class="_ _7"> </span>It<span class="_ _7"> </span>also<span class="_ _7"> </span>uses<span class="_ _7"> </span>a<span class="_ _7"> </span>novel<span class="_ _7"></span><span class="ff7">bump<span class="_ _7"> </span>pointer-free<span class="_ _7"> </span>list<span class="_ _3"> </span></span>data<span class="_ _7"> </span>struc-</div><div class="t m1 x18 h4 y16 ff3 fs2 fc0 sc0 ls0 ws0">ture<span class="_"> </span>with<span class="_"> </span>which<span class="_"> </span>just<span class="_"> </span>64-bits<span class="_"> </span>of<span class="_"> </span>meta-data<span class="_"> </span>ar<span class="_ _6"></span>e<span class="_"> </span>su&#58908;cient<span class="_"> </span>for</div><div class="t m5 x18 h4 y17 ff3 fs2 fc0 sc0 ls0 ws0">each<span class="_"> </span>64<span class="_"> </span>KiB<span class="_"> </span>slab<span class="_ _6"></span>.<span class="_"> </span>On<span class="_"> </span>such<span class="_"> </span>producer/consumer<span class="_"> </span>benchmarks</div><div class="t m0 x18 h4 y18 ff3 fs2 fc0 sc0 ls0 ws0">our<span class="_"> </span>approach<span class="_"> </span>performs<span class="_"> </span>better<span class="_"> </span>than<span class="_"> </span>existing<span class="_"> </span>allocators.</div><div class="t m0 x1e h8 y19 ff6 fs2 fc0 sc0 ls0 ws0">Snmalloc</div><div class="t m2 x1f h4 y19 ff3 fs2 fc0 sc0 ls0 ws0">is<span class="_ _7"></span>available<span class="_ _7"></span>at</div><div class="t m0 x20 h8 y19 ff6 fs2 fc1 sc0 ls0 ws0">https://github.com/Microsoft/</div><div class="t m0 x18 h4 y1a ff6 fs2 fc1 sc0 ls0 ws0">snmalloc<span class="ff3 fc0">.</span></div><div class="t m0 x18 h4 y1b ff8 fs2 fc0 sc0 ls0 ws0">CCS<span class="_ _3"> </span>Concepts<span class="_ _8"> </span><span class="ff5">&#8226;<span class="_"> </span><span class="ff2">Software<span class="_ _3"> </span>and<span class="_ _3"> </span>its<span class="_ _9"> </span>engineering<span class="_ _9"> </span></span>&#8594;<span class="_ _3"> </span><span class="ff2">Allo-</span></span></div><div class="t m0 x18 h4 y1c ff2 fs2 fc0 sc0 ls0 ws0">cation<span class="_ _9"> </span>/<span class="_ _9"> </span>deallocation<span class="_ _9"> </span>strategies<span class="ff3">.</span></div><div class="t m0 x18 h4 y1d ff8 fs2 fc0 sc0 ls0 ws0">Ke<span class="_ _6"></span>ywords<span class="_ _8"> </span><span class="ff3">Memory<span class="_"> </span>allocation,<span class="_"> </span>message<span class="_"> </span>passing</span></div><div class="t m0 x18 h9 y1e ff2 fs4 fc0 sc0 ls0 ws0">A<span class="_ _6"></span>CM<span class="_ _3"> </span>Reference<span class="_ _3"> </span>Format:</div><div class="t m2 x18 ha y1f ff3 fs4 fc0 sc0 ls0 ws0">Paul<span class="_"> </span>Li&#233;tar<span class="_ _1"></span>,<span class="_ _7"> </span>Theodore<span class="_"> </span>Butler<span class="_ _1"></span>,<span class="_"> </span>Sylvan<span class="_ _7"> </span>Clebsch,<span class="_"> </span>Sophia<span class="_ _7"> </span>Drossopoulou,</div><div class="t m6 x18 ha y20 ff3 fs4 fc0 sc0 ls0 ws0">Juliana<span class="_"> </span>Franco,<span class="_"> </span>Matthew<span class="_"> </span>J.<span class="_"> </span>Parkinson,<span class="_"> </span>Alex<span class="_ _7"> </span>Shamis,<span class="_"> </span>Christoph<span class="_"> </span>M.</div><div class="t m1 x18 ha y21 ff3 fs4 fc0 sc0 ls0 ws0">Wintersteiger<span class="_ _1"></span>,<span class="_ _4"> </span>and<span class="_ _2"> </span>David<span class="_ _4"> </span>Chisnall.<span class="_ _4"> </span>2019.</div><div class="t m0 x21 hb y21 ff6 fs4 fc0 sc0 ls0 ws0">snmalloc</div><div class="t m1 x22 ha y21 ff3 fs4 fc0 sc0 ls0 ws0">:<span class="_ _4"> </span>A<span class="_ _2"> </span>Message</div><div class="t m1 x18 ha y22 ff3 fs4 fc0 sc0 ls0 ws0">Passing<span class="_ _2"> </span>Allocator<span class="_ _6"></span>.<span class="_ _2"> </span>In<span class="_ _4"> </span><span class="ff7">Pr<span class="_ _6"></span>oceedings<span class="_ _4"> </span>of<span class="_ _2"> </span>the<span class="_ _2"> </span>2019<span class="_ _4"> </span>A<span class="_ _1"></span>CM<span class="_ _a"> </span>SIGPLAN<span class="_ _2"> </span>In-</span></div><div class="t m7 x18 hc y23 ff7 fs4 fc0 sc0 ls0 ws0">ternational<span class="_ _3"> </span>Symposium<span class="_ _3"> </span>on<span class="_ _9"> </span>Memory<span class="_ _3"> </span>Management<span class="_ _3"> </span>(ISMM<span class="_ _9"> </span>&#8217;19),<span class="_ _7"> </span>June</div><div class="t m1 x18 ha y24 ff7 fs4 fc0 sc0 ls0 ws0">23,<span class="_ _9"> </span>2019,<span class="_ _9"> </span>Phoenix,<span class="_ _9"> </span>AZ,<span class="_ _9"> </span>USA.<span class="_ _9"> </span><span class="ff3">A<span class="_ _6"></span>CM,<span class="_ _9"> </span>New<span class="_"> </span>Y<span class="_ _1"></span>ork,<span class="_ _9"> </span>N<span class="_ _5"></span>Y<span class="_ _6"></span>,<span class="_ _9"> </span>USA,<span class="_ _9"> </span><span class="fc2">14<span class="_ _9"> </span></span>pages.</span></div><div class="t m0 x18 hd y25 ff4 fs4 fc1 sc0 ls0 ws0">h&#58909;ps://doi.org/10.1145/3315573.3329980</div><div class="t m0 x18 he y26 ff5 fs5 fc0 sc0 ls0 ws0">&#8727;</div><div class="t m0 x23 hf y27 ff3 fs6 fc0 sc0 ls0 ws0">W<span class="_ _1"></span>ork<span class="_"> </span>done<span class="_"> </span>while<span class="_"> </span>at<span class="_"> </span>Microsoft<span class="_"> </span>Research.</div><div class="t m1 x18 hf y28 ff3 fs6 fc0 sc0 ls0 ws0">Permission<span class="_ _3"> </span>to<span class="_ _9"> </span>make<span class="_ _9"> </span>digital<span class="_"> </span>or<span class="_ _9"> </span>hard<span class="_ _3"> </span>copies<span class="_ _9"> </span>of<span class="_ _3"> </span>all<span class="_ _9"> </span>or<span class="_ _3"> </span>part<span class="_ _9"> </span>of<span class="_ _3"> </span>this<span class="_ _9"> </span>work<span class="_ _3"> </span>for</div><div class="t m1 x18 hf y29 ff3 fs6 fc0 sc0 ls0 ws0">personal<span class="_ _2"> </span>or<span class="_ _2"> </span>classroom<span class="_ _2"> </span>use<span class="_ _2"> </span>is<span class="_ _2"> </span>granted<span class="_ _2"> </span>without<span class="_ _2"> </span>fee<span class="_ _2"> </span>provided<span class="_ _9"> </span>that<span class="_ _2"> </span>copies</div><div class="t m1 x18 hf y2a ff3 fs6 fc0 sc0 ls0 ws0">are<span class="_"> </span>not<span class="_ _3"> </span>made<span class="_ _9"> </span>or<span class="_"> </span>distributed<span class="_ _3"> </span>for<span class="_ _3"> </span>pro&#58907;t<span class="_ _3"> </span>or<span class="_ _9"> </span>commercial<span class="_"> </span>advantage<span class="_"> </span>and<span class="_ _3"> </span>that</div><div class="t m1 x18 hf y2b ff3 fs6 fc0 sc0 ls0 ws0">copies<span class="_"> </span>bear<span class="_ _3"> </span>this<span class="_ _3"> </span>notice<span class="_ _9"> </span>and<span class="_"> </span>the<span class="_"> </span>full<span class="_"> </span>citation<span class="_ _3"> </span>on<span class="_ _3"> </span>the<span class="_ _9"> </span>&#58907;rst<span class="_"> </span>page.<span class="_"> </span>Copyrights</div><div class="t m1 x18 hf y2c ff3 fs6 fc0 sc0 ls0 ws0">for<span class="_ _9"> </span>components<span class="_ _2"> </span>of<span class="_ _9"> </span>this<span class="_ _9"> </span>work<span class="_ _9"> </span>owned<span class="_ _2"> </span>by<span class="_ _9"> </span>others<span class="_ _9"> </span>than<span class="_ _2"> </span>the<span class="_ _9"> </span>author(s)<span class="_ _9"> </span>must</div><div class="t m1 x18 hf y2d ff3 fs6 fc0 sc0 ls0 ws0">be<span class="_ _9"> </span>honored.<span class="_"> </span>Abstracting<span class="_ _9"> </span>with<span class="_ _9"> </span>cr<span class="_ _6"></span>edit<span class="_ _9"> </span>is<span class="_ _3"> </span>permitted.<span class="_ _9"> </span>T<span class="_ _1"></span>o<span class="_ _9"> </span>copy<span class="_"> </span>other<span class="_ _5"></span>wise,<span class="_ _3"> </span>or</div><div class="t m2 x18 hf y2e ff3 fs6 fc0 sc0 ls0 ws0">republish,<span class="_ _7"> </span>to<span class="_ _7"> </span>post<span class="_ _7"> </span>on<span class="_ _7"> </span>servers<span class="_ _7"> </span>or<span class="_ _7"> </span>to<span class="_ _7"> </span>r<span class="_ _6"></span>edistribute<span class="_"> </span>to<span class="_ _7"> </span>lists,<span class="_ _b"> </span>requires<span class="_ _b"> </span>prior<span class="_"> </span>speci&#58907;c</div><div class="t m0 x18 hf y2f ff3 fs6 fc0 sc0 ls0 ws0">permission<span class="_"> </span>and<span class="_ _c"></span>/or<span class="_"> </span>a<span class="_"> </span>fee.<span class="_"> </span>Request<span class="_"> </span>permissions<span class="_"> </span>from<span class="_"> </span>permissions@acm.org.</div><div class="t m0 x18 h10 y30 ff7 fs6 fc0 sc0 ls0 ws0">ISMM<span class="_ _7"> </span>&#8217;19,<span class="_ _3"> </span>June<span class="_ _3"> </span>23,<span class="_ _7"> </span>2019,<span class="_ _3"> </span>Phoenix,<span class="_ _3"> </span>AZ,<span class="_ _7"> </span>USA</div><div class="t m0 x18 hf y31 ff5 fs6 fc0 sc0 ls0 ws0">&#169;<span class="_"> </span><span class="ff3">2019<span class="_"> </span>Copyright<span class="_"> </span>held<span class="_"> </span>by<span class="_"> </span>the<span class="_"> </span>owner/author(s).<span class="_"> </span>Publication<span class="_"> </span>rights<span class="_"> </span>licensed</span></div><div class="t m0 x18 hf y32 ff3 fs6 fc0 sc0 ls0 ws0">to<span class="_"> </span>A<span class="_ _6"></span>CM.</div><div class="t m0 x18 hf y33 ff3 fs6 fc0 sc0 ls0 ws0">A<span class="_ _6"></span>CM<span class="_"> </span>ISBN<span class="_"> </span>978-1-4503-6722-6/19/06.<span class="_ _d"></span>.<span class="_ _d"></span>.<span class="_ _d"></span>$15.00</div><div class="t m0 x18 h11 y34 ff4 fs6 fc1 sc0 ls0 ws0">h&#58909;ps://doi.org/10.1145/3315573.3329980</div><div class="t m0 x24 h7 y35 ff2 fs1 fc0 sc0 ls0 ws0">1<span class="_ _e"> </span>Introduction</div><div class="t m1 x24 h4 yf ff3 fs2 fc0 sc0 ls0 ws0">Individual<span class="_ _2"> </span>threads<span class="_"> </span>typically<span class="_ _2"> </span>cache<span class="_ _2"> </span>free<span class="_ _9"> </span>obje<span class="_ _5"></span>cts<span class="_ _9"> </span>to<span class="_ _2"> </span>improve</div><div class="t m2 x24 h4 y10 ff3 fs2 fc0 sc0 ls0 ws0">performance<span class="_ _7"> </span>of<span class="_ _3"> </span>allocators<span class="_ _3"> </span>in<span class="_ _7"> </span>multi-threaded<span class="_ _3"> </span>scenarios:<span class="_ _7"> </span>rather</div><div class="t m8 x24 h4 y11 ff3 fs2 fc0 sc0 ls0 ws0">than<span class="_"> </span>returning<span class="_"> </span>deallocated<span class="_"> </span>objects<span class="_ _9"> </span>to<span class="_"> </span>the<span class="_"> </span>original<span class="_ _9"> </span>allo<span class="_ _5"></span>cating</div><div class="t m7 x24 h4 y12 ff3 fs2 fc0 sc0 ls0 ws0">heap/slab,<span class="_"> </span>thr<span class="_ _6"></span>eads<span class="_"> </span>keep<span class="_"> </span>deallocated<span class="_"> </span>objects<span class="_"> </span>in<span class="_"> </span>size-speci&#58907;c</div><div class="t m1 x24 h4 y13 ff3 fs2 fc0 sc0 ls0 ws0">thread-local<span class="_ _a"> </span>lists<span class="_ _a"> </span>and<span class="_ _a"> </span>so<span class="_ _a"> </span>can<span class="_ _a"> </span>quickly<span class="_ _4"> </span>reallocate<span class="_ _a"> </span>objects<span class="_ _a"> </span>of</div><div class="t m9 x24 h4 y14 ff3 fs2 fc0 sc0 ls0 ws0">that<span class="_"> </span>size<span class="_"> </span>when<span class="_"> </span>neede<span class="_ _5"></span>d.<span class="_"> </span>In<span class="_"> </span>fact,<span class="_"> </span>almost<span class="_"> </span>all<span class="_"> </span>modern<span class="_"> </span>allocators</div><div class="t m0 x24 h4 y15 ff3 fs2 fc0 sc0 ls0 ws0">employ<span class="_"> </span>some<span class="_"> </span>form<span class="_"> </span>of<span class="_"> </span>thread-caching<span class="_"> </span>[<span class="fc2">8</span>,<span class="_"> </span><span class="fc2">10</span>,<span class="_"> </span><span class="fc2">13</span>].</div><div class="t m1 x25 h4 y16 ff3 fs2 fc0 sc0 ls0 ws0">When<span class="_ _2"> </span>allocations<span class="_ _2"> </span>and<span class="_ _2"> </span>deallocations<span class="_ _2"> </span>are<span class="_ _9"> </span>roughly<span class="_ _2"> </span>evenly</div><div class="t m3 x24 h4 y17 ff3 fs2 fc0 sc0 ls0 ws0">spread<span class="_"> </span>amongst<span class="_"> </span>threads,<span class="_"> </span>these<span class="_"> </span>caches<span class="_"> </span>do<span class="_"> </span>not<span class="_"> </span>grow<span class="_"> </span>too<span class="_"> </span>large</div><div class="t m1 x24 h4 y18 ff3 fs2 fc0 sc0 ls0 ws0">and<span class="_ _a"> </span>no<span class="_ _a"> </span>synchronization<span class="_ _a"> </span>across<span class="_ _2"> </span>threads<span class="_ _a"> </span>is<span class="_ _a"> </span>ne<span class="_ _5"></span>cessary<span class="_ _1"></span>.<span class="_ _a"> </span>This</div><div class="t m2 x24 h4 y19 ff3 fs2 fc0 sc0 ls0 ws0">leads<span class="_"> </span>to<span class="_"> </span>a<span class="_"> </span>dramatic<span class="_"> </span>improvement<span class="_"> </span>in<span class="_ _3"> </span>performance,<span class="_"> </span>at<span class="_"> </span>the<span class="_"> </span>cost</div><div class="t ma x24 h4 y1a ff3 fs2 fc0 sc0 ls0 ws0">of<span class="_"> </span>not<span class="_"> </span>coalescing<span class="_"> </span>free<span class="_"> </span>memory<span class="_"> </span>that<span class="_"> </span>is<span class="_"> </span>kept<span class="_"> </span>in<span class="_"> </span>thread<span class="_"> </span>caches.</div><div class="t m2 x25 h4 y36 ff3 fs2 fc0 sc0 ls0 ws0">Howev<span class="_ _6"></span>er<span class="_ _1"></span>,<span class="_"> </span>simple<span class="_"> </span>thread-caching<span class="_"> </span>does<span class="_"> </span>not<span class="_"> </span>work<span class="_"> </span>well<span class="_"> </span>in<span class="_"> </span>all</div><div class="t m2 x24 h4 y37 ff3 fs2 fc0 sc0 ls0 ws0">scenarios.<span class="_ _7"> </span>Producer/consumer<span class="_ _7"> </span>workloads<span class="_ _7"> </span>form<span class="_ _7"> </span>the<span class="_ _7"> </span>most<span class="_ _3"> </span>com-</div><div class="t mb x24 h4 y38 ff3 fs2 fc0 sc0 ls0 ws0">mon<span class="_"> </span>such<span class="_"> </span>scenario,<span class="_"> </span>where<span class="_"> </span>some<span class="_ _3"> </span>threads<span class="_"> </span>primarily<span class="_"> </span>perform</div><div class="t mc x24 h4 y39 ff3 fs2 fc0 sc0 ls0 ws0">allocation<span class="_"> </span>and<span class="_"> </span>other<span class="_"> </span>threads<span class="_"> </span>primarily<span class="_"> </span>perform<span class="_"> </span>deallo<span class="_ _5"></span>cation.</div><div class="t m2 x24 h4 y3a ff3 fs2 fc0 sc0 ls0 ws0">If<span class="_"> </span>the<span class="_ _3"> </span>overall<span class="_ _3"> </span>allocation<span class="_"> </span>pattern<span class="_"> </span>is<span class="_ _3"> </span>roughly<span class="_"> </span>symmetric,<span class="_ _3"> </span>that<span class="_"> </span>is,</div><div class="t m2 x24 h4 y3b ff3 fs2 fc0 sc0 ls0 ws0">if<span class="_ _7"> </span>threads<span class="_ _b"> </span>allo<span class="_ _5"></span>cate<span class="_ _7"> </span>and<span class="_ _7"> </span>deallocate<span class="_ _7"> </span>roughly<span class="_ _7"> </span>the<span class="_ _7"> </span>same<span class="_ _7"> </span>number<span class="_ _7"> </span>of</div><div class="t md x24 h4 y3c ff3 fs2 fc0 sc0 ls0 ws0">objects<span class="_"> </span>of<span class="_"> </span>each<span class="_"> </span>size,<span class="_"> </span>then<span class="_"> </span>thread-caching<span class="_"> </span>still<span class="_"> </span>performs<span class="_"> </span>well.</div><div class="t m2 x24 h4 y3d ff3 fs2 fc0 sc0 ls0 ws0">If<span class="_"> </span>the<span class="_"> </span>allocation<span class="_"> </span>pattern<span class="_"> </span>is<span class="_"> </span>asymmetric,<span class="_"> </span>that<span class="_"> </span>is,<span class="_"> </span>if<span class="_"> </span>the<span class="_"> </span>number</div><div class="t m1 x24 h4 y3e ff3 fs2 fc0 sc0 ls0 ws0">of<span class="_ _2"> </span>allocations<span class="_ _2"> </span>and<span class="_ _2"> </span>deallocations<span class="_ _2"> </span>of<span class="_ _2"> </span>a<span class="_ _9"> </span>particular<span class="_ _2"> </span>size<span class="_ _2"> </span>varies</div><div class="t m1 x24 h4 y3f ff3 fs2 fc0 sc0 ls0 ws0">signi&#58907;cantly<span class="_"> </span>across<span class="_ _9"> </span>threads,<span class="_ _9"> </span>then<span class="_ _2"> </span>thread-caching<span class="_"> </span>does<span class="_ _9"> </span>not</div><div class="t me x24 h4 y40 ff3 fs2 fc0 sc0 ls0 ws0">perform<span class="_"> </span>well:<span class="_"> </span>allocating<span class="_"> </span>threads<span class="_"> </span>are<span class="_"> </span>constantly<span class="_"> </span>exhausting</div><div class="t mf x24 h4 y41 ff3 fs2 fc0 sc0 ls0 ws0">their<span class="_"> </span>local<span class="_"> </span>caches,<span class="_"> </span>while<span class="_"> </span>deallo<span class="_ _5"></span>cating<span class="_"> </span>threads<span class="_"> </span>are<span class="_"> </span>constantly</div><div class="t m2 x24 h4 y42 ff3 fs2 fc0 sc0 ls0 ws0">over-&#58907;lling<span class="_ _b"> </span>them.<span class="_ _3"> </span>This<span class="_ _7"> </span>leads<span class="_ _7"> </span>to<span class="_ _7"> </span>synchronization,<span class="_ _7"> </span>and<span class="_ _3"> </span>thus<span class="_ _7"> </span>can</div><div class="t mc x24 h4 y43 ff3 fs2 fc0 sc0 ls0 ws0">be<span class="_"> </span>expensive.<span class="_"> </span>Such<span class="_"> </span>asymmetric<span class="_"> </span>scenarios<span class="_"> </span>occur<span class="_"> </span>in<span class="_"> </span>pipeline<span class="_ _5"></span>d</div><div class="t m1 x24 h4 y44 ff3 fs2 fc0 sc0 ls0 ws0">programs,<span class="_ _a"> </span>which<span class="_ _4"> </span>pass<span class="_ _4"> </span>heap-allocated<span class="_ _4"> </span>structures<span class="_ _4"> </span>between</div><div class="t m10 x24 h4 y45 ff3 fs2 fc0 sc0 ls0 ws0">threads.<span class="_"> </span>They<span class="_"> </span>also<span class="_"> </span>occur<span class="_"> </span>in<span class="_"> </span>some<span class="_"> </span>GC<span class="_"> </span>implementations:<span class="_ _3"> </span>GC</div><div class="t mf x24 h4 y46 ff3 fs2 fc0 sc0 ls0 ws0">threads<span class="_"> </span>perform<span class="_"> </span>all<span class="_"> </span>the<span class="_"> </span>deallocations<span class="_"> </span>while<span class="_"> </span>mutator<span class="_"> </span>threads</div><div class="t m0 x24 h4 y47 ff3 fs2 fc0 sc0 ls0 ws0">perform<span class="_"> </span>all<span class="_"> </span>the<span class="_"> </span>allocations.</div><div class="t m11 x25 h4 y48 ff3 fs2 fc0 sc0 ls0 ws0">This<span class="_"> </span>paper<span class="_"> </span>presents</div><div class="t m0 x26 h8 y48 ff6 fs2 fc0 sc0 ls0 ws0">snmalloc</div><div class="t m11 x27 h4 y48 ff3 fs2 fc0 sc0 ls0 ws0">,<span class="_"> </span>a<span class="_"> </span>new<span class="_"> </span>point<span class="_"> </span>in<span class="_"> </span>the<span class="_"> </span>alloca-</div><div class="t m5 x24 h4 y49 ff3 fs2 fc0 sc0 ls0 ws0">tor/deallocator<span class="_"> </span>design<span class="_"> </span>space.<span class="_"> </span>Instead<span class="_"> </span>of<span class="_"> </span>thread-caching,<span class="_"> </span>we</div><div class="t m12 x24 h4 y4a ff3 fs2 fc0 sc0 ls0 ws0">use<span class="_"> </span>lightweight<span class="_"> </span>lock-free<span class="_"> </span>message-passing<span class="_"> </span>to<span class="_"> </span>send<span class="_"> </span>batches</div><div class="t m0 x24 h4 y4b ff3 fs2 fc0 sc0 ls0 ws0">of<span class="_"> </span>deallocations<span class="_"> </span>to<span class="_"> </span>the<span class="_"> </span>originating<span class="_"> </span>thread.</div><div class="t m13 x25 h4 y4c ff3 fs2 fc0 sc0 ls0 ws0">While<span class="_"> </span>using<span class="_"> </span>batched<span class="_"> </span>message-passing<span class="_"> </span>instead<span class="_"> </span>of<span class="_"> </span>thread-</div><div class="t m1 x24 h4 y4d ff3 fs2 fc0 sc0 ls0 ws0">caching<span class="_ _a"> </span>is<span class="_ _2"> </span>the<span class="_ _a"> </span>main<span class="_ _a"> </span>novelty<span class="_ _a"> </span>of</div><div class="t m0 x27 h8 y4d ff6 fs2 fc0 sc0 ls0 ws0">snmalloc</div><div class="t m1 x28 h4 y4d ff3 fs2 fc0 sc0 ls0 ws0">,<span class="_ _a"> </span>we<span class="_ _2"> </span>also<span class="_ _a"> </span>had<span class="_ _a"> </span>to</div><div class="t m0 x24 h4 y4e ff3 fs2 fc0 sc0 ls0 ws0">address<span class="_"> </span>the<span class="_"> </span>following<span class="_"> </span>design<span class="_"> </span>questions:</div><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a><a class="l" rel='nofollow' onclick='return false;'><div class="d m14"></div></a></div><div class="pi" data-data='{"ctm":[1.568627,0.000000,0.000000,1.568627,0.000000,0.000000]}'></div></div> </body> </html>
评论
    相关推荐