Write starvation occurs when readers continuously hold a shared resource, preventing a writer from entering its critical section. A read-preferring readers–writer lock can leave the writer waiting indefinitely because new readers keep access flowing. section 5.1.4
Readers keep the writer waiting
Two goroutines repeatedly acquire a reader lock, sleep for one second, print “Read done,” and release it. The main goroutine later requests the writer lock, but output continues with “Read done” indefinitely and never reaches “Write finished.”
