Hello,

Hi everyone,

I have a simple question. Could anyone explain to me the difference between Mailboxes and Shared Memory?

A “Shared memory” (shm) is some portion of memory that you can share between process and threads. Like a malloc, you have a fixed size memory area, and you can do nearly what you want with. (Reading of writing)

A Mailbox is more like a pipe. You push data (messages) on the pipe of indeterminate size (the mailbox as a fixed size that you can store multiples messages, but not exceeding the size of the mailbox)

Classic mailboxes are “One consumer multiple producers” but some types of mailbox allow to have multiple consumers (but I not sure this is a good idea) and you can put priority on messages with some other sort of mailboxes. You have too the ability to suspend a task (thread or process) on reading a mailbox, allowing it to wait for a new message.

Am I right, that both are possibilities for two or more tasks to exchange data?

Yes but not is the same way (as explained above.) The use of each depends on what you want to do.

If it for sharing global variables, shm is, as for me, the better way, if it for send private data, or give orders, Mailbox (or pipe) are the better.

Will a message send to a mailbox still be in the mailbox after another task read it?

No

Greetings from Germany,

Martin

Greetings from South of France, and have a good day playing with IPC :)

Manoel

【DSP开发】shared memory VS mailbox的更多相关文章

  1. 【并行计算-CUDA开发】关于共享内存(shared memory)和存储体(bank)的事实和疑惑

    关于共享内存(shared memory)和存储体(bank)的事实和疑惑 主要是在研究访问共享内存会产生bank conflict时,自己产生的疑惑.对于这点疑惑,网上都没有相关描述, 不管是国内还 ...

  2. 【并行计算-CUDA开发】CUDA shared memory bank 冲突

    CUDA SHARED MEMORY shared memory在之前的博文有些介绍,这部分会专门讲解其内容.在global Memory部分,数据对齐和连续是很重要的话题,当使用L1的时候,对齐问题 ...

  3. 【并行计算-CUDA开发】CUDA bank conflict in shared memory

    http://hi.baidu.com/pengkuny/item/c8070b388d75d481b611db7a 以前以为 shared memory 是一个万能的 L1 cache,速度很快,只 ...

  4. DSP开发资源总结,经典书籍,论坛

    OMAP4开发资源总结: 一.TI OMAP4官网介绍: http://www.ti.com.cn/general/cn/docs/wtbu/wtbuproductcontent.tsp?templa ...

  5. Davinci DM6446开发攻略——DSP开发工程建立

    前段时间一直忙一个项目,同时在生活上时时提防和抵抗中国地沟油.国外核心转基因调和油.大豆油.色拉油.大米玉米.可怕的喂药鱼.药水泡农药喷无虫咬的青菜,所以没时间打理自己的博客,让开发攻略停顿了一段时间 ...

  6. 【DSP开发】帮您快速入门 TI 的 Codec Engine

    德州仪器半导体技术(上海)有限公司 通用DSP 技术应用工程师 崔晶 德州仪器(TI)的第一颗达芬奇(DaVinci)芯片(处理器)DM6446已经问世快三年了.继DM644x之后,TI又陆续推出了D ...

  7. 【DSP开发】gel文件编写

    以下转载自:http://blog.csdn.net/henhen2002/article/details/4573447 GEL--通用扩展语言,无类型语言,只有int类型,当CCS运行时首先执行这 ...

  8. 【DSP开发】【并行计算-CUDA开发】TI OpenCL v01.01.xx

    TI OpenCL v01.01.xx TI OpenCL™ Runtime Documentation Contents: Introduction OpenCL 1.1 Reference Mat ...

  9. 【DSP开发】【Linux开发】基于ARM+DSP进行应用开发

    针对当前应用的复杂性,SOC芯片更好能能满足应用和媒体的需求,集成众多接口,用ARM做为应用处理器进行多样化的应用开发和用户界面和接口,利用DSP进行算法加速,特别是媒体的编解码算法加速,既能够保持算 ...

随机推荐

  1. Javascript引擎

    注入了 浏览器对象模型BOM, 文档对象模型DOM

  2. 什么叫AOP(面向切面编程)?

    spring的AOP面向切面编程,实现在不改变代码的情况下完成对方法的增强.比较常用的就是spring的声明式事务管理,底层通过AOP实现,避免了我们每次都要手动开启事物,提交事务的重复性代码,使得开 ...

  3. C++使用 new 声明动态数组

    int main() { using namespace std; int* p = new int[3]; // new运算符返回第一个元素的地址. p[0] = 10; p[1] = 9; p[2 ...

  4. 【JZOJ5439】【NOIP2017提高A组集训10.31】Calculate

    题目 分析 对于\[\sum_{i=1}^{n}\lfloor\dfrac{T-B_i}{A_i}\rfloor\] 我们考虑拆开处理,得到 \[\sum_{i=1}^{n}(\lfloor\dfra ...

  5. 问题_VS2008和VS2012未能加载包.....以及破解VS2008方法

    在装了vs2012之后,装了vs2008 然后发生了加载包失败的问题 1.vs2008 解决办法:在vs2008命令提示符下运行:devenv /resetskippkgs,再重新打开就行了 2.vs ...

  6. Python 异常处理Ⅱ

    异常处理 捕捉异常可以使用try/except语句. try/except语句用来检测try语句块中的错误,从而让except语句捕获异常信息并处理. 如果你不想在异常发生时结束你的程序,只需在try ...

  7. k8s-insight测试

    eureka apiVersion: v1 kind: Pod metadata: name: eureka labels: ccb: eureka spec: containers: - name: ...

  8. jquery target属性 语法

    jquery target属性 语法 作用:target 属性规定哪个 DOM 元素触发了该事件.大理石平台精度等级 语法:event.targe 参数: 参数 描述 event     必需.规定需 ...

  9. Redis 集群规范

    什么是 Redis 集群??Redis 集群是一个分布式(distributed).容错(fault-tolerant)的 Redis 实现,集群可以使用的功能是普通单机 Redis 所能使用的功能的 ...

  10. Markdown 标记语言指北

    这是班刊约稿的一篇文章. 全文约6000字, 预计需要 60 分钟读完. Markdown 标记语言指北 TOC 什么是 Markdown? Markdown 可以用来干什么? 第一步? 一些专业一点 ...