Chinaunix首页 | 论坛 | 博客
  • 博客访问: 728442
  • 博文数量: 130
  • 博客积分: 10
  • 博客等级: 民兵
  • 技术积分: 2198
  • 用 户 组: 普通用户
  • 注册时间: 2011-11-29 12:48
个人简介

每一个“丑得人神共愤”的泡妞高 手都有一颗坚忍的心,这证明了人类 在绝境中毫不妥协的求生精神,反正丑都丑了,索性放开手脚大干一场,这就叫“无产阶级失去的是锁链,得到的是全世界”

文章分类

全部博文(130)

文章存档

2013年(130)

我的朋友

分类: LINUX

2013-09-23 16:33:10

It's usually in this order:

  • NIC hardware gets the electrical signal, hardware updates some of its registers and buffers, which are usually mapped into computer physical memory
  • Hardware activates the IRQ line
  • Kernel traps into interrupt-handling routine and invokes the driver IRQ handling function
  • The driver figures out whether this is for RX or TX
  • For RX the driver sets up DMA from NIC hardware buffers into kernel memory reserved for network buffers
  • The driver notifies upper-layer kernel network stack that input is available
  • Network stack input routine figures out the protocol, optionally does filtering, and whether it has an application interested in this input, and if so, buffers packet for application processing, and if a process is blocked waiting on the input the kernel marks it as runnable
  • At some point kernel scheduler puts that process on a CPU and resumes is, application consumes network input

Then there are deviations from this model, but those are special cases for particular hardware/OS. One vendor that does user-land-direct-to-hardware stuff is , there are others.

阅读(1831) | 评论(0) | 转发(0) |
0

上一篇:git使用技巧

下一篇:Cross debugging with GDB

给主人留下些什么吧!~~