Arduino Due Task Scheduler

ecstipan

the scheduler policies you're mentioning are used mainly on preemptive RTOS, where the CPU manage process interruption/resume.
The Scheduler library in Arduino does a much simpler cooperative scheduler: its the sketch's author that decide when its best to switch task, and it is done using yield() or delay() commands. Processes are called in turn in a round robin queue. This means that a task can take CPU time for many seconds if its not written correctly: if some RT deadline are met or not is up to the programmer.

I didn't measured the context-switch time, but i guess it should be very short, the cost is the call to the function coopDoYield (a bunch of assembly instructions) and coopSchedule (that in the 99% of cases is just an assignment unless a process terminate):

Mutex will be probably provided in the coming version of the library, btw process synchronization with cooperative scheduling is much simpler.