`
iunknown
  • 浏览: 409567 次
社区版块
存档分类
最新评论

[zz]Emulate event driven i/o by IOCP

阅读更多
原文

It may be possible to use IOCompletionPorts on Windows to implement apr_pollset_*.  IOCPs
aare very scalable
but moving to IOCPs will require a complete rewrite of the apr_socket implementation on Windows.
And there is
the small matter of a simple technical issue that needs to be investigated...

IOCPs support true async network i/o. BSD KQ, Solaris /dev/poll, epoll et. al. are not async,
they are event
driven i/o models. When you issue an async read on Windows, the kernel will start filling
your i/o buffer as
soon as data is available. With event driven i/o, the kernel tells you when you can do a read()
and expect to
receive data. See the difference? Your buffer management strategy will be completely different
between async
i/o and event driven i/o and I am not sure how APR (or applications that use APR) can be made
to support both
cleanly. So back to the small technial issue that needs to be investigated...

I believe (but have not verified) that it is possible to use IOCPs to emulate event-driven
network i/o. When
you make read or write calls for which you want to emulate event driven i/o, pass in a 0 length
buffer (ie,
you can manage your i/o buffers using event driven semantics).  So if you issue a read passing
in a 0 length
buffer, your IOCP will get notified when there is data to read. I think :-)

Assuming the above technique works reliably, we still need to figure out how to optimize the
i/o. In general,
if there is data to read or write, synchronous calls are more efficient (if there is data
to read, then just
read it rather than telling the kernel to tell you via a notification method that there is
data to read. How
do you do that on Windows if you want to emulate event driven i/o?
分享到:
评论

相关推荐

    Emulate5000仿真模拟教材

    2. 创建项目:在Emulate5000中,用户需要新建一个项目,指定SLC5000的类型、CPU型号以及所需的I/O模块。 3. 编程:导入或编写Ladder Logic程序,然后将其下载到仿真环境中。 4. 设置输入/输出:根据实际应用配置输入...

    Emulate5000仿真模拟教材_ab_

    3. **Emulate5000软件**:熟悉软件界面和功能,包括如何创建新项目、导入程序、设置I/O映射、模拟输入输出等。 4. **PLC编程基础**:学习基本的编程指令,如定时器、计数器、比较、逻辑运算等,以及如何组织和调试...

    rslogix emulate 500

    - **新建工程**:启动软件后,创建一个新的工程,选择相应的PLC型号和I/O配置。 - **导入或编写程序**:用户可以导入已有的Ladder Logic程序,或者直接在软件的图形界面中编写新的程序。 - **设置模拟环境**:根据...

    RS Logix5000入门适用教程

    8. **I/O强制与故障处理**:演示如何强制I/O信号和处理控制器故障。 9. **仿真控制**:引导如何使用RSLogix Emulate5000软件进行仿真。 #### 三、详细步骤解析 ##### 1. 创建新工程 - 打开RS Logix5000软件。 - ...

    Android存储路径

    在Android系统中,存储路径是开发者管理应用数据和资源的关键组成部分。不同的Android版本可能存在不同的存储方式,这使得理解和掌握各种存储路径变得尤为重要。本篇文章将深入探讨Android存储路径的多种类型及其在...

    Emulate5000应用之二(logix5000仿真软件)

    Emulate5000应用之二(logix5000仿真软件) Emulate5000应用之二(logix5000仿真软件)

    Bochs2.3 pre 3

    It includes emulation of the Intel x86 CPU, common I/O devices, and a custom BIOS. Currently, Bochs can be compiled to emulate a 386, 486, Pentium, Pentium Pro or x86-64 CPU, including ...

    打狗棒-加密狗复制

    CANE -----Emulate the softdog CANE /Axxx -----Analyse the softdog,xxx=extend mem kept CANE /R -----Read the softdog file CANE /W -----Write the softdog file CANE /U -----Free memory and to dos ...

    emulate5000使用录像

    emulate5000使用录像,资源共享,共同学习进步!

    java版商城源码下载-HotCodeTest:hotcode热更新学习

    emulate//chrome浏览器运行,前提安装了ripple-emulate cordova run android//platforms安装了android cordova run ios//platforms安装了ios 背景 现在很多应用和游戏都使用热更新功能,常见的热更新

    RSLogix_Emulate500使用教程

    RSLogix_Emulate500使用教程

    cordova-electron

    bin/create bin/update bin/check_reqs bin/templates/scripts/cordova/build bin/templates/scripts/cordova/clean bin/templates/scripts/cordova/log bin/templates/scripts/cordova/emulate bin/templates/...

    Emulate5000仿真模拟教材.ppt

    Emulate5000仿真模拟教材ppt,Emulate5000仿真模拟教材

    Python库 | iotile_emulate-0.5.0-py3-none-any.whl

    资源分类:Python库 所属语言:Python 资源全名:iotile_emulate-0.5.0-py3-none-any.whl 资源来源:官方 安装方法:https://lanzao.blog.csdn.net/article/details/101784059

    AB_Emulate_5000_使用方法.pdf

    RSlogix Emulate 5000软件是Rockwell AB公司提供用来仿真运行PLC的程序,通过它可以在计算机上虚拟AB PLC的连接、烧写、运行操作,就像实际操作PLC一样。本文介绍RSlogix Emulate 5000软件的安装和使用方法。

    RSLogixEmulate500 V6.0

    4. **模拟输入/输出**:软件可以模拟各种输入和输出信号,使得用户能够测试不同的I/O配置,确保在真实环境下设备的正确响应。 5. **实时监控**:用户可以实时查看程序状态和变量变化,便于分析和理解程序运行情况。...

    Emulate仿真模拟教材PPT学习教案.pptx

    Emulate仿真模拟教材PPT学习教案 Emulate仿真模拟教材PPT学习教案是关于RSLogix Emulate 5000 Logix5000处理器模拟软件的学习教案。该教案主要介绍了Emulate 5000的基础知识和应用场景,并提供了详细的操作步骤和...

    AB实验教程-5000软件应用

    RSLogix 5000软件应用教程为用户提供了创建和管理工程项目的详细指南,包括控制器属性设置、I/O模块配置、数据组织、任务管理、梯形图逻辑编辑、通讯组态、工程的上载下载、在线程序修改、在线强制I/O操作、控制器...

    BUS Hound

    98, Me, NT 4.0, 2000, 2003, XP and XP Embedded  Capture megabytes of I/O limited only by available memory  Automatically stop the capture upon a trigger condition  Measure individual ...

Global site tag (gtag.js) - Google Analytics