Semaphore based kernel