-
교착상태(데드락)이란?Computer Engineering 2023. 6. 18. 14:57
- 교착상태 ( 데드락 ) : 두 개 이상의 프로세스가 자원을 점유한 상태에서 서로 다른 프로세스가 점유하고 있는 자원을 요구하면서 서로의 작업이 끝나기만을 기다리며 둘 다 영원히 끝나지 않는 상황
필요조건
1. 상호 배제 : 한 번에 한 개의 프로세스만이 공유자원을 사용할 수 있다
2. 점유 대기 : 할당된 자원을 가진 상태에서 다른 자원을 사용하고자 기다린다
3. 비선점 : 자원을 강제적으로 빼앗아 올 수 없고 자발적으로 반환할 때까지 기다린다
4. 순환 대기 : 자원 요구 관계가 원형을 이루면서 대기한다해결방법
- power off, reboot
- 불가능한 시스템에서는 os차원에서의 교착상태 예방, 자원의 효율적 관리
- 필요조건 중 하나 이상을 만족 시키지 않도록 만들어준다
: 자원 공유 가능하도록, 선점 가능하도록, 점유와 대기상태를 예, 환형대기 문제 예방교착상태 예방
1. 상호 배타 : 자원을 공유 시킨다 : 현실적으로 어려움
2. 점유 대기 : 자원이 없는 상태에서 모든 자원 대기 : 일부 자원만 가용할 때 보유 자원을 모두 놓아주게 한다
: 자원 활용률이 저하됨, 기아현상 야기
3. 비선점 : 자원을 강제로 빼앗아 올 수 있도록 한다 : 현실적으로 어렵다 ( 프린터 등 )
4. 순환 대기 (환형 대기) : 선형으로 분류해서 번호를 할당하고 번호의 오름차순으로 자원을 요청하는 방법 : 자원 활용률, 시스템 처리량이 저하교착상태 회피
교착상태는 자원 요청에 대한 잘못된 승인으로 인해 발생한다고 접근하는 방법
'Computer Engineering' 카테고리의 다른 글
23/11/23 네트워크 프로그래밍 #멀티캐스트 실습 (0) 2023.11.23 23/11/21 네트워크 프로그래밍 # 브로드 캐스팅 (1) 2023.11.21 프로세스의 상태와 계층 구조 (0) 2023.06.07