Why is synchronization in a uniprocessor system necessary? I would like to know a specific case as to why it is necessary. If only one process/thread can access the CPU at one time, when would be a case where synchronization is necessary?
Synchronisation in a uni-processor system is to ensure that a resource (for example, a mutex controlling a linked list) is locked to a specific thread of execution even while other threads may run.
While you're correct that only one thread can use the CPU at a time, pre-emptive threading means that a thread itself doesn't control when it's paused so that another can run, the OS does. If you allow threads to control their scheduling, that's known as co-operative threading, and it comes with its own set of problems.
So, since a thread cannot know when it will be switched out in a pre-emptive arena, it will want to lock the resource and ensure no other threads of execution can use that resource until it releases the lock. This could be after thousands of context switches that may have happened in the meantime.