Question:
What is the difference between Critical Regions and Scheduler tasks in Embedded applications?
Answer:
SI.NO |
Critical Region |
Scheduler locks |
1 |
In Critical Region, where both interrupts and scheduling are completely disabled |
A scheduler lock disables the scheduler but still leaves interrupts enabled. |
2 |
Critical regions can be used in thread level and ISR level to protect data that can also be modified by an ISR |
Scheduler can be used only at thread level. This has the benefit that interrupts can still occur, so interrupt latency is not affected, but holds-off pre-emption by all other threads until the scheduler lock is removed |