Add the rest of university notes

This commit is contained in:
John Gatward committed 2026-10-04 14:02:35 +01:00
1 parent c1b84c7f7d
commit d0f27f276b
366 files changed
+9844 -110

No files matched your search

+3 -3
View File
@@ -41,7 +41,7 @@ Counter++ consists of three separate actions.
The above actions are **not** "atomic". This means they can be interrupted by the timer.
![image](/lectures/osc/assets/p.png)
![image](assets/p.png)
TCB - *Thread Control Block*
@@ -63,9 +63,9 @@ void print() {
If the two threads are **interleaved** one after the other, there is no issue.
![img](/lectures/osc/assets/q.png)
![img](assets/Q.png)
However if **interleaved** like this they do interact. The global variable used to store the character in thread 1, is overwritten when thread 2 runs. This means 1+1+1 = 2
However, if **interleaved** like this they do interact. The global variable used to store the character in thread 1, is overwritten when thread 2 runs. This means 1+1+1 = 2
## Bounded Buffer