系統管理
1847547 會員
3394 線上
110265 解決方案
發表新文章

What is context switching?

 
watermelonyu
教授

What is context switching?

什麼時候會有context switching?
3則回覆 3
watermelonyu
教授

What is context switching?

Hi :



Context switch 的時機有二:

1. force context switch

Process run out of time slot, timeslice/Hz ( 100 ms by default) and higher priority process is waiting for CPU.

2. voluntary context switch

Process went to sleep, such as wait for I/O.



.

.
watermelonyu
教授

What is context switching?

1. timeslice 是可由 kernal parameter 設定嗎?

2. 我們是否可得知系統實際每秒做了多少次 context switch (avg)?
watermelonyu
教授

What is context switching?

1. Kernal parameter : timeslice

2. glance or gpm(xmode) --> C for cpu report and then you can see the "ContextSwitch" by "Current Average High Time Cum Time"