Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Test and set

From noriwiki


개요

용어의 약간의 misleading이 있지만, test-and-set 은 hardware atomic operation으로 spin-lock을 구현하는 기본이 되는 operation을 말한다. 이 operation은 단순히 아래의 일을 한다.

test_and_set(val, lock) = set val to lock, return previous_val from lock.

즉 test-and-set의 test는 사용자가 수행하는 것이고 TAS라고 하면 보통 이 atomic fetch operation을 말한다.

같이 보기

  1. Test and test and set
  2. Spin Lock