操作系统课件CCH07-Process Synchronization分解.ppt

A race condition Depending on which process reaches the shared resource first, we have several possible results! The bounded buffer enter( ) remove( ) Understanding the issue Concurrent access to shared data may result in data inconsistency Lack of synchronization means results may be non-deterministic and non-repeatable In the bounded buffer solution, both the consumer and the producer update counter Semaphore Implementation With busy wait : Atomicity Entire wait (S) must be atomic How? Disable interrupts Or use another mutex solution, e.g., lock Semaphore Implementation with no Busy wa

文档评论(0)

1亿VIP精品文档

相关文档