Semaphore, threading and process functions...