11.3. The producer–consumer, bounded buffer problem
11.3.1. Use of buffers
In Section 3.5 we saw the need for synchronization and data exchange between user-level processes requesting I/O and device handlers taking output or delivering input. A user-level process should be able to make a request for an arbitrary amount of data to be output or input. The device takes or delivers a fixed amount. A data buffer allows these device-dependent characteristics to be hidden from the user level. It also allows irregular bursts of user-level processing or device activity to be smoothed out. A process engaging in a burst of activity can continue until the buffer is full.
The synchronization conditions on accesses to the buffer are as follows. If a user-level ...
Get Operating Systems: Concurrent and Distributed Software Design now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.