看板 LinuxDev 關於我們 聯絡資訊
我在driver裡create兩個kernel thread, thread A在loop裡輸出1, thread B在loop裡輸出2, 如果我在loop裡不做sleep之類放棄cpu的動作, 最後cpu就會一直被某個thread佔據, 不會有thread切換的情況. 所以是否kernel thread除非主動放棄, 不然會一直持有cpu? 不過書上寫kernel利用time sharing來切換process, 應該不會讓kernel thread一直持有cpu? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 61.230.14.29