mylinuxer

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2016年2月6日

摘要: enum { /* * Description of States: * * TCP_SYN_SENT sent a connection request, waiting for ack * * TCP_SYN_RECV received a connection request, sent ac 阅读全文
posted @ 2016-02-06 10:36 mylinuxer 阅读(1667) 评论(0) 推荐(0) 编辑

2016年2月5日

摘要: 使用多线程时,pthread_create的参数flag有CLONE_FILES, 最终调用do_fork(),并且会根据CLONE_FILES标志来调用copy_files()来共享父进程中的文件描述符(这里包括socketfd)。 使用多进程时,fork的参数flag没有CLONE_FILES, 阅读全文
posted @ 2016-02-05 17:11 mylinuxer 阅读(375) 评论(0) 推荐(0) 编辑

摘要: 第一题: //fork1.c #include <unistd.h> #include <stdio.h> int main(void) { int i = 0; for(i = 0; i < 3; i++) { pid_t fpid = fork(); if(fpid == 0) { printf 阅读全文
posted @ 2016-02-05 16:30 mylinuxer 阅读(296) 评论(0) 推荐(0) 编辑

2016年1月28日

摘要: 系统调用:如何中用户态切换到内核态 在linux中,系统调用是通过0x86体系结构中的软件中断实现的。这个软件中断与通常说的硬件中断不同之处在于,它是通过软件指令触发,而不是外部设备,这是程序员可以触发的一种异常,调用int 0x80汇编指令就可以产生向量号为128的异常。 进程与线程的区别与联系 阅读全文
posted @ 2016-01-28 14:36 mylinuxer 阅读(307) 评论(0) 推荐(0) 编辑

2016年1月26日

摘要: One of the features merged in the 3.9 development cycle was TCP and UDP support for the SO_REUSEPORTsocket option; that support was implemented in a s 阅读全文
posted @ 2016-01-26 09:59 mylinuxer 阅读(507) 评论(0) 推荐(0) 编辑

2016年1月22日

摘要: /* * TCP Westwood+: end-to-end bandwidth estimation for TCP * * Angelo Dell'Aera: author of the first version of TCP Westwood+ in Linux 2.4 * * Suppor 阅读全文
posted @ 2016-01-22 18:20 mylinuxer 阅读(1260) 评论(0) 推荐(0) 编辑

2016年1月20日

摘要: 1 /* 2 * TCP CUBIC: Binary Increase Congestion control for TCP v2.3 3 * Home page: 4 * http://netsrv.csc.ncsu.edu/twiki/bin/view/Main/BIC 5 * This is 阅读全文
posted @ 2016-01-20 18:13 mylinuxer 阅读(3277) 评论(0) 推荐(0) 编辑

摘要: 网卡只有rx硬中断,外设通过中断控制器向CPU发出有数据包来临的通知, 而没有tx硬中断,因为发送数据包是cpu向外设发出的命令。 ixgbe驱动的rx软中断和tx软中断在同一个CPU上处理。 http://abcdxyzk.github.io/blog/2014/12/16/kernel-net- 阅读全文
posted @ 2016-01-20 14:28 mylinuxer 阅读(1471) 评论(0) 推荐(0) 编辑

2016年1月15日

摘要: 今天,同事让我编译一个ssd内核模块 [root@localhost ssd]# rpmbuild --rebuild iomemory-vsl-3.2.11.1581-1.0.src.rpm error: Bad exit status from /var/tmp/rpm-tmp.a7xsw5 ( 阅读全文
posted @ 2016-01-15 18:16 mylinuxer 阅读(904) 评论(0) 推荐(0) 编辑

2016年1月6日

摘要: 一、安装valgrind 安装valgrind,正常的三部曲configure/make/make install就行。 二、memchk使用 1、执行命令 [root@10g-host4 tools]# valgrind --track-fds=yes --log-file=memchk-svr. 阅读全文
posted @ 2016-01-06 11:42 mylinuxer 阅读(408) 评论(0) 推荐(0) 编辑