pull/6/head
yuanguangxin 5 years ago
parent 95460a11c9
commit 4b28b6580f

@ -20,8 +20,8 @@
</component>
<component name="ChangeListManager">
<list default="true" id="af7ffdf2-4ddc-4ed6-8222-60ed5acbc2ed" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/Rocket.md" beforeDir="false" afterPath="$PROJECT_DIR$/Rocket.md" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -278,13 +278,8 @@
<workItem from="1591758584495" duration="3000" />
<workItem from="1592230200964" duration="1933000" />
<workItem from="1592291352584" duration="6590000" />
</task>
<task id="LOCAL-00023" summary="update Rocket.md">
<created>1581857522107</created>
<option name="number" value="00023" />
<option name="presentableId" value="LOCAL-00023" />
<option name="project" value="LOCAL" />
<updated>1581857522107</updated>
<workItem from="1592577669343" duration="2000" />
<workItem from="1592881051365" duration="204000" />
</task>
<task id="LOCAL-00024" summary="update Rocket.md">
<created>1581858072286</created>
@ -622,7 +617,14 @@
<option name="project" value="LOCAL" />
<updated>1591717167748</updated>
</task>
<option name="localTasksCounter" value="72" />
<task id="LOCAL-00072" summary="update">
<created>1592388297996</created>
<option name="number" value="00072" />
<option name="presentableId" value="LOCAL-00072" />
<option name="project" value="LOCAL" />
<updated>1592388297996</updated>
</task>
<option name="localTasksCounter" value="73" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -709,10 +711,10 @@
<screen x="0" y="0" width="1440" height="900" />
</state>
<state x="458" y="204" key="#com.intellij.refactoring.safeDelete.UnsafeUsagesDialog/0.0.1440.900@0.0.1440.900" timestamp="1587221348872" />
<state x="303" y="50" key="CommitChangelistDialog2" timestamp="1592388288495">
<state x="303" y="50" key="CommitChangelistDialog2" timestamp="1592388297859">
<screen x="0" y="0" width="1440" height="900" />
</state>
<state x="303" y="50" key="CommitChangelistDialog2/0.0.1440.900@0.0.1440.900" timestamp="1592388288495" />
<state x="303" y="50" key="CommitChangelistDialog2/0.0.1440.900@0.0.1440.900" timestamp="1592388297859" />
<state x="404" y="60" key="CommitChangelistDialog2/0.0.1920.1080@0.0.1920.1080" timestamp="1591633493160" />
<state x="143" y="78" width="1152" height="720" key="DiffContextDialog" timestamp="1592386883631">
<screen x="0" y="0" width="1440" height="900" />
@ -784,10 +786,10 @@
<screen x="0" y="0" width="1440" height="900" />
</state>
<state x="221" y="63" key="SettingsEditor/0.0.1440.900@0.0.1440.900" timestamp="1585223890241" />
<state x="488" y="252" key="Vcs.Push.Dialog.v2" timestamp="1591717170083">
<screen x="0" y="0" width="2194" height="1194" />
<state x="320" y="190" key="Vcs.Push.Dialog.v2" timestamp="1592388299499">
<screen x="0" y="0" width="1440" height="900" />
</state>
<state x="320" y="190" key="Vcs.Push.Dialog.v2/0.0.1440.900@0.0.1440.900" timestamp="1588749781144" />
<state x="320" y="190" key="Vcs.Push.Dialog.v2/0.0.1440.900@0.0.1440.900" timestamp="1592388299499" />
<state x="427" y="228" key="Vcs.Push.Dialog.v2/0.0.1920.1080@0.0.1920.1080" timestamp="1591633495184" />
<state x="488" y="252" key="Vcs.Push.Dialog.v2/0.0.2194.1194@0.0.2194.1194" timestamp="1591717170083" />
<state x="100" y="100" width="1240" height="700" key="com.intellij.history.integration.ui.views.FileHistoryDialog" timestamp="1587219014962">
@ -807,11 +809,11 @@
</state>
<state x="378" y="207" width="683" height="486" key="find.popup/0.0.1440.900@0.0.1440.900" timestamp="1586846937826" />
<state x="504" y="248" width="911" height="584" key="find.popup/0.0.1920.1080@0.0.1920.1080" timestamp="1591635370753" />
<state x="479" y="282" key="git4idea.merge.GitPullDialog" timestamp="1592386920559">
<screen x="0" y="0" width="1440" height="900" />
<state x="638" y="338" key="git4idea.merge.GitPullDialog" timestamp="1592881772478">
<screen x="0" y="0" width="1920" height="1080" />
</state>
<state x="479" y="282" key="git4idea.merge.GitPullDialog/0.0.1440.900@0.0.1440.900" timestamp="1592386920559" />
<state x="638" y="338" key="git4idea.merge.GitPullDialog/0.0.1920.1080@0.0.1920.1080" timestamp="1591809009592" />
<state x="638" y="338" key="git4idea.merge.GitPullDialog/0.0.1920.1080@0.0.1920.1080" timestamp="1592881772478" />
<state x="385" y="196" width="670" height="676" key="search.everywhere.popup" timestamp="1587219643331">
<screen x="0" y="0" width="1440" height="900" />
</state>

@ -719,6 +719,10 @@ Kafka最初考虑的问题是customer应该从brokes拉取消息还是brokers
4. 进程间不会相互影响,一个线程挂掉将导致整个进程挂掉。
5. 系统在运行的时候会为每个进程分配不同的内存空间而对线程而言除了CPU外系统不会为线程分配内存线程所使用的资源来自其所属进程的资源线程组之间只能共享资源。
### 多线程和单线程
线程不是越多越好假如你的业务逻辑全部是计算型的CPU密集型,不涉及到IO并且只有一个核心。那肯定一个线程最好多一个线程就多一点线程切换的计算CPU不能完完全全的把计算能力放在业务计算上面线程越多就会造成CPU利用率用在业务计算的时间/总的时间下降。但是在WEB场景下业务并不是CPU密集型任务而是IO密集型的任务一个线程是不合适如果一个线程在等待数据时把CPU的计算能力交给其他线程这样也能充分的利用CPU资源。但是线程数量也要有个限度一般线程数有一个公式最佳启动线程数=[任务执行时间/(任务执行时间-IO等待时间)]*CPU内核数超过这个数量CPU要进行多余的线程切换从而浪费计算能力低于这个数量CPU要进行IO等待从而造成计算能力不饱和。总之就是要尽可能的榨取CPU的计算能力。如果你的CPU处于饱和状态并且没有多余的线程切换浪费那么此时就是你服务的完美状态如果再加大并发量势必会造成性能上的下降。
### 进程的组成部分
进程由进程控制块PCB、程序段、数据段三部分组成。

Loading…
Cancel
Save