A race condition could happen in Single processor environment. As per Wiki Race Condition occurs when output is dependent on the sequence or timing of other uncontrollable events
Single processor environment could support multiple threads of the same process of different process that might be waiting for another thread to yield on a resource. Deadlocks can happen in single processor environments too.
Scenario:
- T1: Wants add an employee record to file "employee.txt"
- T2: Wants to compute average salary for "legal dept"
- T3: Wants to remove an employee who left
- T4: Wants to list number of employees working in each dept
If all the above threads are waiting at time=0
and submitted to single processor, it would decide which thread goes first, second and so on. The order in which the Threads are prioritised and yielded differs on different platform, scenarios etc. Thus T2 and T4 might not give consistent result.