[問題] Multithread Coding and Parallel Coding

看板C_and_CPP作者 (crystal)時間14年前 (2011/10/13 02:47), 編輯推噓1(1032)
留言33則, 6人參與, 最新討論串1/3 (看更多)
Hello people, Apologize I can only type English for now. I've been working on image processing and graphics application for a while, and found that "think parallely" is critical to modern applications. But I always have a question: Do you think we should learn multithread coding (which I mean single/multicore) before getting into parallel coding (which i mean gpgpu/multiprocessor)? As my littile knowledge in these two fields, multithread is to utilize the concept of "shared memory" rather than speeding up by multicores, while parallel computing is intended to speed up by the power of multiple processors. I'm interested in how people compare with these two models. -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 128.30.99.157

10/13 02:50, , 1F
May we type those in chinese ? Orz..
10/13 02:50, 1F

10/13 03:13, , 2F
樓上連這個都了解? 到底有什麼是t大不會的啊...
10/13 03:13, 2F

10/13 03:49, , 3F
哪裡,我懂的都是無關緊要的皮毛,且他也都說一些了,建議
10/13 03:49, 3F

10/13 03:49, , 4F
os 念熟點, 這些問題應都可迎刃而解。
10/13 03:49, 4F

10/13 10:08, , 5F
如果我沒誤解錯,原po是要討論multithread和multiprocess
10/13 10:08, 5F

10/13 10:10, , 6F
吧!這很難討論.multithread最讓人頭痛的問題是deadlock
10/13 10:10, 6F

10/13 10:12, , 7F
原po的意思是他想要達到在多核上平行計算的目的
10/13 10:12, 7F

10/13 10:12, , 8F
為此目的是否要學習multithread programming
10/13 10:12, 8F

10/13 10:15, , 9F
Orz 不好意思我一直住意第五段.忘記第四段的主軸
10/13 10:15, 9F

10/13 10:24, , 10F
更正一下,他應該是指在多處理器上(massive multi-processor)
10/13 10:24, 10F

10/13 10:25, , 11F
可是其實需不需要碰到multithread..基本還是會碰到吧
10/13 10:25, 11F

10/13 10:32, , 12F
可是其實如果真的都是在處理MPP或Clustering
10/13 10:32, 12F

10/13 10:33, , 13F
通常通會使用OpenMP或其它的framework
10/13 10:33, 13F

10/13 10:33, , 14F
重點不在multithread,可是懂multithread的觀念也是好的
10/13 10:33, 14F

10/13 10:33, , 15F
其實我覺得原po直接開始學gpgpu/multiprocessor就好
10/13 10:33, 15F

10/13 10:34, , 16F
它跟thread還是有許多不同的地方...
10/13 10:34, 16F

10/13 10:34, , 17F
multithread是達到平行的一種手段,可是multithread的目的
10/13 10:34, 17F

10/13 10:34, , 18F
卻往往都不是為了達成平行,過度鑽研沒意義
10/13 10:34, 18F

10/13 10:35, , 19F
往往都不是為了達成平行 ←這個意思是?
10/13 10:35, 19F

10/13 10:37, , 20F
多工不等於平行
10/13 10:37, 20F

10/13 10:38, , 21F
平行處理是指將一件事分配下去讓很多單元一起計算
10/13 10:38, 21F

10/13 10:38, , 22F
多工則可以是大家都各自做不同的事情
10/13 10:38, 22F

10/13 10:38, , 23F
也許有的處理UI有的處理I/O,有的處理計算
10/13 10:38, 23F

10/13 10:39, , 24F
了解,我懂您的意思了
10/13 10:39, 24F

10/13 10:40, , 25F
個人淺見是不用顧慮cpu和memory使用率的情況下,那一個
10/13 10:40, 25F

10/13 10:41, , 26F
技術可以快速賺到錢時,先考量那就好.其它的,有私人時間
10/13 10:41, 26F

10/13 10:42, , 27F
可以買書來研究.如同tropical所講的,真的是偏向OS理論
10/13 10:42, 27F

10/13 10:44, , 28F
何況thread,ipc,socket等,c標準還不把他們列入規範
10/13 10:44, 28F

10/13 10:44, , 29F
也就是這技巧有點偏向各家編譯器的功能
10/13 10:44, 29F

10/13 11:16, , 30F
C++0x...的threading QQ
10/13 11:16, 30F

10/13 11:23, , 31F
C++0x太可怕了 我還是乖乖pthread就好 :x
10/13 11:23, 31F

10/13 11:26, , 32F
我的把範圍限在c,還是有人提起c++0x.只能這話題太可怕
10/13 11:26, 32F

10/13 11:26, , 33F
我要乖乖看大家發言,不打字了.
10/13 11:26, 33F
文章代碼(AID): #1EbU2l5n (C_and_CPP)
討論串 (同標題文章)
文章代碼(AID): #1EbU2l5n (C_and_CPP)