20. How does the `SEM_UNDO` flag in the `sem_flg` field of `sembuf` help prevent resource leaks and deadlocks in semaphore operations?
a. Give your understanding of how the `SEM_UNDO` flag ensures that semaphore operations are automatically undone if the process terminates unexpectedly.