`

TCP/IP的三种process model

阅读更多

TCP/IP协议栈的process model一般有几种方式.

1. TCP/IP协议的每一层是个独立进程.链路层是个进程,ip层是个进程,tcp层是个进程.这样的好处是网络协
议的每一层都非常清晰,代码的调试和理解都非常容易.不过最大的坏处数据跨层传递时会引起上下文转换(context switch)。对于接收一个TCP segment要引起3次context switch(从网卡驱动程式到链路层进程,从链路层进程到ip层进程,从ip层进程到TCP进程)。通常对于操作系统来说,任务转换是要浪费时间的.过频的context swich是不可取的.

2. 另外一种方式是TCP/IP协议栈在操作系统内核当中.应用程式通过操作系统的系统调用(system call)和协议栈来进行通讯. 这样TCP/IP的协议栈就限定于特定的操作系统内核了.如windows就是这种方式.

3. LwIP的process model:所有TCP/IP协议栈都在一个进程当中,这样tcp/ip协议栈就和操作系统内核分开了.而应用层程式既能是独立的进程也能驻留在TCP/IP进程中.如果应用程式是独立的进程能通过操作系统的邮箱,消息队列等和TCP/IP进程进行通讯.如果应用层程式驻留TCP/IP进程中,那应用层程式就利用内部回调函数口(Raw API)和TCP/IP协议栈通讯.对于uc/os来说进程就是个系统任务

 

分享到:
评论

相关推荐

    uIP:一种用在8位嵌入式系统中的轻量级的TCP/IP协议栈

    UIP(User Interface Process Application Block)是微软社区开发的众多Application Block中的其中之一,它... uIP:一种用在8位嵌入式系统中的轻量级的TCP/IP协议栈,仅需很少的ROM和几百B的RAM,很适合嵌入式系统应用。

    IFIX驱动列表_GOOD

    RNI 3/29/2002 Fisher Rosemont RS/3 RNI TCP/IP Driver RT5 6/10/2002 ABB Spider RP570 & 571 Serial Event Recording S7A 4/30/2002 Siemens S7 TCP/IP S7B 6/3/2002 Siemens S7 MPI serial S7M 3/29/2002 ...

    The Linux Programming Interface

    Chapter 58: Sockets: Fundamentals of TCP/IP Networks Chapter 59: Sockets: Internet Domains Chapter 60: Sockets: Server Design Chapter 61: Sockets: Advanced Topics Chapter 62: Terminals Chapter 63: ...

    semi标准合集.pdf

    − E37:基于TCP/IP,代替E4 − E40:特定物料加工配方程序,定义行为标准 − E116:跟踪设备的状态与性能,提供诊断功能 − E84:物料运输的晶圆传送标准(通过AMHS),并行IO硬件通信接口 − E87:协调carrier进出...

    Cisco Press - OSPF Network Design Solutions, 2nd Edition

    TCP/IP Protocol Suite 14 TCP/IP Functions 15 TCP Overview 15 IP Overview 16 Types of Network Topologies 16 Local-Area Networks 16 Wide-Area Networks 17 IP Addressing 21 Class A Addresses 22 Class B ...

    a project model for the FreeBSD Project.7z

    this document will outline the organisational structure (including role descriptions and communication lines), discuss the methodology model and after presenting the tools used for process control, ...

    C#浏览器编程,学习使用

    using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Windows.Forms; using System.IO; using System.Threading; using mshtml; using System.Net; using ...

    UNIX Network Programming Volume 1, Third Edition (Unix网络编程卷1第3版英文版)

    Part 1: Introduction and TCP/IP Chapter 1. Introduction Section 1.1. Introduction Section 1.2. A Simple Daytime Client Section 1.3. Protocol Independence Section 1.4. Error Handling: ...

    网络协议攻击

    particular focus on TCP/IP, which forms the basis of application-level network protocols. Subsequent chapters assume that you have a good grasp of the network basics. This chapter also introduces the ...

    CISCO 技术大集合

    三、设置对话过程 1. 显示提示信息 2. 全局参数的设置 3. 接口参数的设置 4. 显示结果 利用设置对话过程可以避免手工输入命令的烦琐,但它还不能完全代替手工设置,一些特殊的设置还必须通过手工输入的方式完成。 ...

    Internetworking IPv6 with Cisco Routers

    Routing Header, Fragment Header, The fragmentation process, Destination Options Header, Security Header, Size of IPv6 packets. Chapter 4: IPv6 Addresses The addressing space, Syntax of IPv6 ...

    Designing a Wireless network

    Unlicensed Transmitters 66 Summary 68 Solutions Fast Track 69 Frequently Asked Questions 71 Chapter 3 TCP/IP and the OSI Model 73 Learn to Configure Introduction 74 and ...

    BURNINTEST--硬件检测工具

    - A network connection and the TCP/IP networking software installed for the Network Tests Pro version only: - A serial port loop back plug for the serial port test. - A parallel port loop back plug...

    python3.6.5参考手册 chm

    Changes to the Development Process New Issue Tracker: Roundup New Documentation Format: reStructuredText Using Sphinx PEP 343: The ‘with’ statement Writing Context Managers The contextlib module ...

    pro_apache_third_edition..pdf

    The TCP/IP Network Model.............................................................................16 Non-IP Protocols...................................................................................

    Advanced Linux 3D graphics programming

    The Five-Step Process of l3d Programs............................13 Overview of l3d Classes .....................................19 Applications and Events....................................19 2D ...

Global site tag (gtag.js) - Google Analytics