精華區beta C_and_CPP 關於我們 聯絡資訊
各位大大好 由於最近在練習多工多執行緒的使用方式 寫了一支程式 裡面開了兩個thread去做事 問題如下 執行程式exe檔 然後用 Process Explorer去看 裡面顯示的thread 會跟用 getcurrentthreadID() 印出來的一樣嗎? 另外 在process explorer thread頁面中 有看到 I/O priority、 memory priority、ideal processor 請問這三項分別是甚麼意思呢? 因為不是資工系畢業的所以不太懂 然後程式執行時ideal processor顯示數值是1 如果用SetThreadIdealProcessor是能指定thread在哪個核心上執行嗎? 另外thread affinity又是甚麼呢 當中有提到SetProcessAffinityMask這個function 要怎麼使用呢? 以上是最近練習thread的問題 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 111.254.51.120 ※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1512178799.A.A98.html
stupid0319: 資工系畢業真的那麼猛到什麼都懂嗎? 12/02 09:44
galic: 資工系也是先學理論阿 實務層面的問題也是真的遇上了才來 12/02 10:14
galic: google 所以你這一整篇 資工系只會回答affinity的定義 12/02 10:15
galic: 因為考試會考 XD 12/02 10:15
steve1012: 大家都是google找答案 我幫你找吧 SetThreadIdealProce 12/02 10:20
steve1012: ssor: http://bfy.tw/FLft thread affinity: http:// 12/02 10:20
steve1012: bfy.tw/FLfw 12/02 10:20