[理工] [OS]中斷&Busy waiting
(1)X could lead a process to leave from the "running" state to the "ready"
state
and Y could lead lead a process to leave from the "running" state to the
"waiting" state. What is (X,Y)?
(A)(hardware interrupt, software interrupt)
(B)(hardware interrupt, clock interrupt)
(C)(software interrupt, clock interrupt)
(D)(clock interrupt, hardware interrupt)
(E) (clock interrupt, software interrupt)
答案是給E
可是A不也對嗎??
-------------------------------------------------------------------------------
(2)Which of the following statements about processes are incorrect?
(A) The many - to - one multithreading model is suitable when
the number of kernel threads per process is limited.
(B) SJF scheduling is used frequently in long-term CPU scheduling.
(C) FCFS is the RR algorithm with an infinite time quantum.
(D) A counting semaphore can be implemented using 2 binary semaphores.
(E) Semaphores can avoid busy waiting altogether.
答案是A
可是E不也是錯的嗎? busy waiting無法完全避免吧!!
以上
有請善心的高手回答
鋼溫!!
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 223.140.227.136
推
12/15 23:42, , 1F
12/15 23:42, 1F
1F一語驚醒我....感激!!
推
12/16 00:00, , 2F
12/16 00:00, 2F
※ 編輯: jim055006 來自: 223.142.237.142 (12/16 23:05)
我想了想
所以是software interrupt會讓"running"跑到"waiting"
而hardware interrupt會讓"waiting"跑到"ready"??
是這樣嗎??
※ 編輯: jim055006 來自: 223.142.237.142 (12/16 23:19)