Spinlock (software-only)
- turn only ping-pong like one-to-one problem
- flag only symultaniously raising flag problem
- Peterson's algorithm use flag and turn variable
spinlock (hardware atomic)
by hardware support atomic operation
atomic operation: cannot be disturbed
acquire()/lock(): before critical section
release()/unlock(): after critical section