일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- Oracle
- 우선순위
- 스레드
- concurrency
- 컴퓨터구조
- Algorithm
- 부동소수점
- 교착상태
- 스케줄링
- 추상화
- mutex
- 운영체제
- 페이징
- 단편화
- 동기화
- 가상 메모리
- 페이지 대치
- BOJ
- fork()
- 백준
- 기아 상태
- mips
- PYTHON
- 세마포어
- 트랩
- ALU
- 프로세스
- 알고리즘
- 인터럽트
- 페이지 부재율
- Today
- Total
목록Computer Science & Engineering/Operating System (51)
봉황대 in CS
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. CPU 스케줄링 (CPU Scheduling) 다중 프로그래밍은 CPU가 실행 중인 프로그램을 항상 가지게 하여 CPU 이용률 최대화하기 위한 것이다. 이를 위해서는 현재 실행 상태에 있던 프로세스가 다른 상태로 천이하게 된다면 즉, CPU가 유휴 상태가 될 때마다 운영체제는 그 프로세스로부터 CPU를 회수하고, 실행 상태로 천이시킬 프로세스를 선정하여 할당하여야 한다. 실행할 프로세스를 선택하는 절차는 CPU 스케줄러에 의해 수행되며, 준비 큐(ready queue)에 들어있는 프로세스들 중 하나를 선택하게 ..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. 스케줄러 (Scheduler) 컴퓨터가 가진 자원은 한정되어 있고, 이를 여러 프로세스가 효율적으로 사용하기 위해서는 스케줄러(Scheduler)가 필요하다. 스케줄러는 다음 실행 시간에 실행할 수 있는 프로세스들 중 하나를 선택해주는 역할을 해준다. 스케줄러에는 3가지 종류(장기, 중기, 단기 스케줄러)가 있다. 장기 스케줄러 (Long-term scheduler) / 작업 스케줄러 (Job scheduler) 어느 프로그램을 하드 디스크로부터 메모리로 적재할지를 결정하는 스케줄러 일괄처리(batch) 큐를 ..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. Windows 스레드 각 프로세스는 한 개 또는 그 이상의 스레드를 가질 수 있다. CreateProcess() API를 통해서 스레드를 생성하며, * 참고 : 2022.07.09 - [Computer Science/Operating System] - [Chapter 3. 프로세스] 프로세스 생성과 종료 일대일 대응을 통해 사용자 수준 스레드 하나마다 커널 스레드 하나가 대응된다. Windows 스레드는 3가지 자료구조를 가지며, 다음의 항목들에 대한 정보를 저장하고 있다. 1. ETHREAD (executiv..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. 다중 스레드 프로그램 설계 시 발생하는 문제들이 있다. 여기서는 관련 여러 문제들과 각각에 대한 해결책을 소개한다. fork() 및 exec() 시스템 호출 한 프로세스가 여러 스레드를 가지고 있는 상태라고 하자. 만약 그중 한 스레드가 프로세스를 생성하는 시스템 콜인 fork()를 호출하게 된다면 새로운 프로세스는 모든 스레드를 복제해야 할까, 아니면 해당 스레드 하나만 가지는 프로세스여야 할까?? fork() 뿐만 아니라 만약 exec() 시스템 콜이었다면 프로세스는 어떻게 조치를 취해야 할까?? 1. ex..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. 암묵적 스레딩 (Implicit Threading) 스레드의 생성과 관리에 대한 책임을 컴파일러와 실행시간 라이브러리에게 넘겨주는 것을 말한다. ( ↔︎ 명시적 스레딩 : 개발자가 API를 통해 직접 스레드를 관리 ) 암묵적 스레딩은 개발자의 다중 스레드 응용 프로그램의 설계를 도와주는 한 가지 방법이며, 책에서는 이에 대한 3가지 접근법을 소개하고 있다. 스레드 풀(pool) 새로운 스레드를 매 요청마다 만들어주게 될 경우 아래와 같은 문제들이 발생한다. 1. 스레드를 생성하는 데에는 시간 소요가 발생 2. ..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. 앞서 실행 중인 프로그램을 뜻하는 프로세스에 대하여 배웠다. 프로세스는 단 하나의 진행 플로우를 갖고 있기 때문에 굉장히 제한적이다. 또한 시스템 호출을 통해 다른 프로세스를 생성할 때 많은 시간과 자원이 필요하기 때문에 오버헤드가 발생한다. (사용자 수준 문맥의 text 영역만 공유 & data, stack 영역과 커널 수준 문맥 등은 모두 복사하여 생성하기 때문이며, 이 때문에 프로세스는 중량 프로세스, heavy weight process라고도 부른다.) 새 프로세스가 해야 할 일이 기존 프로세스가 하는 ..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. 운영체제 내에서 실행되는 병행 프로세스들은 다음의 두 가지로 구분될 수 있다. 1. 독립적 프로세스 프로세스가 시스템에서 실행 중인 다른 프로세스들에게 영향을 주거나 받지 않는 프로세스 2. 협력적 프로세스 프로세스가 시스템에서 실행 중인 다른 프로세스들에게 영향을 주거나 받는 프로세스 즉, 독립적인 프로세스는 다른 프로세스와 데이터를 공유하지 않으며, 협력적인 프로세스는 공유한다. 협력적 프로세스의 대표적인 예시로는 생산자-소비자 문제(Producer-Consumer Problem)가 있다. 생산자 프로세스는..
* 본 글은 '운영체제(Operating System: Concepts) 9th edition'의 내용과 2021학년도 1학기에 수강한 '운영체제' 과목 강의 내용을 함께 정리하여 작성하였습니다. 프로세스는 한 프로세스에 의해 새로 생성될 수 있으며, 생성된 프로세스는 자신에 의해서(수행을 마쳤을 경우) 또는 외부의 요청에 의해서 종료한다. 프로세스 생성 프로세스는 다른 프로세스를 생성할 수 있다. 이때 프로세스를 생성하는 프로세스를 부모 프로세스라고 하며, 생성된 새로운 프로세스는 자식 프로세스라고 한다. 부모 프로세스와 자식 프로세스는 1:N 관계이기에 전체적으로 트리가 구성된다. 프로세스 각각에게는 고유 번호 즉, 프로세스 식별자(PID)가 할당된다. (보통 정수 값) 위의 트리 그림에서 root..