Dell Technologies Interview Question

Design a semaphore in a multi-processor system with locking and lockless approach.