semaphores2 Process Synchronization(3)-프로세스 동기화 Classical Problems of Synchronization Bounded-Buffer Problem (Producer-Consumer Problem) Readers and Writers Problem Dining-Philosophers Problem Bounded-Buffer Problem (Producer-Consumer Problem) Buffer가 유한한 환경에서 생산자-소비자 문제 생산자 프로세스와 소비자 프로세스는 여러 개가 존재 Shared data buffer 자체 및 buffer 조작 변수(empty/full buffer의 시작 위치) Synchronization variables mutual exclusion Need binary semaphore (shared data의 mut.. 2022. 3. 16. Process Synchronization(2)-프로세스 동기화 Initial Attempts to Solve Problem 두 개의 프로세스가 있다고 가정 P0, P1 프로세스들의 일반적인 구조 do{ entry section critical section exit section remainder section }while(1); 프로세스들은 수행의 동기화(Synchronize)를 위해 몇몇 변수를 공유할 수 있다 → synchronization variable 프로그램적 해결법의 충족 조건 *가정 모든 프로세스의 수행 속도는 0보다 크다. 프로세스들 간의 상대적인 수행 속도는 가정하지 않는다. 상호 배제 (Mutual Exclusion) 프로세스 Pi가 critical section 부분을 수행 중이면 다른 모든 프로세스들은 그들의 critical section에.. 2022. 3. 16. 이전 1 다음