You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Semaphore/README.md
+5-2Lines changed: 5 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
16
16
# Spinlock Semaphore
17
17
18
-
- Wait for a signal to be raised to gain access to a shared resource
18
+
- Wait for a signal to be sent to gain access to a shared resource
19
19
- During a **wait** this shared resource burns CPU cycles till it gets a signal from another thread.
20
20
21
21

@@ -27,4 +27,7 @@
27
27
28
28
# Cooperative Semaphore
29
29
30
-
> TODO,
30
+
- Wait for a signal to be sent to gain access to a shared resource
31
+
- During a **wait** this shared resource **yields** to a different thread if it does not have access to the shared resource.
32
+
33
+
**NOTE** The output and working of the Cooperative Semaphore is similar to the Spinlock Semaphore. However the cooperative semaphore is more efficient since it does not burn unnecessary CPU cycles.
0 commit comments