Concurrency
About
Concurrency is a simulation of running tasks at the "same time".
It happens when tasks run on the same core, or different virtual/logical cores.
Thread
A thread is like the smallest execution unit.
Each thread executes a sequence of intructions and have a context, that stays in the CPU registers while the thread is executing in the CPU.
Time Sharing
Context Switch
Context switching is the switch of contexts, in such a speed, that it looks like they are running on the same time.
The machine offers a pre-defined amount of time (time-slice) to each context to run.
Scheduler (O.S)
The o.s scheduler is the task that will manage the context switch, to remove, contexts that do not cooperate and hang on the CPU.
Last updated