Skip to content

Commit f2d6e22

Browse files
added separate container c4 diagram
1 parent 161b306 commit f2d6e22

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

C4/container.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
2+
## Level 2: Container Diagram
3+
4+
```mermaid
5+
graph TB
6+
subgraph "CPython Runtime System"
7+
subgraph "Core Interpreter"
8+
PARSER[Parser<br/>PEG Grammar<br/>AST Generation]
9+
COMPILER[Compiler<br/>AST to Bytecode<br/>Optimization]
10+
VM[Virtual Machine<br/>Bytecode Execution<br/>Tier 1 & Tier 2]
11+
end
12+
13+
subgraph "Runtime Services"
14+
GC[Garbage Collector<br/>Reference Counting<br/>Cycle Detection]
15+
MEM[Memory Manager<br/>Object Allocation<br/>Free Lists]
16+
THREAD[Threading System<br/>GIL Management<br/>Thread States]
17+
end
18+
19+
subgraph "Object System"
20+
OBJ[Object Model<br/>Type System<br/>Method Resolution]
21+
BUILTIN[Built-in Types<br/>int, str, list, dict<br/>etc.]
22+
end
23+
24+
subgraph "Module System"
25+
IMPORT[Import System<br/>Module Loading<br/>Path Resolution]
26+
STDLIB[Standard Library<br/>Built-in Modules<br/>Extension Modules]
27+
end
28+
29+
subgraph "C API"
30+
CAPI[C API<br/>Extension Interface<br/>Embedding Support]
31+
end
32+
end
33+
34+
subgraph "External Dependencies"
35+
OS2[Operating System]
36+
LIBS[System Libraries]
37+
end
38+
39+
PARSER -->|"AST"| COMPILER
40+
COMPILER -->|"Bytecode"| VM
41+
VM -->|"Object Operations"| OBJ
42+
VM -->|"Memory Requests"| MEM
43+
VM -->|"GC Triggers"| GC
44+
VM -->|"Thread Management"| THREAD
45+
46+
OBJ -->|"Type Operations"| BUILTIN
47+
IMPORT -->|"Module Loading"| STDLIB
48+
IMPORT -->|"Extension Loading"| CAPI
49+
50+
MEM -->|"System Calls"| OS2
51+
THREAD -->|"Thread APIs"| OS2
52+
STDLIB -->|"System Libraries"| LIBS
53+
CAPI -->|"Extension Interface"| LIBS
54+
```

0 commit comments

Comments
 (0)