Study/OS (13) 썸네일형 리스트형 Chapter 06. Process Syncronization and Mutual Exclusion (5of7) - OS supported Sol2 - Semaphore Mutual Exclusion Solutions SW solutions Dekker's algorithm (Peterson's alogorithm) Dijstra's algorithm, Knuth's algo, Eisenberg and McGuire's algo, Lamport's algo HW solution TestAndSet(TAS) instruction OS supported SW solution Spinlock Semaphore Eventcount/sequencer Language-Level solution Monitor busy waiting을 해결하기 위해 Semaphore (또!) dijkstra가 제안 Busy waiting 문제 해결 !!! 음이 아닌 정수형 변수(S) 초기화 연산, P.. Chapter 06. Process Syncronization and Mutual Exclusion (4of7) - OS supported Sol1 - Spinlock Mutual Exclusion Solutions SW solutions Dekker's algorithm (Peterson's alogorithm) Dijstra's algorithm, Knuth's algo, Eisenberg and McGuire's algo, Lamport's algo HW solution TestAndSet(TAS) instruction OS supported SW solution Spinlock Semaphore Eventcount/sequencer Language-Level solution Monitor SW와 HW solution의 busy waiting을 해결하기 위해 SpinLock 정수 변수 (조금 특별한!) 초기화, P(), V() 연산으로만 접근 가능한 변수 위 연산.. Chapter06. Process Syncronization and Mutual Exclusion (3of7) - HW solution Mutual Exclusion Solutions SW solutions Dekker's algorithm (Peterson's alogorithm) Dijstra's algorithm, Knuth's algo, Eisenberg and McGuire's algo, Lamport's algo HW solution TestAndSet(TAS) instruction OS supported SW solution Spinlock Semaphore Eventcount/sequencer Language-Level solution Monitor Synchronization Hardware TestAndSet (TAS) instruction Test와 Set을 한번에 수행하는 .. Chapter 06. Process Syncronization and Mutual Exclusion (2of7) - SW solutions Mutual Exclusion Solutions SW solutions Dekker's algorithm (Peterson's alogorithm) Dijstra's algorithm, Knuth's algo, Eisenberg and McGuire's algo, Lamport's algo HW solution TestAndSet(TAS) instruction OS supported SW solution Spinlock Semaphore Eventcount/sequencer Language-Level solution Monitor Dekker's Algorigthm Two process ME을 보장하는 최초의 알고리즘 flag와 turn 둘 다 사용. /.. Chapter 06. Process Syncronization and Mutual Exclusion (1of7) - Instruction 프로세스 동기화 & 상호배제 Process Syncronization (동기화) 다중 프로그래밍 시스템 여러 프로세스들 존재 프로세스들은 서로 독립적으로 동작 (동시에 동작) 공유 자원 또는 데이터가 있을 때, 문제 발생 가능 (둘이 대화로 풀어야한다) (대화하는 작업이 동기화) 동기화 (Syncronzation) 프로세스들이 서로 동작을 맞추는 것 프로세스들이 서로 정보를 공유하는 것 Asyncronous and Concurrent P's 비동기적 (Asyncronous) 프로세스들이 서로에 대해 모름 병행적 (Concurrent) 여러 개의 프로세스들이 동시에 시스템에 존재 병행 수행중인 비동기적 프로세스들이 공유 자원에 동시에 접근할때 문제가 발생할 수 있음 Terminologies (용어정.. Chapter 05. Process Scheduling (4of4) - MLQ, MFQ 목차 기본 스케줄링 알고리즘들 FCFS (First-Come-First-Service) RR (Round-Robin) SPN (Shortest-Process-Next) SRTN (Shortest Remaining Time Next) HRRN (High-Response-Ratio-Next) MLQ (Multi-level Queue) MFQ (Multi-level Feedback Queue) MLQ (Multi-level Queue) 여러개의 ready queue 작업(or 우선순위)별 별도의 ready queue를 가짐 최초 배정된 queue를 벗어날 수 없음 각각 queue는 자신만의 스케줄링 기법 사용 Queue 사이에는 우선순위 기반의 스케줄링 사용 ex) fixed-priority preemptiv.. Chapter 05. Process Scheduling (3of4) - SPN, SRTN, HRRN 목차 기본 스케줄링 알고리즘들 FCFS (First-Come-First-Service) RR (Round-Robin) SPN (Shortest-Process-Next) SRTN (Shortest Remaining Time Next) HRRN (High-Response-Ratio-Next) MLQ (Multi-level Queue) MFQ (Multi-level Feedback Queue) SPN (Shortest-Process-Next) Non-preemptive scheduling 스케줄링 기준 (Critia) 실행시간 (burst time 기준) burst time이 가장 작은 프로세스를 먼저 처리 SJF (Shortest Job First) scheduling 장점 평균 대기시간(WT) 최소화 시스.. Chapter 05. Process Scheduling (2of4) - FCFS, RR 목차 기본 스케줄링 알고리즘들 FCFS (First-Come-First-Service) RR (Round-Robin) SPN (Shortest-Process-Next) SRTN (Shortest Reamining Time Next) HRRN (High-Response-Ratio-Next) MLQ (Multi-level Queue) MFQ (Multi-level Feedback Queue) FCFS (First-Come-First-Service) 선착순 알고리즘 Non-preemptive scheduling 스케줄링 기준 (Critia) (ready queue에)도착시간 자원을 효율적으로 사용 가능 (High resource utilization) why ? 오는대로 그냥 무지성으로 넣어버려 불필요한 스케.. 이전 1 2 다음