Threads can perform a lock(x)
, unlock(x)
, A <- get(x)
and put(A, x)
operations. For example, to update a page, a thread would execute the following:
lock(x)
A <- get(x)
modify data in A
put(A, x)
unlock(x)
get
and put
operations are atomic.