【DSP开发】shared memory VS mailbox
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的更多相关文章
- 【并行计算-CUDA开发】关于共享内存(shared memory)和存储体(bank)的事实和疑惑
关于共享内存(shared memory)和存储体(bank)的事实和疑惑 主要是在研究访问共享内存会产生bank conflict时,自己产生的疑惑.对于这点疑惑,网上都没有相关描述, 不管是国内还 ...
- 【并行计算-CUDA开发】CUDA shared memory bank 冲突
CUDA SHARED MEMORY shared memory在之前的博文有些介绍,这部分会专门讲解其内容.在global Memory部分,数据对齐和连续是很重要的话题,当使用L1的时候,对齐问题 ...
- 【并行计算-CUDA开发】CUDA bank conflict in shared memory
http://hi.baidu.com/pengkuny/item/c8070b388d75d481b611db7a 以前以为 shared memory 是一个万能的 L1 cache,速度很快,只 ...
- DSP开发资源总结,经典书籍,论坛
OMAP4开发资源总结: 一.TI OMAP4官网介绍: http://www.ti.com.cn/general/cn/docs/wtbu/wtbuproductcontent.tsp?templa ...
- Davinci DM6446开发攻略——DSP开发工程建立
前段时间一直忙一个项目,同时在生活上时时提防和抵抗中国地沟油.国外核心转基因调和油.大豆油.色拉油.大米玉米.可怕的喂药鱼.药水泡农药喷无虫咬的青菜,所以没时间打理自己的博客,让开发攻略停顿了一段时间 ...
- 【DSP开发】帮您快速入门 TI 的 Codec Engine
德州仪器半导体技术(上海)有限公司 通用DSP 技术应用工程师 崔晶 德州仪器(TI)的第一颗达芬奇(DaVinci)芯片(处理器)DM6446已经问世快三年了.继DM644x之后,TI又陆续推出了D ...
- 【DSP开发】gel文件编写
以下转载自:http://blog.csdn.net/henhen2002/article/details/4573447 GEL--通用扩展语言,无类型语言,只有int类型,当CCS运行时首先执行这 ...
- 【DSP开发】【并行计算-CUDA开发】TI OpenCL v01.01.xx
TI OpenCL v01.01.xx TI OpenCL™ Runtime Documentation Contents: Introduction OpenCL 1.1 Reference Mat ...
- 【DSP开发】【Linux开发】基于ARM+DSP进行应用开发
针对当前应用的复杂性,SOC芯片更好能能满足应用和媒体的需求,集成众多接口,用ARM做为应用处理器进行多样化的应用开发和用户界面和接口,利用DSP进行算法加速,特别是媒体的编解码算法加速,既能够保持算 ...
随机推荐
- python广度遍历文件夹
import os from collections import deque path = r"E:\Python" queue = deque([])#队列 queue.app ...
- 关于数字加载的动画 jquery
这是关于数字加载的一个动画,从0开始变化到设置的数字,依赖于jquery,效果如下所示 当然,数字要显示的位数是可以设置的,默认是全部位数的数字,设置显示位数可以直接传递参数,例如: html文件为: ...
- 【LuoguP4557】[JSOI2018]战争
题目链接 题意 给你两个点集. q次询问 , 每次把其中一个点集往一个方向移动 , 问两个点集的凸包还有没有交. Sol 闵可夫斯基和板子题. 把问题做如下转换: 我们本来两个凸包相交是相当于是对于移 ...
- Nginx解析PHP
刚安装完PHP后,nginx是无法解析的,如果输入地址会直接下载文件,需要进行如下的设置 步骤 修改/etc/nginx/sites-available/default和cat /etc/nginx/ ...
- JavaScript 函数调用时带括号和不带括号的区别
function countBodyChildren(){ var body_element = document.getElementsByTagName("body")[0]; ...
- 【leetcode】1267. Count Servers that Communicate
题目如下: You are given a map of a server center, represented as a m * n integer matrix grid, where 1 me ...
- Nowcoder Removal ( 字符串上的线性 DP )
题目链接 题意 : 给出长度为 n 的字符串.问你准确删除 m 个元素之后.能产生多少种不同的子串 分析 ( 参考博客 ): 可以考虑线性 DP 解决这个问题 试着如下定义动态规划数组 dp[i][ ...
- poj 3685 Matrix 二分套二分 经典题型
Matrix Time Limit: 6000MS Memory Limit: 65536K Total Submissions: 5724 Accepted: 1606 Descriptio ...
- Linux下测试CPU性能
一.安装stress服务 1.下载stress_1.0.1.orig.tar.gz安装包 2.解压tar xvf stress_1.0.1.orig.tar.gz 3.进入解压目录执行./config ...
- JavaWeb_(SSH论坛)_五、帖子模块
基于SSH框架的小型论坛项目 一.项目入门 传送门 二.框架整合 传送门 三.用户模块 传送门 四.页面显示 传送门 五.帖子模块 传送门 六.点赞模块 传送门 七.辅助模块 传送门 回复帖子 分析回 ...