I am confused about whether a priority based tasks within one process can achieve concurrency on a single core CPU.
My understanding about concurrency is threads of processes logically parallel, which means these execution flows can start, run, and complete in overlapping time periods. Quoting
However, the method to achieve thread concurrency in a single core CPU from most books or information online I collected is to using Round-robin, in which the OS scheduler give time slice for each tasks(threads).
In automotive AUTOSAR RTOS, usually only one process running on each CPU and the tasks are scheduled according to their pre-configured priorities (static). In single core CPU case, it is obviously impossible to achieve task concurrency if the tasks are non-preemptive, but what if the tasks are configured as preemptive?
For example, task A, B exists on one CPU with priority A > B, task B runs first and then B is preempted by task A, A finished after a while then B continue the reset of its codes. **Does task A and B concurrent during these period? ** I think it is, if not, can or how the priority-based scheduling achieve thread concurrency in a single process on single core CPU?
I search on Google but failed to find expected answers, thanks, hope someone help clear my confusion :)