EECE **** Embedded System Design - PowerPoint PPT Presentation

1 / 8
About This Presentation
Title:

EECE **** Embedded System Design

Description:

EECE Embedded System Design – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 9
Provided by: mdhasan
Category:

less

Transcript and Presenter's Notes

Title: EECE **** Embedded System Design


1
EECE Embedded System Design
2
Semaphores Control Tasks

3
Semaphore Operations
  • Semaphore a special variable that controls task
    execution. When waiting for a semaphore, tasks
    are blocked. The semaphore has a integer value.
    ??
  • (Atomic) Operations (logical code)

4
Semaphore Example
5
Circular Buffer
6
Circular Buffer with Semaphores
7
Problems with Semaphores
  • Forgetting to take the semaphore
  • Shared data bug
  • Forgetting to release the semaphore
  • Waiting task blocked forever
  • Taking the wrong semaphore
  • Unexpected behavior
  • Holding the semaphore for too long
  • Tasks may miss real-time deadlines

8
Problems with Semaphores
  • Deadlock (deadly embrace)

Scenario T1 P(sA) -gtT2P(sB)-gtT2P(sA) Blocks
-gt T1P(sB)Blocks
Write a Comment
User Comments (0)
About PowerShow.com