{"id":2279,"date":"2022-12-08T15:58:25","date_gmt":"2022-12-08T14:58:25","guid":{"rendered":"https:\/\/ff.mhrooz.xyz\/?p=2279"},"modified":"2022-12-08T15:58:25","modified_gmt":"2022-12-08T14:58:25","slug":"shared_memory_vs_distributed_memory","status":"publish","type":"post","link":"https:\/\/blog.mhrooz.xyz\/index.php\/2022\/12\/08\/shared_memory_vs_distributed_memory\/","title":{"rendered":"Shared Memory vs. Distributed Memory"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"330\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/image-20221207163736748-1-1024x330.png\" alt=\"\" class=\"wp-image-2284\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207163736748-1-1024x330.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207163736748-1-300x97.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207163736748-1-768x248.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207163736748-1.png 1296w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>Shared Memory:<\/p>\n\n\n\n<p>Advantages<\/p>\n\n\n\n<ul><li>Simpler to program than message passing<\/li><li>Implicit communication<\/li><\/ul>\n\n\n\n<p>Disadvantages<\/p>\n\n\n\n<ul><li>Controlling locality is difficult but important for performance<\/li><li>Race conditions<\/li><li>False sharing<\/li><\/ul>\n\n\n\n<p>Advantages \u2013 Natural automatic locality control<\/p>\n\n\n\n<p>\u2013 Runs everywhere (SM+DM) \u2013 Scalability and performance \u2013 No data races<\/p>\n\n\n\n<p>\uf06e Disadvantages<\/p>\n\n\n\n<p>\u2013 Low-level, complex programming<\/p>\n\n\n\n<p>\u2013 Large memory consumption due to replication of data<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"uma-numa\">UMA &amp;&amp; NUMA<\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"721\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/image-20221207164136333-1-1024x721.png\" alt=\"\" class=\"wp-image-2283\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207164136333-1-1024x721.png 1024w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207164136333-1-300x211.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207164136333-1-768x541.png 768w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207164136333-1.png 1286w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"uma-architecture-\u7ed3\u6784\">UMA Architecture \u7ed3\u6784<\/h3>\n\n\n\n<p>Access to memory is uniform<\/p>\n\n\n\n<ul><li>\u2013 There is one global physical memory<\/li><li>\u2013 Each processor has essentially the same performance characteristics (same latency and bandwidth) when accessing any memory location in the systemUMA in the past (and now NUMA) systems dominate the server market and are becoming more common at the desktop<\/li><li>Shared address space makes UMA attractive for parallel programming (easier than parallel programming for distributed memory systems)<\/li><li>They are important building blocks for larger-scale systems (E.g., Infiniband clusters)<\/li><\/ul>\n\n\n\n<p>\u76f8\u5f53\u4e8e\u7531\u4e00\u4e2ahub\u6765\u7ba1\u7406\u5185\u5b58\u3002\u6bcf\u4e2a\u5904\u7406\u5668\u90fd\u6709\u76f8\u540c\u7684\u6027\u80fd\u8868\u73b0\uff08\u76f8\u540c\u7684latency\u548cbandwitdh)\uff0c\u56e0\u4e3ahub\u662f\u4e00\u6837\u7684<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"bus-based-uma-design\">Bus-Based UMA Design<\/h4>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"870\" height=\"366\" src=\"http:\/\/iizz.ddns.net:9595\/wp-content\/uploads\/2022\/12\/image-20221207165219467-1.png\" alt=\"\" class=\"wp-image-2285\" srcset=\"https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207165219467-1.png 870w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207165219467-1-300x126.png 300w, https:\/\/blog.mhrooz.xyz\/wp-content\/uploads\/2022\/12\/image-20221207165219467-1-768x323.png 768w\" sizes=\"(max-width: 870px) 100vw, 870px\" \/><\/figure>\n\n\n\n<p>\u6709\u4e00\u6761\u603b\u7ebf\u8fde\u63a5\u7f13\u5b58\u5757\u548c\u5185\u5b58\u5c31\u662fBus Based UMA Design<\/p>\n\n\n\n<p>Remember: we need caches for good performance<\/p>\n\n\n\n<ul><li>Caches allow us to exploit temporal and spatial locality<\/li><li>Instead of fetching a datum from memory, get it from fast cache \u5185\u5b58\u6bd4\u7f13\u5b58\u6162<\/li><li>In a UMA systems we\u2019ll want to have a separate cache for each processor since the cache needs to be close to the processor and access has to be fast<\/li><li>In multicore systems some of the caches might be shared<\/li><\/ul>\n\n\n\n<p>\u7f13\u5b58\u975e\u5e38\u91cd\u8981<\/p>\n\n\n\n<ul><li>Temporal \u65f6\u95f4\u6027\uff0c\u7a0b\u5e8f\u591a\u6b21\u4e0d\u540c\u65f6\u95f4\u8bbf\u95ee\u4e00\u4e2a\u5185\u5b58\u4f4d\u7f6e<\/li><li>Spatial \u7a7a\u95f4\u6027\uff0c\u7a0b\u5e8f\u4e00\u6b21\u8bbf\u95ee\u53ef\u80fd\u591a\u4e2a\u5185\u5b58\u4f4d\u7f6e<\/li><li>UMA\u6211\u4eec\u60f3\u8ba9\u6bcf\u4e2a\u5904\u7406\u5668\u6709\u81ea\u5df1\u7684cache\uff0c\u8ddd\u79bbprocessor\u8d8a\u8fd1\u8bbf\u95ee\u8d8a\u5feb<\/li><li>\u591a\u6838\u7cfb\u7edf\u7f13\u5b58\u53ef\u80fd\u662f\u5206\u4eab\u7684 (L1,L2\u7ed9\u6bcf\u4e2a\u6838\u5fc3\uff0cL3\u5171\u4eab)<\/li><\/ul>\n\n\n\n<p>Problem: caches lead to replication of data items in several locations<\/p>\n\n\n\n<ul><li>These multiple copies of data items in caches must be kept coherent, somehow<\/li><\/ul>\n\n\n\n<p>\u95ee\u9898\u662f\u591a\u6838\u5904\u7406\u7684\u8bdd\u53ef\u80fd\u4e00\u4e2a\u6570\u636e\u5728\u591a\u4e2a\u7f13\u5b58\u90fd\u6709<\/p>\n\n\n\n<ul><li>\u8fd9\u4e9b\u591a\u4efd\u6570\u636e\u5e94\u8be5\u662fcoherent\u7684<\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"caches-coherence\">Caches Coherence<\/h4>\n\n\n\n<p>\u7f13\u5b58\u80fd\u63d0\u5347\u901f\u5ea6<\/p>\n\n\n\n<p>\u5982\u679c\u9700\u8981\u66f4\u6539\u975e\u5171\u4eab\u7f13\u5b58\u7684\u6570\u636e\u7684\u8bdd\uff0c\u8fd9\u4e9b\u6570\u636e\u53ef\u80fd\u5728\u5176\u4ed6\u90a3\u91cc\u4e5f\u6709\uff0c\u8fd9\u91cc\u5c31\u9700\u8981\u4e00\u4e9b\u7b56\u7565<\/p>\n\n\n\n<ol><li>Write-through cache Each update to a cache also updates the original memory location \u7f13\u5b58\u91cc\u7684\u6570\u636e\u66f4\u6539\u4e86\u7acb\u9a6c\u5199\u56de\u5185\u5b58\u4f4d\u7f6e \u5f88\u6162<\/li><li>Write-back cache \u7f13\u5b58\u91cc\u6570\u636e\u5148\u4e0d\u5199\u56de\u53bb\uff0c\u9700\u8981\u66ff\u6362\u5f53\u524d\u7f13\u5b58\u7684\u503c\uff08\u5c06\u5f53\u524d\u53d8\u91cf\u66ff\u6362\u6210\u5176\u4ed6\u7684\u503c\u65f6\u5019\uff09\u518d\u5199\u56de\u53bb<\/li><\/ol>\n\n\n\n<p>\u5982\u679c\u7528Write-through cache\u5219\u6709<\/p>\n\n\n\n<p>P3\u7f13\u5b58\u66f4\u65b0\uff0c\u5185\u5b58\u7f13\u5b58\u66f4\u65b0\uff0cP1\u7f13\u5b58\u672a\u66f4\u65b0\u3002 P2\u7531\u4e8e\u4e4b\u524d\u672a\u50a8\u5b58P2\u7684\u503c\uff0c\u6240\u4ee5\u5411\u5185\u5b58\u8bf7\u6c42\u5230u\u7684\u65b0\u503c<\/p>\n\n\n\n<p>\u5982\u679c\u7528Write-back\uff0c<\/p>\n\n\n\n<p>P3\u7f13\u5b58\u66f4\u65b0<\/p>\n\n\n\n<p>\u7531\u4e8eu\u6ca1\u6709\u88ab\u66ff\u6362\u6210\u5176\u4ed6\u53d8\u91cf\uff08\u6bd4\u5982x,y\uff09\u90a3\u4e48\u8fd9\u65f6\u5019Memory\u4e2d\u4f9d\u7136\u662f\u8001\u503c5\uff0c\u6240\u4ee5P1\u4ece\u7f13\u5b58\u91cc\u8bfb\u53d6\uff0cP2\u4ece\u5185\u5b58\u4e2d\u8bfb\u53d6\uff0c\u90fd\u662f5<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"\u89e3\u51b3\u51b2\u7a81\u529e\u6cd5-snooping\">\u89e3\u51b3\u51b2\u7a81\u529e\u6cd5\uff1aSnooping<\/h5>\n\n\n\n<p>Key properties: \u2013 Cache controllers can snoop on the bus (observe transactions) \u2013 All bus transactions are visible to all cache controllers (bus is a broadcast medium) \u2013 All controllers see the transaction in the same order \u2013 Controllers can take action if a bus transaction is relevant, i.e. involves a memory block in its cache \u2013 Additional state information is associated with each cache line (e.g., valid, dirty,&#8230;) \u2013 Coherence is maintained at the granularity of a cache block \u2013 State information for uncached blocks is implicitly defined (e.g. invalid or not present) \u2013 Controllers can take appropriate action for relevant transactions: invalidate, update, supply value<\/p>\n\n\n\n<ul><li>\u7f13\u5b58\u5757\u80fd\u89c2\u5bdf\u603b\u7ebf\u4e0a\u7684\u7f13\u5b58\u8f6c\u79fb<\/li><li>\u6240\u6709\u7684\u6570\u636e\u90fd\u662f\u901a\u8fc7\u603b\u7ebf\u4f20\u9012\uff0c\u603b\u7ebf\u4e0a\u5b58\u5728\u4e00\u4e2a\u7f13\u5b58\u63a7\u5236\u5668\uff0c\u63a7\u5236\u5668\u53ef\u4ee5\u770b\u5230\u8fd9\u4e9b\u6570\u636e<\/li><li>\u63a7\u5236\u5668\u53ef\u4ee5\u770b\u5230\u8f6c\u79fb\u7684\u987a\u5e8f<\/li><li>\u5982\u679c\u8f6c\u79fb\u662f\u6709\u5173\u7684\uff0c\u63a7\u5236\u5668\u53ef\u4ee5\u91c7\u53d6\u63aa\u65bd\uff0c\u4e5f\u5c31\u662f\u8bf4\u63a7\u5236\u5668\u4f1a\u53c2\u4e0e\u5230\u4e00\u4e2a\u5b58\u50a8\u5757\u5728\u5b83\u7684\u7f13\u5b58\u91cc<\/li><li>\u6709\u989d\u5916\u7684\u72b6\u6001\u88ab\u50a8\u5b58\uff0c\uff08\u5f53\u524d\u5757\u662f\u6709\u6548\u7684\u8fd8\u662f\u810f\u6570\u636e\uff09<\/li><li>\u4e00\u81f4\u6027\u4ee5\u7f13\u5b58\u5757\u7684\u7c92\u5ea6\u4e3a\u5355\u4f4d\u8fdb\u884c\u50a8\u5b58\uff08\u4e5f\u5c31\u662f\u8bf4\u4e00\u6362\u5c31\u662f\u4e00\u884c\uff09<\/li><li>\u672a\u7f13\u5b58\u5757\u7684\u72b6\u6001\u4fe1\u606f\u662f\u9690\u5f0f\u5b9a\u4e49\u7684\uff08\u65e0\u6548\u8fd8\u662f\u6ca1\u6709\u51fa\u73b0\u8fc7\uff09<\/li><li>\u63a7\u5236\u5668\u5bf9\u4e8e\u76f8\u5173\u7684\u8f6c\u79fb\u53ef\u4ee5\u91c7\u53d6\u6709\u6548\u7684\u63aa\u65bd\uff1a\u4ee4\u5931\u6548\uff0c\u66f4\u65b0\uff0c\u63d0\u4f9b\u65b0\u503c<\/li><\/ul>\n\n\n\n<p>Snooping\u6709\u4e24\u79cd\u534f\u8bae\uff1a\u5931\u6548\u548c\u66f4\u65b0\u534f\u8bae\uff1a<\/p>\n\n\n\n<p>Invalidation Protocols<\/p>\n\n\n\n<p>Basic idea: There can be multiple readers but only one write at a time.<\/p>\n\n\n\n<p>Initially, a line may be shared among several caches for reading purposes. When one of the caches wants to perform a write to the line it first issues a notice that invalidates that tine in the other caches, making the line exclusive to the writing cache.<\/p>\n\n\n\n<p>Update Protocols<\/p>\n\n\n\n<p>There can be multiple writers as well as multiple readers.<\/p>\n\n\n\n<p>When a processor wishes to update a shared line, the word to be updated is distributed to all others, and caches containing that line can update it.<\/p>\n\n\n\n<h5 class=\"wp-block-heading\" id=\"problems\">Problems<\/h5>\n\n\n\n<p>True sharing<\/p>\n\n\n\n<ul><li>\u4e00\u4e2a\u53d8\u91cf\u5171\u4eab\u7ed9\u4e24\u4e2a\u6838\u5fc3\uff0c\u8fd9\u65f6\u5019\u5c31\u662f\u771fsharing<\/li><li>\u5982\u679c\u9891\u7e41\u8bfb\u5199\u8fd9\u4e9b\u5171\u4eab\u53d8\u91cf\uff0c\u4f1a\u964d\u4f4e\u6548\u7387<\/li><li>\u53ef\u4ee5\u7ed9\u6bcf\u4e2athread\u5206\u914d\u4e00\u4e2alocal \u53d8\u91cf<\/li><\/ul>\n\n\n\n<p>False sharing<\/p>\n\n\n\n<ul><li>\u7f13\u5b58\u90fd\u662f\u4ee5\u7f13\u5b58\u884c\u4e3a\u57fa\u7840 \u5047\u8bbe\u6709\u4e00\u884c\u73b0\u5728\u6709 a b c \u8fd9\u4e00\u884c\u540c\u65f6\u88abcore 1\u548ccore 2\u5b58\u50a8 \u5982\u679ca\u88abcore 1 \u4fee\u6539\uff0c\u90a3\u4e48core 2\u7684b\u548cc\u4e5f\u8ddf\u7740\u5931\u6548\u4e86 \u8fd9\u65f6core 2 \u5982\u679c\u60f3\u8981\u8bfb\u53d6b\u7684\u8bdd\u5c31\u9700\u8981\u8fd4\u56de\u9ad8\u7ea7\u7f13\u5b58\u6216\u8005\u4e3b\u5b58\u627e\uff0c\u975e\u5e38\u6d6a\u8d39\u65f6\u95f4 \u5982\u679c\u591a\u7ebf\u7a0b\u4fee\u6539\u4e92\u76f8\u72ec\u7acb\u7684\u53d8\u91cf\u65f6\uff0c\u6211\u4eec\u5f80\u5f80\u5047\u8bbe\u4ed6\u4eec\u5360\u636e\u7684\u662f\u4e24\u4e2a\u884c\uff0c\u5904\u7406\u5668\u53ef\u4ee5\u5e76\u884c\u5904\u7406\u4ed6\u4eec \u4f46\u5176\u5b9e\u5728\u7f13\u5b58\u4e2d\u4ed6\u4eec\u53ef\u80fd\u5360\u636e\u7684\u662f\u4e00\u4e2a\u884c\uff0c\u90a3\u4e48\u5904\u7406\u5668\u5c31\u8981\u4e0d\u65ad\u8fdb\u884c\u5931\u6548\uff0c\u6709\u6548\u547d\u4ee4\uff0c\u672c\u8d28\u4e0a\u53c8\u56de\u5230\u4e86\u4e00\u4e2a\u884c\u3002 \u89e3\u51b3\u529e\u6cd5\u5c31\u662f\u52a0padding<\/li><\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"directory-based-cache-coherence-numa\u4e2d\u7684\u7f13\u5b58\u4e00\u81f4\u6027\u95ee\u9898\">Directory Based Cache Coherence NUMA\u4e2d\u7684\u7f13\u5b58\u4e00\u81f4\u6027\u95ee\u9898<\/h3>\n\n\n\n<p>\u5982\u679c\u53ea\u662f\u5c0f\u8303\u56f4\u7684\u8282\u70b9\u6570\u91cf\uff0cBus Based\u662f\u5f88\u597d\u7684\u3002\u4f46\u662f\u5982\u679c\u8282\u70b9\u6570\u5f88\u591a\uff0c\u53ea\u6709\u4e00\u4e2abus\u8d1f\u8d23\u4f20\u9012\u6570\u636e\u5f88\u5bb9\u6613\u9020\u6210\u4e00\u6838\u6709\u96be\uff0cn\u6838\u56f4\u89c2\u7684\u60c5\u51b5\u3002\u56e0\u4e3a\u4e00\u6b21\u53ea\u5141\u8bb8\u4e00\u4e2a\u8282\u70b9\u4f7f\u7528\u603b\u7ebf\uff0c\u5f88\u635f\u5931\u6574\u4f53\u7684\u6027\u80fd\u3002\u4e00\u4e2a\u4fee\u6539\uff0c\u5c31\u9700\u8981\u7ed9\u6240\u6709\u8282\u70b9\u5e7f\u64ad\uff0c\u5f88\u6162\u3002<\/p>\n\n\n\n<ul><li>\u7528\u4e00\u4e2a\u7279\u6b8a\u7684directory\u6765\u670d\u52a1\uff0c\u800c\u4e0d\u662f\u7528bus<\/li><li>\u901a\u8fc7\u76ee\u5f55\u8ddf\u8e2a\u6240\u6709\u7f13\u5b58\u5757\u7684\u72b6\u6001\uff08\u72b6\u6001\uff0c\u65f6\u95f4\uff0c\u4f4d\u7f6e\uff09<\/li><li>\u76ee\u5f55\u53ef\u4ee5\u70b9\u5bf9\u70b9\u7684\u901a\u77e5\u4fee\u6539\uff0c\u4e0d\u518d\u9700\u8981\u5e7f\u64ad<\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Directory-based_coherence\">https:\/\/en.wikipedia.org\/wiki\/Directory-based_coherence<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sequential-consistency\"><strong>Sequential Consistency<\/strong><\/h3>\n\n\n\n<p>\u4ec5\u4ec5\u53ea\u662fCache Coherence \u6216\u8bb8\u4e0d\u591f.<\/p>\n\n\n\n<p>\u6709\u65f6\u5019\u7f16\u8bd1\u5668\u4f1a\u91cd\u65b0\u7ec4\u7ec7\u4e0a\u4e0b\u6587<\/p>\n\n\n\n<p>\u6bd4\u5982<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">int a, b;<br>a = 5;<br>b = 3;<br>a = 6;<\/pre>\n\n\n\n<p>\u53ef\u80fd\u7f16\u8bd1\u5668\u4f1a\u628aa=6\u653e\u5230\u524d\u9762\uff0cb=3\u653e\u5230\u540e\u9762\u3002\u5bf9\u4e8e\u7f16\u8bd1\u5668\u6765\u8bf4\u8fd9\u6837\u8fde\u7eed\u4fee\u6539\u540c\u4e00\u4e2a\u53d8\u91cf\u5bf9\u4e8e\u7f13\u5b58\u7684\u5f00\u9500\u53ef\u80fd\u662f\u5c0f\u7684\u3002\u4f46\u662f\u8003\u8651\u8fd9\u6837\u4e00\u79cd\u60c5\u51b5<\/p>\n\n\n\n<p>\u8fd9\u79cd\u60c5\u51b5\u4e0b<\/p>\n\n\n\n<p>P1\u5982\u679cflag\u88ab\u653e\u5728\u4e86\u524d\u9762\uff0cP2\u5728\u8bfb\u53d6data\u7684\u65f6\u5019\u5c31\u53ef\u80fd\u4f1a\u8bfb\u52300\u3002<\/p>\n\n\n\n<p>\u548c\u6211\u4eec\u7684\u60f3\u6cd5\u4e0d\u4e00\u6837<\/p>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"idea\">Idea<\/h4>\n\n\n\n<p>\u6211\u4eec\u60f3\u8ba9Operations\u90fd\u4f9d\u7167\u7a0b\u5e8f\u91cc\u7684\u987a\u5e8f\u6765\u3002<\/p>\n\n\n\n<ol><li>A read should return the value of the last write to the location(by any processor) \u4e00\u6b21\u8bfb\u5e94\u8be5\u8fd4\u56de\u6700\u540e\u4e00\u6b21\u5199\u7684\u4f4d\u7f6e\u7684\u503c<\/li><li>Operations should be executed in some order that respects the individual program order of the threads\/process. \u8fd0\u7b97\u5e94\u8be5\u88ab\u4ee5\u4e00\u79cd\uff0c\u5c0a\u91cd\u7ebf\u7a0b\/\u8fdb\u7a0b\u4e2a\u522b\u7a0b\u5e8f\u7684\u987a\u5e8f\uff0c\u6267\u884c\u3002<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"model\">Model<\/h4>\n\n\n\n<ol><li>\u5904\u7406\u5668\u4f9d\u6b21\u4ecememory\u4e2d\u5b58\u53d6<\/li><li>\u4f46\u662f\u7a0b\u5e8f\u7684\u987a\u5e8f\u4e0d\u997f\u80fd\u6539\u53d8\uff0c\u6bcf\u6b21\u5b58\u53d6memory\u5e94\u8be5\u662f\u539f\u5b50\u5316\u7684\u3002\u5b9a\u4e49\u4e00\u4e9b\u57fa\u7840\u6307\u4ee4<\/li><\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Shared Memory: Advantages Simpler to program than messa<a class=\"more-link\" href=\"https:\/\/blog.mhrooz.xyz\/index.php\/2022\/12\/08\/shared_memory_vs_distributed_memory\/\">\u7ee7\u7eed\u9605\u8bfb<span class=\"screen-reader-text\">&#8220;Shared Memory vs. Distributed Memory&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts\/2279"}],"collection":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/comments?post=2279"}],"version-history":[{"count":1,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts\/2279\/revisions"}],"predecessor-version":[{"id":2286,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/posts\/2279\/revisions\/2286"}],"wp:attachment":[{"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/media?parent=2279"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/categories?post=2279"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mhrooz.xyz\/index.php\/wp-json\/wp\/v2\/tags?post=2279"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}