Unsing discrete semaphore for synchronization...