Please enable JavaScript.
Coggle requires JavaScript to display documents.
ReaderDone', Worker, Worker', ReaderDone, Worker, State, yield,…
ReaderDone'
startWriting
WriterWriting'
stopWriting
WriterDone'
startReading
ReaderReading'
stopReading
inc R
fetch W'
inc W'
fetch R
Worker
if R Readable
true
false
fetch R Index
if W Writable
true
false
fetch W
yield
await
sleep
cpuRelax
Worker'
if W' Writable
true
false
fetch W' Index
if R' Readable
false
fetch R'
yield
await
sleep
cpuRelax
true
ReaderDone
startWriting
WriterWriting
stopWriting
WriterDone
startReading
ReaderReading
stopReading
inc R'
fetch W
inc W
fetch R'
Worker
Thread or Proccess
State
Ring Buffer State
yield
CPU/Thread starvation prevention
State change pre requisite
Proccess flow
Two Ring Buffers
Two Workers