<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>网络 on 不会跑</title>
    <link>https://buhuipao.github.io/categories/%E7%BD%91%E7%BB%9C/</link>
    <description>Recent content in 网络 on 不会跑</description>
    <generator>Hugo</generator>
    <language>zh-CN</language>
    <lastBuildDate>Thu, 22 Jun 2017 03:27:52 +0000</lastBuildDate>
    <atom:link href="https://buhuipao.github.io/categories/%E7%BD%91%E7%BB%9C/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>LeetCode-minimum_path_sum</title>
      <link>https://buhuipao.github.io/2017/06/22/leetcode-minimum_path_sum/</link>
      <pubDate>Thu, 22 Jun 2017 03:27:52 +0000</pubDate>
      <guid>https://buhuipao.github.io/2017/06/22/leetcode-minimum_path_sum/</guid>
      <description>&lt;p&gt;经典的动态规划题，三种解法都是动态规划，但是最后一种空间复杂度最小，原题链接：&lt;/p&gt;&#xA;&lt;p&gt;&lt;a href=&#34;https://leetcode.com/problems/minimum-path-sum/&#34;&gt;https://leetcode.com/problems/minimum-path-sum/&lt;/a&gt;&lt;/p&gt;&#xA;&lt;p&gt;Given a m x n grid filled with non-negative numbers,&lt;/p&gt;&#xA;&lt;p&gt;find a path from top left to bottom right which minimizes the sum of all numbers along its path.&lt;/p&gt;&#xA;&lt;p&gt;Note: You can only move either down or right at any point in time.&lt;/p&gt;</description>
    </item>
    <item>
      <title>TCP的滑动窗口和拥塞控制</title>
      <link>https://buhuipao.github.io/2016/10/09/tcp-window_control/</link>
      <pubDate>Sun, 09 Oct 2016 10:32:23 +0000</pubDate>
      <guid>https://buhuipao.github.io/2016/10/09/tcp-window_control/</guid>
      <description>&lt;p&gt;TCP协议作为一个可靠的面向流的传输协议，其可靠性和流量控制由滑动窗口协议保证，而拥塞控制则由控制窗口结合一系列的控制算法实现。&lt;/p&gt;&#xA;&lt;p&gt;一.滑动窗口&lt;/p&gt;&#xA;&lt;p&gt;所谓滑动窗口:发送窗口中相关的有四个概念：已发送并收到确认的数据（不再发送窗口和发送缓冲区之内）、已发送但未收到确认的数据（位于发送窗口之中）、允许发送但尚未发送的数据以及发送窗口外发送缓冲区内暂时不允许发送的数据；每次成功发送数据之后，发送窗口就会在发送缓冲区中按顺序移动，将新的数据包含到窗口中准备发送；&lt;/p&gt;</description>
    </item>
    <item>
      <title>关于fork和操作系统一些知识</title>
      <link>https://buhuipao.github.io/2016/09/16/fork-system-status-route/</link>
      <pubDate>Fri, 16 Sep 2016 11:16:48 +0000</pubDate>
      <guid>https://buhuipao.github.io/2016/09/16/fork-system-status-route/</guid>
      <description>&lt;ul&gt;&#xA;&lt;li&gt;A: &lt;a href=&#34;http://www.nowcoder.com/test/question/done?tid=5114409&amp;amp;qid=26082#summary&#34;&gt;牛客网&lt;/a&gt;刷计算操作系统的题，遇到一个一直很模糊的题，所以记录下来。&lt;/li&gt;&#xA;&lt;/ul&gt;&#xA;&lt;p&gt;题目是：&lt;/p&gt;&#xA;&lt;div class=&#34;highlight&#34;&gt;&lt;pre tabindex=&#34;0&#34; class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-python&#34; data-lang=&#34;python&#34;&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;n&#34;&gt;main&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;{&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt; &lt;span class=&#34;n&#34;&gt;fork&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;||&lt;/span&gt; &lt;span class=&#34;n&#34;&gt;fork&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;()&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;span class=&#34;line&#34;&gt;&lt;span class=&#34;cl&#34;&gt;&lt;span class=&#34;p&#34;&gt;}&lt;/span&gt;&#xA;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;共创建了（３）个进程&lt;/p&gt;&#xA;&lt;p&gt;解释是：&lt;/p&gt;&#xA;&lt;p&gt;fork()给子进程返回一个零值，而给父进程返回一个子进车id；在main这个主进程中，首先执行 &lt;u&gt;fork()&lt;/u&gt; || fork(), 左边的fork()返回一个非零值，根据**||的短路原则**，前面的表达式为真时，后面的表达式不执行，故包含main的这个主进程创建了一个子进程，由于子进程会复制父进程，而且子进程会根据其返回值继续执行，就是说，在子进程中， &lt;u&gt;fork()&lt;/u&gt; ||fork()这条语句左边表达式的返回值是0, 所以||右边的表达式要执行，这时在子进程中又创建了一个进程，即main进程-&amp;gt;子进程-&amp;gt;子进程，一共创建了3个进程。&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
