• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
返回主页

史莱姆

路漫漫其修远兮,吾将上下而求索。

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

Shared-memory & Message Queue

Shared-memory blocks are perhaps the fastest IPC mechanism, especially for transferring large structures between processes. However, they require careful synchronization, or subtle bugs can occur in complex programs or systems. Message queues are quite useful for one-way communications between a server (say a display process) and a number of clients (data-collection processes, for example). But the practical size of queue messages may be limited (particularly on AIX) to small chunks of information.

---------------------------------------------------------------------------------------------

boost library

 

shared memory,

first time copy (500bytes), 9 uS;

non-first time copy, 1~2 uS;

 

message queue

copy(500bytes), 4~5 uS

posted @ 2010-09-24 05:20  史莱姆  阅读(454)  评论(0)    收藏  举报
刷新页面返回顶部

公告

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3