<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	「Easton Man&#039;s Blog」的评论	</title>
	<atom:link href="https://blog.eastonman.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.eastonman.com</link>
	<description>临渊羡鱼，不如退而结网</description>
	<lastBuildDate>Wed, 23 Apr 2025 11:36:46 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.5</generator>
	<item>
		<title>
		🦩 对《 现代分支预测：从学术界到工业界 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2023/12/modern-branch-prediction-from-academy-to-industry/#comment-2621</link>

		<dc:creator><![CDATA[🦩]]></dc:creator>
		<pubDate>Wed, 23 Apr 2025 11:36:46 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=1282#comment-2621</guid>

					<description><![CDATA[写的真的很好，加上这么有品味的blog页面，很赞]]></description>
			<content:encoded><![CDATA[<p>写的真的很好，加上这么有品味的blog页面，很赞</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Johnny 对《 现代处理器结构 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2021/05/modern-processor/#comment-2587</link>

		<dc:creator><![CDATA[Johnny]]></dc:creator>
		<pubDate>Mon, 24 Mar 2025 08:51:38 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=639#comment-2587</guid>

					<description><![CDATA[文章的质量很高，点个赞<img src="https://s.w.org/images/core/emoji/16.0.1/72x72/1f44d.png" alt="👍" class="wp-smiley" style="height: 1em; max-height: 1em;" />]]></description>
			<content:encoded><![CDATA[<p>文章的质量很高，点个赞👍</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		hey 对《 xv6操作系统实验 &#8211; 质数筛 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-2450</link>

		<dc:creator><![CDATA[hey]]></dc:creator>
		<pubDate>Thu, 31 Oct 2024 11:27:27 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=254#comment-2450</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-2429&quot;&gt;kigncanfish&lt;/a&gt;。

大佬救我狗命，终于解决问题了]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-2429">kigncanfish</a>。</p>
<p>大佬救我狗命，终于解决问题了</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		kigncanfish 对《 xv6操作系统实验 &#8211; 质数筛 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-2429</link>

		<dc:creator><![CDATA[kigncanfish]]></dc:creator>
		<pubDate>Wed, 18 Sep 2024 09:38:59 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=254#comment-2429</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-1228&quot;&gt;shioramen&lt;/a&gt;。

你把递归调用创建新的子进程改成循环迭代就行了，占用资源更少
#include &quot;kernel/types.h&quot;
#include &quot;kernel/stat.h&quot;
#include &quot;user/user.h&quot;

#define MAX 280
#define FIRST_PRIME 2

int generate_natural();  // -&#062; out_fd
int prime_filter(int in_fd, int prime);  // -&#062; out_fd

int
main(int argc, char *argv[])
{
	int prime; 
	
	int in = generate_natural();
	while (read(in, &#038;prime, sizeof(int))) {
		// printf(&quot;prime %d: in_fd: %d\n&quot;, prime, in);  // debug
		printf(&quot;prime %d\n&quot;, prime); 
		in = prime_filter(in, prime);
	}

	exit(0);
}

// 生成自然数: 2, 3, 4, ..&#060; MAX
int
generate_natural() {
	int out_pipe[2];
	
	pipe(out_pipe);

	if (!fork()) {
		for (int i = FIRST_PRIME; i &#060; MAX; i++) {
			write(out_pipe[1], &#038;i, sizeof(int));
		}
		close(out_pipe[1]);

		exit(0);
	}

	close(out_pipe[1]);

	return out_pipe[0];
}

// 素数筛
int 
prime_filter(int in_fd, int prime) 
{
	int num;
	int out_pipe[2];

	pipe(out_pipe);

	if (!fork()) {
		while (read(in_fd, &#038;num, sizeof(int))) {
			if (num % prime) {
				write(out_pipe[1], &#038;num, sizeof(int));
			}
		}
		close(in_fd);
		close(out_pipe[1]);
		
		exit(0);
	}

	close(in_fd);
	close(out_pipe[1]);

	return out_pipe[0];
}]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-1228">shioramen</a>。</p>
<p>你把递归调用创建新的子进程改成循环迭代就行了，占用资源更少<br />
#include &#8220;kernel/types.h&#8221;<br />
#include &#8220;kernel/stat.h&#8221;<br />
#include &#8220;user/user.h&#8221;</p>
<p>#define MAX 280<br />
#define FIRST_PRIME 2</p>
<p>int generate_natural();  // -&gt; out_fd<br />
int prime_filter(int in_fd, int prime);  // -&gt; out_fd</p>
<p>int<br />
main(int argc, char *argv[])<br />
{<br />
	int prime; </p>
<p>	int in = generate_natural();<br />
	while (read(in, &amp;prime, sizeof(int))) {<br />
		// printf(&#8220;prime %d: in_fd: %d\n&#8221;, prime, in);  // debug<br />
		printf(&#8220;prime %d\n&#8221;, prime);<br />
		in = prime_filter(in, prime);<br />
	}</p>
<p>	exit(0);<br />
}</p>
<p>// 生成自然数: 2, 3, 4, ..&lt; MAX<br />
int<br />
generate_natural() {<br />
	int out_pipe[2];</p>
<p>	pipe(out_pipe);</p>
<p>	if (!fork()) {<br />
		for (int i = FIRST_PRIME; i &lt; MAX; i++) {<br />
			write(out_pipe[1], &amp;i, sizeof(int));<br />
		}<br />
		close(out_pipe[1]);</p>
<p>		exit(0);<br />
	}</p>
<p>	close(out_pipe[1]);</p>
<p>	return out_pipe[0];<br />
}</p>
<p>// 素数筛<br />
int<br />
prime_filter(int in_fd, int prime)<br />
{<br />
	int num;<br />
	int out_pipe[2];</p>
<p>	pipe(out_pipe);</p>
<p>	if (!fork()) {<br />
		while (read(in_fd, &amp;num, sizeof(int))) {<br />
			if (num % prime) {<br />
				write(out_pipe[1], &amp;num, sizeof(int));<br />
			}<br />
		}<br />
		close(in_fd);<br />
		close(out_pipe[1]);</p>
<p>		exit(0);<br />
	}</p>
<p>	close(in_fd);<br />
	close(out_pipe[1]);</p>
<p>	return out_pipe[0];<br />
}</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		E_RAzor 对《 xv6操作系统实验 &#8211; 质数筛 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-2400</link>

		<dc:creator><![CDATA[E_RAzor]]></dc:creator>
		<pubDate>Wed, 31 Jul 2024 08:19:20 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=254#comment-2400</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-1228&quot;&gt;shioramen&lt;/a&gt;。

MIT 6.S081课程的Lab文档中提到，xv6的文件描述符和进程数都有限制，因此建议只处理到35，可能是这个原因导致的乱码。
https://pdos.csail.mit.edu/6.828/2021/labs/util.html]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-1228">shioramen</a>。</p>
<p>MIT 6.S081课程的Lab文档中提到，xv6的文件描述符和进程数都有限制，因此建议只处理到35，可能是这个原因导致的乱码。<br />
<a href="https://pdos.csail.mit.edu/6.828/2021/labs/util.html" rel="nofollow ugc">https://pdos.csail.mit.edu/6.828/2021/labs/util.html</a></p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		Logiase 对《 现代处理器结构 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2021/05/modern-processor/#comment-2393</link>

		<dc:creator><![CDATA[Logiase]]></dc:creator>
		<pubDate>Fri, 19 Jul 2024 04:06:48 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=639#comment-2393</guid>

					<description><![CDATA[TQL]]></description>
			<content:encoded><![CDATA[<p>TQL</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		qyl 对《 最优停止理论与导师选择 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2021/12/optimal-stop/#comment-2161</link>

		<dc:creator><![CDATA[qyl]]></dc:creator>
		<pubDate>Thu, 11 Apr 2024 08:41:16 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=936#comment-2161</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://blog.eastonman.com/blog/2021/12/optimal-stop/#comment-1031&quot;&gt;qyl&lt;/a&gt;。

没事了，我想明白了。作者有点跳步，多想想就懂了。]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://blog.eastonman.com/blog/2021/12/optimal-stop/#comment-1031">qyl</a>。</p>
<p>没事了，我想明白了。作者有点跳步，多想想就懂了。</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		qyl 对《 最优停止理论与导师选择 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2021/12/optimal-stop/#comment-2160</link>

		<dc:creator><![CDATA[qyl]]></dc:creator>
		<pubDate>Thu, 11 Apr 2024 08:08:18 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=936#comment-2160</guid>

					<description><![CDATA[回复给 &lt;a href=&quot;https://blog.eastonman.com/blog/2021/12/optimal-stop/#comment-1031&quot;&gt;qyl&lt;/a&gt;。

你看懂了吗？P_2和P_1分别是怎么计算得到的？]]></description>
			<content:encoded><![CDATA[<p>回复给 <a href="https://blog.eastonman.com/blog/2021/12/optimal-stop/#comment-1031">qyl</a>。</p>
<p>你看懂了吗？P_2和P_1分别是怎么计算得到的？</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		ccbbp 对《 HotChips 2023: Ventana 不寻常的 Veyron V1 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2024/02/hot-chips-2023-ventanas-unconventional-veyron-v1/#comment-2153</link>

		<dc:creator><![CDATA[ccbbp]]></dc:creator>
		<pubDate>Thu, 29 Feb 2024 08:16:53 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=1454#comment-2153</guid>

					<description><![CDATA[路过，膜拜下大佬哦]]></description>
			<content:encoded><![CDATA[<p>路过，膜拜下大佬哦</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		shioramen 对《 xv6操作系统实验 &#8211; 质数筛 》的评论		</title>
		<link>https://blog.eastonman.com/blog/2020/11/xv6-primes/#comment-1228</link>

		<dc:creator><![CDATA[shioramen]]></dc:creator>
		<pubDate>Mon, 02 Oct 2023 01:05:23 +0000</pubDate>
		<guid isPermaLink="false">https://blog.eastonman.com/?p=254#comment-1228</guid>

					<description><![CDATA[我最近也在做这个lab，这个地方如果把素数的上界改成100的话，会出现下面这种奇怪的结果，没有输出37以后的素数，然后输出了一段乱码，不知道是什么问题。

$ primes
prime 2
prime 3
prime 5
prime 7
prime 11
prime 13
prime 17
prime 19
prime 23
prime 29
prime 31
prime 37
)+/5;=CGIOSYaaaaaaaaaaa$]]></description>
			<content:encoded><![CDATA[<p>我最近也在做这个lab，这个地方如果把素数的上界改成100的话，会出现下面这种奇怪的结果，没有输出37以后的素数，然后输出了一段乱码，不知道是什么问题。</p>
<p>$ primes<br />
prime 2<br />
prime 3<br />
prime 5<br />
prime 7<br />
prime 11<br />
prime 13<br />
prime 17<br />
prime 19<br />
prime 23<br />
prime 29<br />
prime 31<br />
prime 37<br />
)+/5;=CGIOSYaaaaaaaaaaa$</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
