homework 4 Version 0 |
|
👤 Author: by 3372353368qqcom 2019-11-07 13:47:21 |
think about your possible case about process synchronization, and give out a solution for the problem.
In some cases, process synchronization causes inconsistencies in shared resources. Shared resources are placed in buffers. If there is a mutual exclusion relationship for access to the buffer, a mutex is set for access to the buffer, and then two are set. One semaphore records one free buffer unit, and one records full buffer unit to synchronize producers and consumers.