This topic has been archived. It cannot be replied.
-
工作学习 / 专业技术讨论 / 多线程之间的通讯都有什么方式? 共享内存是吗?
-billhao(bill);
2007-3-20
(#3564079@0)
-
share memory, message queue, RPC,TCP/IP.......which layer are you asking..
-eagle_no1(革命与浪漫地瞎起哄);
2007-3-20
{28}
(#3564091@0)
-
delete共享内存的注意事项? RPC是什么东东?
-billhao(bill);
2007-3-20
(#3564209@0)
-
不delete就没那么麻繁了,what OS you are talking about? Remote Process Call.
-eagle_no1(革命与浪漫地瞎起哄);
2007-3-20
(#3564234@0)
-
windows
-billhao(bill);
2007-3-20
(#3564256@0)
-
就是说, delete共享内存时, 是否要做其它的工作, 还是直接delete就可以?
-billhao(bill);
2007-3-20
(#3564264@0)
-
这么问不是办法,你最好看看书。这么速成出来的都是一知半解的东西,真的去面试回答问题会出洋相的。
-canadiantire(轮胎-pax et lux);
2007-3-20
(#3564278@0)
-
现在的interviewer,都把你当超人问, 还时不时来点垃圾问题, 郁闷!
-billhao(bill);
2007-3-20
(#3564300@0)
-
不知道就告诉不知道,谁都不是超人吗。
-canadiantire(轮胎-pax et lux);
2007-3-20
(#3564309@0)
-
就听你的了
-billhao(bill);
2007-3-20
(#3564353@0)
-
原来是面试问题。最简单的当然是pipe啦。万能的就是socket。还有mailslot,message,filemapping等。
-aaronding(流浪的八毛儿);
2007-3-20
(#3564336@0)
-
看点最基本的操作系统的书, 用最基本的概念和原理回答问题,应该能出最好效果.(对你这个具体问题, 只能说要考虑数据完整性和线程安全)
-eagle_no1(革命与浪漫地瞎起哄);
2007-3-20
(#3564326@0)
-
估计是想问如何实现多线程同步。我知道有mutex, semaphore, event和criticalsection还有更简单的interlock函数也可以。
-baalinca(scarb);
2007-3-20
(#3564352@0)
-
agreed
-wangqingshui(忘情水);
2007-3-20
(#3564472@0)
-
Shared memory is one of inter process communication. Inter thread communication, you can use variable names because they are in the same address space. Of course you need synchronization if the data changes.
-wangqingshui(忘情水);
2007-3-20
(#3564374@0)
-
thread, not process
-billhao(bill);
2007-3-20
(#3564387@0)
-
But what you discussed above like share memory, RPC, etc. are all IPC.
-wangqingshui(忘情水);
2007-3-20
(#3564453@0)
-
Of course IPC mecahnism can be used to communicate between threads but it's not necessary because the cost is higher.
-wangqingshui(忘情水);
2007-3-20
(#3564458@0)
-
请问OS是什么? Programming language是什么? 这些与回答有关.
-wangqingshui(忘情水);
2007-3-20
(#3564471@0)
-
进程间(process)通信(IPC)Win32进程
1、进程间通信(IPC)
Win32进程间通信的方式主要有:
(1)剪贴板(Clip Board);
(2)动态数据交换(Dynamic Data Exchange);
(3)部件对象模型(Component Object Model);
(4)文件映射(File Mapping);
(5)邮件槽(Mail Slots);
(6)管道(Pipes);
(7)Win32套接字(Socket);
(8)远程过程调用(Remote Procedure Call);
(9)WM_COPYDATA消息(WM_COPYDATA Message)。
-billhao(bill);
2007-3-20
{439}
(#3564837@0)
-
呵呵,THREAD之间的通讯极其简单,mutex+condition就完全足够了
-googleabcd(古狗);
2007-3-20
(#3564867@0)