简体   繁体   中英

How does CPU know how much time a process take to complete?

I studying various CPU scheduling algorithm in OS, I was asked this question once I was not able to answer it. Can anyone explain me?

OS can compute the total needed time for each task, by means of first calculating its CPI (cycles per instruction). There is a weighted average CPI for each job. I hope this answers the question. But if you are talking about burst time then there is a default value to those unknown processes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM