1. Coonect your Arduino UNO with PC using a USB Port. 2. Do the following and chcek that the UNO has been assigned COM Port.
start ---> Device Manager ---> Ports ---> COM4 (mine one)
3. Open IDE and do the following:
Tools ---> Port ---> slect COM4
4. Open Blink sketch and upload it. The onboard LED (L) should start bink.
Your topic does not indicate a "programming" problem but an "upload" problem; there is a difference when it comes to the Arduino forum Therefore your topic has been moved to a more suitable category of the forum.
The above means that avrdude wrote the output, but when it read back what had been written to verify it had been written correctly, what it received back did not match what had been sent.
I don't know what you mean by:
The board is usually plugged into a USB port. It may not always get assigned to the same COM port number. With IDE 1.8.x , if it was left open with serial monitor running, it might hold onto the port being used and next time the board is plugged in it comes up under a different port number. Close Serial Monitor before plugging in the board again. Post #5 already indicates how to determine which COM port has been assigned by Windows.
I suspect this and taken together with the semaphore error might point to a faulty or intermittent USB cable but its difficult to diagnose with messages in isolation from their context. Could you post the complete error output please? Use the <CODE/> icon at the top or bottom of the post editor window to mark the error text as it makes reading long lines much easier.