<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Parallelism on IT Comparison</title><link>https://comparison.metacog.co.kr/tags/parallelism/</link><description>Recent content in Parallelism on IT Comparison</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Sun, 02 Aug 2026 23:53:42 +0900</lastBuildDate><atom:link href="https://comparison.metacog.co.kr/tags/parallelism/index.xml" rel="self" type="application/rss+xml"/><item><title>Concurrency vs Parallelism: Interleaving vs Simultaneous Execution</title><link>https://comparison.metacog.co.kr/posts/2026-08-02-concurrency-vs-parallelism-interleaving-vs-simultaneous-exec/</link><pubDate>Sun, 02 Aug 2026 23:53:42 +0900</pubDate><guid>https://comparison.metacog.co.kr/posts/2026-08-02-concurrency-vs-parallelism-interleaving-vs-simultaneous-exec/</guid><description>&lt;h2 id="overview"&gt;Overview&lt;/h2&gt;
&lt;p&gt;Concurrency and parallelism are often used interchangeably, but they describe different things: concurrency is about &lt;strong class="kw"&gt;interleaving&lt;/strong&gt; multiple tasks so a program can make progress on all of them, while parallelism is about &lt;strong class="kw"&gt;simultaneous execution&lt;/strong&gt; of tasks on separate hardware. A single-core CPU can be concurrent but never truly parallel; a multi-core CPU can be both.&lt;/p&gt;
&lt;h2 id="comparison-diagram"&gt;Comparison Diagram&lt;/h2&gt;
&lt;div class="compare-diagram"&gt;
&lt;svg viewBox="0 0 640 360" xmlns="http://www.w3.org/2000/svg"&gt;&lt;line x1="320" y1="50" x2="320" y2="330" style="stroke:var(--border)" stroke-width="1" stroke-dasharray="4,4"/&gt;&lt;text x="160" y="32" text-anchor="middle" style="fill:var(--primary)" font-size="20" font-weight="bold"&gt;Concurrency&lt;/text&gt;&lt;text x="480" y="32" text-anchor="middle" style="fill:var(--primary)" font-size="20" font-weight="bold"&gt;Parallelism&lt;/text&gt;&lt;rect x="110" y="55" width="100" height="40" rx="4" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="160" y="80" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;1 CPU Core&lt;/text&gt;&lt;rect x="40" y="140" width="44" height="36" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="62" y="163" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;A&lt;/text&gt;&lt;rect x="88" y="140" width="44" height="36" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="110" y="163" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;B&lt;/text&gt;&lt;rect x="136" y="140" width="36" height="36" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="154" y="163" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;A&lt;/text&gt;&lt;rect x="176" y="140" width="52" height="36" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="202" y="163" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;C&lt;/text&gt;&lt;rect x="232" y="140" width="48" height="36" style="fill:var(--compare-a-soft);stroke:var(--compare-a)" stroke-width="1.5"/&gt;&lt;text x="256" y="163" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;B&lt;/text&gt;&lt;line x1="40" y1="195" x2="290" y2="195" style="stroke:var(--border)" stroke-width="1"/&gt;&lt;path d="M290,195 L283,191 L283,199 Z" style="fill:var(--border)"/&gt;&lt;text x="165" y="212" text-anchor="middle" style="fill:var(--secondary)" font-size="11"&gt;time (single lane, tasks interleave)&lt;/text&gt;&lt;text x="165" y="230" text-anchor="middle" style="fill:var(--secondary)" font-size="11"&gt;only one task runs at any instant&lt;/text&gt;&lt;rect x="380" y="60" width="80" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="420" y="80" text-anchor="middle" style="fill:var(--content)" font-size="11"&gt;Core 1&lt;/text&gt;&lt;rect x="380" y="105" width="80" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="420" y="125" text-anchor="middle" style="fill:var(--content)" font-size="11"&gt;Core 2&lt;/text&gt;&lt;rect x="380" y="150" width="80" height="30" rx="4" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="420" y="170" text-anchor="middle" style="fill:var(--content)" font-size="11"&gt;Core 3&lt;/text&gt;&lt;rect x="480" y="60" width="100" height="30" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="530" y="80" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;A&lt;/text&gt;&lt;rect x="480" y="105" width="100" height="30" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="530" y="125" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;B&lt;/text&gt;&lt;rect x="480" y="150" width="100" height="30" style="fill:var(--compare-b-soft);stroke:var(--compare-b)" stroke-width="1.5"/&gt;&lt;text x="530" y="170" text-anchor="middle" style="fill:var(--content)" font-size="12"&gt;C&lt;/text&gt;&lt;line x1="480" y1="55" x2="480" y2="195" style="stroke:var(--border)" stroke-width="1" stroke-dasharray="3,3"/&gt;&lt;line x1="580" y1="55" x2="580" y2="195" style="stroke:var(--border)" stroke-width="1" stroke-dasharray="3,3"/&gt;&lt;line x1="480" y1="205" x2="580" y2="205" style="stroke:var(--border)" stroke-width="1"/&gt;&lt;path d="M580,205 L573,201 L573,209 Z" style="fill:var(--border)"/&gt;&lt;text x="530" y="222" text-anchor="middle" style="fill:var(--secondary)" font-size="11"&gt;time (all run at once)&lt;/text&gt;&lt;text x="530" y="240" text-anchor="middle" style="fill:var(--secondary)" font-size="11"&gt;tasks execute simultaneously&lt;/text&gt;&lt;/svg&gt;
&lt;/div&gt;
&lt;h2 id="comparison-table"&gt;Comparison Table&lt;/h2&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Aspect&lt;/th&gt;
&lt;th&gt;Concurrency&lt;/th&gt;
&lt;th&gt;Parallelism&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Core definition&lt;/td&gt;
&lt;td&gt;Structuring a program to make progress on multiple tasks by interleaving them&lt;/td&gt;
&lt;td&gt;Executing multiple tasks or subtasks at the literal same instant&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Hardware requirement&lt;/td&gt;
&lt;td&gt;Works on a single core via context switching&lt;/td&gt;
&lt;td&gt;Requires multiple cores, processors, or SIMD units&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Execution pattern&lt;/td&gt;
&lt;td&gt;Tasks take turns; interleaved progress, order not guaranteed&lt;/td&gt;
&lt;td&gt;Tasks run simultaneously on separate execution units&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Task independence&lt;/td&gt;
&lt;td&gt;Tasks often share state and need coordination to interleave safely&lt;/td&gt;
&lt;td&gt;Tasks are usually split to run independently, minimizing interference&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Primary goal&lt;/td&gt;
&lt;td&gt;Improve responsiveness and structure for handling many things at once&lt;/td&gt;
&lt;td&gt;Improve throughput by doing more work in the same time&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Typical workload&lt;/td&gt;
&lt;td&gt;I/O-bound: network calls, file access, user events&lt;/td&gt;
&lt;td&gt;CPU-bound: numerical computation, data processing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Common pitfalls&lt;/td&gt;
&lt;td&gt;Race conditions, deadlocks, callback/coordination complexity&lt;/td&gt;
&lt;td&gt;Synchronization overhead, diminishing returns (Amdahl&amp;rsquo;s law)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Language/runtime constructs&lt;/td&gt;
&lt;td&gt;Event loops, coroutines, async/await, green threads&lt;/td&gt;
&lt;td&gt;OS threads, multiprocessing, GPU kernels, SIMD&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2 id="key-differences"&gt;Key Differences&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Concurrency is a way of &lt;strong class="kw"&gt;structuring&lt;/strong&gt; code to deal with multiple tasks; it doesn&amp;rsquo;t require them to run at the same instant.&lt;/li&gt;
&lt;li&gt;Parallelism requires &lt;strong class="kw"&gt;multiple cores&lt;/strong&gt; executing work simultaneously, while concurrency runs fine on a single core.&lt;/li&gt;
&lt;li&gt;Concurrent code can run without being parallel, and parallel code (like &lt;strong class="kw"&gt;SIMD&lt;/strong&gt; data processing) can run without concurrent structure.&lt;/li&gt;
&lt;li&gt;Concurrency&amp;rsquo;s main hazard is a &lt;strong class="kw"&gt;race condition&lt;/strong&gt; from shared state; parallelism&amp;rsquo;s main cost is synchronization overhead.&lt;/li&gt;
&lt;li&gt;Concurrency optimizes for &lt;strong class="kw"&gt;responsiveness&lt;/strong&gt;; parallelism optimizes for raw computational throughput.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="when-to-use-each"&gt;When to Use Each&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;Concurrency&lt;/strong&gt;&lt;/p&gt;</description></item></channel></rss>