Assume there are 1,000 processes of ProgramX (Figure 1) running on a system equipped with an Intel Core i5 processor. If we randomly pick one of the processes, which of the following CPU states (a~e as shown in Figure 1) is the most likely one that the process will be at?
int main()
{
while(1);
return 0;
}
(Figure 1:process state diagram,(a) new、(b) terminated、(c) ready、(d) running、(e) waiting)
ProgramX 是純 CPU-bound 的無窮迴圈,沒有 I/O,不會進 waiting
1000 個這樣的 process 搶少數幾個 core,任何時刻只有極少數在 running,其餘全排在 ready queue
(c) ready