본문 바로가기

OS4

[Operating System Concepts] Chapter6 Synchronization Tools (Part.2) Why mutex, semaphore, monitor? Mutex Lock Semaphore Monitor - Example Situations Liveness Why mutex, semaphore, monitor? 상호배제 알고리즘과 세마포어 그리고 모니터를 통해 Race Condition를 쉽게 방지할 수 있다. Higher level software tools for Critical Section Problem (Mutex Locks) : 동기화 조건을 만족시키는데 있어서 가장 쉬운 방법중 하나이다. (락킹하고 열쇠를 받고 사용한다음 반납하기) Mutex Locks Limitation: 동기화 이슈 (2개의 프로세스 밖에 제어못한다.) Semaphore : 제일 보편적인 락킹 (N개를 제어할 수 있.. 2023. 11. 6.
[Operating System Concepts] Chapter5 CPU Scheduling CPU Scheduling Preemptive vs. Non-Preemptive Dispatcher Scheduling Criteria (Turnaround time, Waiting time...) Scheduling algorithm FCFS (First Come First Serve) SJF (Shortest Job First) SRTF(Shortest Remaining Time First ,Preemptive SJF) RR (Round Robin) Extra Scheduling algorithm (Priority-base Scheduling, MLQ, MLFQ) CPU Scheduling 여러개의 프로세스가 동시에 메모리에 로드된 프로그램(멀티 프로그래밍)에 있어서 여러개의 프로세스가 로드되어 있고.. 2023. 11. 2.
[Operating System Concepts] Chapter4 Thread & Concurrency Overview Multicore Programming Multithreading Model POSIX thread(pthread) Implicit Threading Overview 지금까지 하나의 프로세스의 single thread control에 다루었다. 복제할 필요없이 하나의 프로세스에서 다른 스레드를 생성하는 방식으로 만들었다. Thread (=LWP : Light weight process) cpu 를 점유하는 가장 작은 단위가 스레드가 된다. process id(pid) 가 cpu를 점유하는게 아니라 thread id(tid)가 cpu를 점유한다. program counter, register set, stack또한 스레드 단위로 달라진다. 한 프로세스 내부에서 생긴 스레드들은 code / .. 2023. 10. 31.
[Operating System Concepts] Chapter1, 2 Introduction & OS Structures 1. What is OS ? 2. 운영체제의 전체적인 방향 What is OS? 컴퓨터는 정보를 처리하는 장치이다. 계산기와는 서로다른 특성을 보인다. 정보의 최소 단위 : bit(binary digit) 정보의 처리: 정보의 상태 변환 (0 -> 1, 1 -> 0) bool 대수, 논리 게이트, 논리 회로 등으로 정보를 처리한다. 컴퓨터는 범용성(universality)와 계산가능성(computability)의 특성을 가지고 있다. 범용성 NOT, AND , OR 게이트만으로 모든 계산이 가능함 NAND 게이트만으로 모든 계산을 할 수 있다. 범용 컴퓨터 : general-purpose computer 계산가능성 Turing-computable : 튜링 머신으로 계산 가능한 것 정지 문제(Halting.. 2023. 10. 25.
반응형