Computer Science/운영체제
2022. 6. 2.
Chapter 07-1. Synchronization Examples
동기화 문제에는 대표적인 3가지가 있다. 1. Bounded - Buffer Problem(Producer - Consumer Problem) - 제한된 버퍼에 데이터를 채우고 가져가는 문제 2. Readers and Writers Problem - 데이터의 공유 문제 3. Dining - Phillosopers Problem - 한 자원을 가지고 다른 자원을 요청하는 문제 Bounded - Buffer Problem) 기본적으로 생산자 - 소비자 문제이고 n개의 버퍼로 이루어져 있다. 데이터 공유 모델의 한 종류 이다. int n; semaphore mutex = 1; // -> binary semaphore semaphore empty = n; semaphore full = 0; mutex는 bina..