How would you implement mutexes and semaphores in a resource-constrained embedded application at Benchmark Space Systems?