mutex and semaphore

Status
Not open for further replies.

Kittu20

Member level 2
Joined
Oct 18, 2022
Messages
52
Helped
1
Reputation
2
Reaction score
0
Trophy points
6
Activity points
427
Hi,

I found that if two or more tasks are sharing the same resource then it is necessary to protect them. We use mutex and semaphore to protect resource

Suppose we have a two task that shares CPU time. I want to understand what could be the loss if the resource (CPU ) is not protected
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…