mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-10-28 06:34:41 +00:00
Update Socket.md
调整配图的配色和画法:换成更浅的蓝、青、紫和暖灰,去掉阴影,方框加同色细描边,箭头改为实心。
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 124 KiB |
+14
-17
@@ -1,31 +1,31 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="640" height="330" viewBox="0 0 640 330">
|
||||
<style>
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #666; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #777; text-anchor: middle; }
|
||||
text { font-family: "PingFang SC", "Microsoft YaHei", Helvetica, Arial, sans-serif; fill: #3F3F3F; font-size: 12px; }
|
||||
.title { font-weight: bold; font-size: 15px; fill: #333; text-anchor: middle; }
|
||||
.b { font-weight: bold; }
|
||||
.c { text-anchor: middle; }
|
||||
.e { text-anchor: end; }
|
||||
.note { fill: #C0605A; }
|
||||
.ok { fill: #6A9F68; }
|
||||
.sub { font-size: 11px; fill: #888; }
|
||||
.sub { font-size: 11px; fill: #6E6E6E; }
|
||||
.mono { font-family: Menlo, Consolas, monospace; }
|
||||
.arrow { stroke: #666; stroke-width: 1.3; fill: none; marker-end: url(#a); }
|
||||
.arrow { stroke: #555; stroke-width: 1.1; fill: none; marker-end: url(#a); }
|
||||
.red { stroke: #C0605A; marker-end: url(#r); }
|
||||
.green { stroke: #6A9F68; marker-end: url(#g); }
|
||||
.dash { stroke-dasharray: 5 4; }
|
||||
.line { stroke: #666; stroke-width: 1.3; fill: none; }
|
||||
.line { stroke: #555; stroke-width: 1.1; fill: none; }
|
||||
.frame { fill: none; stroke: #999; stroke-width: 1; stroke-dasharray: 4 3; }
|
||||
.shadow { fill: #DADADA; }
|
||||
</style>
|
||||
<defs>
|
||||
<marker id="a" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#666" stroke-width="1.6"/>
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#555"/>
|
||||
</marker>
|
||||
<marker id="r" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#C0605A" stroke-width="1.6"/>
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#C0605A"/>
|
||||
</marker>
|
||||
<marker id="g" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse">
|
||||
<path d="M1,1 L9,5 L1,9" fill="none" stroke="#6A9F68" stroke-width="1.6"/>
|
||||
<path d="M1,1.5 L9.5,5 L1,8.5 z" fill="#6A9F68"/>
|
||||
</marker>
|
||||
</defs>
|
||||
<rect width="100%" height="100%" fill="#FFFFFF"/>
|
||||
@@ -33,16 +33,14 @@
|
||||
<text x="320" y="28" class="title">select / poll 与 epoll</text>
|
||||
<rect x="20" y="50" width="290" height="265" rx="8" class="frame"/>
|
||||
<text x="30" y="68" class="b">select / poll</text>
|
||||
<rect x="97" y="82" width="140" height="34" rx="6" class="shadow"/>
|
||||
<rect x="95" y="80" width="140" height="34" rx="6" fill="#B0E3E6"/>
|
||||
<rect x="95" y="80" width="140" height="34" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
|
||||
<text x="165" y="101.5" class="b c">用户进程</text>
|
||||
<line x1="30" y1="150" x2="300" y2="150" class="line dash"/>
|
||||
<text x="300" y="143" class="sub e">用户态</text>
|
||||
<text x="300" y="163" class="sub e">内核态</text>
|
||||
<rect x="330" y="50" width="290" height="265" rx="8" class="frame"/>
|
||||
<text x="340" y="68" class="b">epoll</text>
|
||||
<rect x="407" y="82" width="140" height="34" rx="6" class="shadow"/>
|
||||
<rect x="405" y="80" width="140" height="34" rx="6" fill="#B0E3E6"/>
|
||||
<rect x="405" y="80" width="140" height="34" rx="6" fill="#C6ECE9" stroke="#7DBCB7"/>
|
||||
<text x="475" y="101.5" class="b c">用户进程</text>
|
||||
<line x1="340" y1="150" x2="610" y2="150" class="line dash"/>
|
||||
<text x="610" y="143" class="sub e">用户态</text>
|
||||
@@ -50,8 +48,7 @@
|
||||
<line x1="110" y1="117" x2="110" y2="200" class="arrow "/>
|
||||
<text x="104" y="180" class="e sub">每次调用复制</text>
|
||||
<text x="104" y="194" class="e sub">全部描述符</text>
|
||||
<rect x="72" y="205" width="160" height="40" rx="6" class="shadow"/>
|
||||
<rect x="70" y="203" width="160" height="40" rx="6" fill="#B1DDF0"/>
|
||||
<rect x="70" y="203" width="160" height="40" rx="6" fill="#C6E4FB" stroke="#7FB2D6"/>
|
||||
<text x="150" y="221" class="b c">遍历全部描述符</text>
|
||||
<text x="150" y="236" class="sub c">检查是否就绪</text>
|
||||
<line x1="195" y1="200" x2="195" y2="117" class="arrow "/>
|
||||
@@ -73,10 +70,10 @@
|
||||
<circle cx="385" cy="275" r="9" fill="#61646B"/>
|
||||
<circle cx="415" cy="275" r="9" fill="#C0605A"/>
|
||||
<text x="400" y="300" class="c sub">红黑树:已注册描述符</text>
|
||||
<rect x="535" y="210" width="50" height="20" rx="3" fill="#DDD7F6"/>
|
||||
<rect x="535" y="238" width="50" height="20" rx="3" fill="#DDD7F6"/>
|
||||
<rect x="535" y="210" width="50" height="20" rx="3" fill="#E6E3FA" stroke="#B8B0DE"/>
|
||||
<rect x="535" y="238" width="50" height="20" rx="3" fill="#E6E3FA" stroke="#B8B0DE"/>
|
||||
<line x1="560" y1="230" x2="560" y2="237" class="arrow "/>
|
||||
<rect x="535" y="266" width="50" height="20" rx="3" fill="#DDD7F6"/>
|
||||
<rect x="535" y="266" width="50" height="20" rx="3" fill="#E6E3FA" stroke="#B8B0DE"/>
|
||||
<line x1="560" y1="258" x2="560" y2="265" class="arrow "/>
|
||||
<text x="560" y="297" class="c sub">就绪链表</text>
|
||||
<path d="M430,245 C470,245 490,220 532,220" class="arrow dash"/>
|
||||
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.7 KiB |
Reference in New Issue
Block a user