Use semaphore locking to avoid starting dss multiple times.