avatar
v*F
1
1) On a traditonal UNIX system, how many times data is copied when system
read()s a file from disk and send()s it across the network?
2)Consider a singly linked list of the form
F -> A -> B -> C -> D ->E ::= | |
::= |
::= |
::= a|b|c|...|y|z
::= 0|1|2|...|9
Which of the following lexical entities can be derived from ? (Zero or more
answers may be correct.)
1. word
2. words
3. c22
4. 42
5. None of the above.
请解析一下你的答案。 谢谢大家
avatar
p*e
2
比赛结束了,这里是不是吵得更厉害了??
avatar
r*e
3
1)个人理解,Unix的memory space分为user space和kernel space
用户程序调用read()这个system call的时候,产生一个软中断
kernel的中断服务程序从设备读入数据到kernel space
然后调用 copy_to_user() 把数据copy到user space
同理,send()的本质和write()一样,先从user space复制到kernel space
然后再发送到network device
所以read()+send()至少要copy 4次
http://www.ibm.com/developerworks/linux/library/l-kernel-memory
http://www.makelinux.net/ldd3/chp-3-sect-7

more

【在 v******F 的大作中提到】
: 1) On a traditonal UNIX system, how many times data is copied when system
: read()s a file from disk and send()s it across the network?
: 2)Consider a singly linked list of the form
: F -> A -> B -> C -> D ->E ::= | |
: ::= |
: ::= |
: ::= a|b|c|...|y|z
: ::= 0|1|2|...|9
: Which of the following lexical entities can be derived from ? (Zero or more
: answers may be correct.)

avatar
v*F
4
光顾看答案,忘了说谢谢
有人可以帮帮忙第二题吗?
avatar
p*2
5

第二题没看明白

【在 v******F 的大作中提到】
: 光顾看答案,忘了说谢谢
: 有人可以帮帮忙第二题吗?

avatar
v*F
6
我也没读懂。。。有机会问问出题的,我也答案会POST在这里
谢谢
相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。