Yes. Your examples do help understand the functionality of a semaphore.
I appreciate you taking the time to explain.
For more information, see the wiki Searching the Forum for Answers section.