Download presentation
Presentation is loading. Please wait.
1
Semaphores -Gajendra Singh
2
SHARED DATA PROBLEM
4
ATOMIC or CRITICAL SECTION
8
Interrupt Latency The longest period of time during which that interrupt is disabled Task code1 :disable interrupt for 125uS. Task code2 :disable interrupt for 250uS. Task code3 :critical & need to respond within 625us. Interprocessor interrupt routine takes 300uS to execute.
9
Points to be noted Lets cut the cost and replace uP that runs half as fast. Similarly adding an extra task might also be awful. Conclusion: Disabling Interrupts “Not a very good idea.”
10
Architectures Round Robin Round Robin with Interrupts
Function Queue Scheduling RTOS
11
ISR_A; ISR_B; : ISR_Z main(){ while(1){ if(A){ // do something} if(B){// do something} if(Z){// do something} }
12
Tasks And Data
13
Shared data Problem with OS
14
Have a Look:
15
Reentrancy Reentrant Functions: can be called by more than one task and still work correctly even if RTOS switches from one task to another in middle of executing one function.
16
Gray Areas:
17
For 8051 For INTEL 80x86
18
Semaphores
19
Initializing Semaphores
21
Advantages Multiple Semaphores. As signaling Device
23
DeadLock
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.