rtel wrote on Sunday, June 19, 2016:
This sounds like a school question?
These disable interrupts, normally up to a maximum user defined priority level rather than globally. As they disable interrupts they are only good for very short critical sections. They are however also very fast, so have minimum impact on interrupt responsiveness when used correctly (for very short sections). They also protect against both tasks and interrupts accessing a resource.
These leave interrupts enabled, so can be used on longer critical sections, but should still be used sparingly as they will prevent a context switch. Suspending the scheduler is very fast, resuming it again is not deterministic though as one or more tasks that was unblocked while the scheduler was suspended will need to be processed when it is resumed, as do any tick interrupts that occurred while the scheduler was suspended.
These have traditional OS mutex behaviour. The best method to use if mutually exclusive access is required for a relatively long period, such as when using a peripheral.
I’m sure there is a lot more that could be added.