请问一下d选项的“CPU must guarantee…”
cpu是怎么保证atomically executed呢?
我知道计组也有谈到互斥存取这部分
但不太了解是怎么或是有什么元件达到的
※ 引述《clonsey1314 (Clonsey)》之铭言:
: 题目:
: Which one(s) of the following statements adequately describe the test-and-se
t
: (A) It does not work in multiprocessor environment.
: (B) It can all be implemented in the user space, provided that the lock vari
ab
: (C) It does not waste any CPU cycles when a process cannot acquire a lock
: (D) The CPU must guarantee that the test-and-set instruction is an atomic op
er
: 答案: (B)(D)
: 请问
: A选项: 书上说在multiprocessor系统下用test-and-set效能差, 这个选项错是因为"只
是
: B选项: 硬件的support, 不是要在kernel mode下才能运作吗? 还是我观念有误?