Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@
"sphinx_design",
"sphinx_togglebutton",
"sphinx_tabs.tabs",
"sphinxcontrib.mermaid"
]

mermaid_height = "50%"
mermaid_width = "100%"

templates_path = ['_templates']
exclude_patterns = []

Expand Down
23 changes: 11 additions & 12 deletions source/content/primerParallelism/implementationApproaches.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@
⚠️ Python GIL limitation

*Tightly coupled tasks*
```{mermaid}
graph LR
T1[T1] -.shared.-> M[Mem]
T2[T2] -.shared.-> M
```

::::

::::{grid-item-card} ⚙️ Multi-Processing
Expand All @@ -26,24 +32,17 @@
⚠️ Higher memory use

*Embarrassingly parallel*

```{mermaid}
graph LR
P1[P1] -->|IPC| P2[P2]
```
::::

:::::

### Communication Trade-off

```{mermaid}
graph LR
subgraph "Multi-Threading"
T1[Thread 1] -.shared.-> M[Memory]
T2[Thread 2] -.shared.-> M
end

subgraph "Multi-Processing"
P1[Process 1] -->|IPC| P2[Process 2]
end
```

```{tip}
**Litmus test**: "Do the same thing to 1000 inputs independently" → Multi-processing
```
Expand Down