Add the rest of university notes
This commit is contained in:
366 files changed
+9844
-110
No files matched your search
@@ -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.
|
||||
|
||||

|
||||

|
||||
|
||||
TCB - *Thread Control Block*
|
||||
|
||||
@@ -63,9 +63,9 @@ void print() {
|
||||
|
||||
If the two threads are **interleaved** one after the other, there is no issue.
|
||||
|
||||

|
||||

|
||||
|
||||
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
|
||||
|
||||
|
||||
Reference in new issue
Block a user