이 포스팅은 한국기술교육대학교 김덕수 교수님의 운영체제 강의를 참고하여 작성되었습니다.
Mutual Exclusion Solutions
SW solutions
• Dekker’s algorithm (Peterson’s algorithm)
• Dijkstra’s algorithm, Knuth’s algorithm, Eisenberg and McGuire’s algorithm, Lamport’s algorithm
HW solution
• TestAndSet (TAS) instruction
OS supported SW solution
• Spinlock
• Semaphore
• Eventcount/sequencer
Language-Level solution
• Monitor
Synchronization Hardware
TestAndSet (TAS) instruction
Trst와 Set을 한 번에 수행하는 기계어
Machine instruction
- 실행 중 interrupt를 받지 않음 (preemption 되지 않음)
3개 이상의 프로세스의 경우, Bounded waiting조건 위배
N-Process mutual exclusion

H/W Solution
장점
- 구현이 간단
단점
- Busy waiting / Inefficient
Busy waiting 문제를 해소한 상호 배제 기법
- Semaphore : 대부분의 OS들이 사용하는 기법
긴 글 읽어주셔서 감사드립니다.
22.12.16
'TIL (Today I Learned) > 컴퓨터 시스템(CS)' 카테고리의 다른 글
[CS] 쉽게 배우는 운영체제 Chapter03 #1 (2) | 2022.12.17 |
---|---|
[CS] Process Synchronization and Mutual Exclusion #3 (0) | 2022.12.16 |
[CS] Process Synchronization and Mutual Exclusion #1 (0) | 2022.12.16 |
[CS] Process Scheduler #4 (0) | 2022.12.16 |
[CS] Process Scheduler #3 (0) | 2022.12.16 |
댓글