vault backup: 2025-03-12 11:59:27
This commit is contained in:
parent
71114f1630
commit
e2bee099da
1 changed files with 9 additions and 1 deletions
|
@ -153,6 +153,14 @@ B.consume() :=
|
||||||
FREE.up()
|
FREE.up()
|
||||||
return tmp
|
return tmp
|
||||||
```
|
```
|
||||||
|
okay, so the difference seems to be just the fact that there are no while loops to find the first free location, or the first location with data.
|
||||||
|
|
||||||
|
Let's imagine to have quick producers and a slow consumer:
|
||||||
|
producer A:
|
||||||
|
- writes at BUF[0], so IN becomes 1
|
||||||
|
|
||||||
|
consumer A:
|
||||||
|
- reads
|
||||||
|
|
||||||
#### The Readers/Writers problem
|
#### The Readers/Writers problem
|
||||||
- Several processes want to access a file
|
- Several processes want to access a file
|
||||||
|
|
Loading…
Reference in a new issue