zyearn's recent timeline updates
zyearn's repos on GitHub
C · 852 watchers
zaver
Yet another fast and efficient HTTP server
C++ · 167 watchers
zhihuCrawler
event-driven crawler implemented by C++
C · 65 watchers
6.828-labs
my labs answer for https://pdos.csail.mit.edu/6.828/2014/
C · 16 watchers
csapp-lab-2e
Go · 11 watchers
eleme-hackathon
C · 8 watchers
6.828-hw
homework and exercise repo for 6.828(https://pdos.csail.mit.edu/6.828/2014/index.html)
Java · 8 watchers
algs4
exercise repo for http://algs4.cs.princeton.edu
C · 7 watchers
tbus
TeX · 7 watchers
TCNVMalloc
TCNVMalloc is an efficient wear-aware allocator for Non-Volatile Memory
JavaScript · 6 watchers
vsbnat
visit server behind NAT
Python · 4 watchers
easy-math-calculator
C++ · 3 watchers
brpc
Industrial-grade RPC framework used throughout Baidu, with 1,000,000+ instances and thousands kinds of services, called "baidu-rpc" inside Baidu.
Assembly · 3 watchers
csapp-lab-3e
C++ · 2 watchers
algo_training
C · 2 watchers
SmallC
yet another compiler for SmallC(a subset of C)
TeX · 1 watchers
bt
TeX · 1 watchers
cv
Matlab · 1 watchers
ml-ang
C · 1 watchers
proxylab
Multithread WebProxy with Cache
HTML · 1 watchers
zyearn.github.io
My blog
C++ · 0 watchers
braft
An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
0 watchers
codesnippet
JavaScript · 0 watchers
duoshuo--notification
CSS · 0 watchers
incubator-brpc-website
Apache brpc website
C · 0 watchers
libyaev
event loop based on epoll
Standard ML · 0 watchers
programming-languages
assignments for programming-languages in coursera
C · 0 watchers
RDMAemu
VimL · 0 watchers
vimrc
a simple working vimrc
zyearn

zyearn

V2EX member #64411, joined on 2014-06-07 11:49:37 +08:00
张江 近金科路/广兰路 朝南主卧出租
  •  1   
    上海  •  zyearn  •  Aug 30, 2018  •  Lastly replied by zyearn
    4
    Nginx 源码太难读?先来看看 Zaver 吧
  •  4   
    分享创造  •  zyearn  •  Mar 14, 2016  •  Lastly replied by zyearn
    7
    Linux 使用 buddy system 来管理物理内存的初衷是什么?
  •  3   
    Linux  •  zyearn  •  Feb 16, 2016  •  Lastly replied by adadada
    9
    zyearn's recent replies
    Feb 9, 2019
    Replied to a topic by SaintSeiya 程序员 感觉自己一直都在做没有意义的工作
    公司做的事就是提供人们想要的东西然后盈利,公司雇员都在打造这个“人们想要的东西”中充当一个角色,微观来看没有意义,更宏观来看可能不可或缺。另外每个人的贡献其实是广义上的贡献,比如清洁人员打扫了办公室,让大家更舒适地工作,从而更有效率,其实也是在帮助公司打造更好的产品(间接地)。
    Aug 30, 2018
    Replied to a topic by zyearn 上海 张江 近金科路/广兰路 朝南主卧出租
    持续出租中
    求问申城佳苑早上晚上有班车来回百度吗
    zhujiashun2010 at gmail
    谢谢~
    Mar 14, 2016
    Replied to a topic by zyearn 分享创造 Nginx 源码太难读?先来看看 Zaver 吧
    @jedihy @dcoder thks :)
    Mar 12, 2016
    Replied to a topic by zyearn 分享创造 Nginx 源码太难读?先来看看 Zaver 吧
    @qgy18 @Jaylee 如果对 zaver 的编程模型和架构是怎么一步一步构建起来有兴趣,可以看看我的博文: http://lifeofzjs.com/blog/2015/05/16/how-to-write-a-server/,有问题讨论可以在下面留言,我会及时回复:)
    @Andiry 谢谢提醒,稍微一想发现,因为多级页表的存在,所以只要复制第一级 table 中 kernel 范围内的指针,就可以实现 kernel page table 共享了。
    @adadada 写得很好,瞬间想清楚了很多,谢谢。有一个问题:“ leave kernel paging tables unchanged ” 这个动作是不是一个几乎必须的操作?否则的话需要修改所有进程的 kernel page table 了,开销太大了。
    @bengol 感谢回复,特地去看了下 ULK 的相关章节,作者总结了 3 个主要原因:

    1. 有些时候连续物理页是必要的,比如 DMA

    2. Even if contiguous page frame allocation is not strictly necessary, it offers the big advantage of leaving the kernel paging tables unchanged. What ’ s wrong with modifying the Page Tables? As we know from Chapter 2, frequent Page Table modifications lead to higher average memory access times, because they make the CPU flush the contents of the translation lookaside buffers.

    3. 实现 hugepage ,减少了 TLB 表项从而降低 miss rate

    其中第二点不是看得很懂,为什么会使 kernel paging tables unchanged ?和你说的 2 是一个意思吗?

    @Andiry 感谢回复

    请问你的说 2 指的是 hugepage 吗?只有 hugepage 才会减少页表 /页目录项数

    另外, xv6 里面的链表里指针指向的 object 都是一个 4k 的页,并且这个指针存在空闲页的开头 8bytes ,所以没有额外的空间复杂度;分配的时间复杂度也是 O(1),因为直接从链表头拿了。反而 buddy system 的 overhead 比链表高不少,因为它有频繁的合并和分裂内存的操作。所以链表的缺点就是没法分配连续的物理页面了,然后 buddy 就是对它的改进,是这样的吧
    vnc 解决不了吧?用户又不可能去配置路由器,做不了端口映射,所以如果两边都是 symmetric NAT ,只能通过中转服务器来通信或者端口预测,其它类型的 NAT 可以通过打洞的方式来实现直接通信
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5843 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 18ms · UTC 03:27 · PVG 11:27 · LAX 20:27 · JFK 23:27
    ♥ Do have faith in what you're doing.