Is spin lock useful in a single processor uni core architecture?

后端 未结 4 969
耶瑟儿~
耶瑟儿~ 2021-01-31 11:55

I am confused by the function of spin lock.

The spin lock is used to stop the process from re-scheduling. However, in a machine with just one core, is it useful to use s

4条回答
  •  时光说笑
    2021-01-31 12:16

    No.

    For a much more detailed answer, see "How Do Locks Lock?" along with the comments.

提交回复
热议问题