Are Atomic Operations Faster and Better Than a Mutex? It Depends