由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - multi threading 还是 multi processing
相关主题
来来,讨论一下multithread, multi-core, affinitymultithread app的design要注意哪些问题?
a dummy OS questionc++下如何实现多线程?
multithreaded vs multiprocess[合集] 怎么样提高自己的multi-thread programming能力?
pthread mutex能不能用与thread和process之间One OS scheduling question (转载)
请推荐几本Multi-threading的编程书籍多线程 编程,process 和 thread 的一些问题。
[合集] 请推荐几本Multi-threading的编程书籍use abort() to generate coredump (转载)
真正的multi-threading是5个thread要5个cpu?那apache是真正的mprocesses vs threads
一个multithread的问题(是不是有人觉的很简单?)请教c++ multithreading入门问题
相关话题的讨论汇总
话题: multi话题: threading话题: processing话题: process
进入Programming版参与讨论
1 (共1页)
g*****y
发帖数: 1120
1
现有一程序段,需要用到不同输入数据并发执行,
该程序需要instanciate一个c++ class, 该class即有全局static变量又有生成multi
threads
不知道这种情况下用multi-threading是否可能?
觉得用multi process编程更容易而且符合需要,但不知运行代价会不会很大。
还有就是现在已经找不到multi process的例子了。
g****c
发帖数: 299
2
some example http://en.wikipedia.org/wiki/Thread_(computing)

multithread each thread share its resource
multiprocess each process own its resource(more memory), if needing process
communication,
I would choose multithread.
~~~~~~~~what does that
refer to
what does that mean?

【在 g*****y 的大作中提到】
: 现有一程序段,需要用到不同输入数据并发执行,
: 该程序需要instanciate一个c++ class, 该class即有全局static变量又有生成multi
: threads
: 不知道这种情况下用multi-threading是否可能?
: 觉得用multi process编程更容易而且符合需要,但不知运行代价会不会很大。
: 还有就是现在已经找不到multi process的例子了。

p*u
发帖数: 2454
3
or you may use single thread but coroutine implementation.

【在 g*****y 的大作中提到】
: 现有一程序段,需要用到不同输入数据并发执行,
: 该程序需要instanciate一个c++ class, 该class即有全局static变量又有生成multi
: threads
: 不知道这种情况下用multi-threading是否可能?
: 觉得用multi process编程更容易而且符合需要,但不知运行代价会不会很大。
: 还有就是现在已经找不到multi process的例子了。

1 (共1页)
进入Programming版参与讨论
相关主题
请教c++ multithreading入门问题请推荐几本Multi-threading的编程书籍
有专门介绍multithreading编程的书吗[合集] 请推荐几本Multi-threading的编程书籍
急问一个学Multithreading编程的问题真正的multi-threading是5个thread要5个cpu?那apache是真正的m
多线程计时不准std::thread尝鲜 问题一个multithread的问题(是不是有人觉的很简单?)
来来,讨论一下multithread, multi-core, affinitymultithread app的design要注意哪些问题?
a dummy OS questionc++下如何实现多线程?
multithreaded vs multiprocess[合集] 怎么样提高自己的multi-thread programming能力?
pthread mutex能不能用与thread和process之间One OS scheduling question (转载)
相关话题的讨论汇总
话题: multi话题: threading话题: processing话题: process