semaphore synchronization, file access locking