04. Process
프로그램이 만들어지는 과정
소스 코드 -> 목적 파일 -> 실행 파일 -> 메모리
compiler / linker / loader
컴파일러
목적 파일 Object file
링커 Linker
컴파일러와 링커는 시스템 종속적
로더 Loader
Runtime System
C Runtime System Program Execution
프로세스 추상화
1. Execution Unit 실행 유닛
2. Protection Domain
프로세스 보완 도구
1. Program Counter 프로그램 카운터
2. Stack 스택
3. Data Section
메모리 구조
exec
Process State
1. New
2. Running
3. Waiting
4. Ready
5. Terminated
Ready Queue
Waiting Queue
Running Queue
프로세스 상태 변화
Prostate (xv6)
1. 메로리 사이즈
2. 페이지 테이블
3. 커널 스택의 마지막 주소
4. 프로세스 상태
5. pid
6. 부모 프로세스
7. 트랩 프레임
8. chan
9. killed
10. open files
11. 현재 주소
12. 프로세스 이름
PCB Process Control Block
1. process state
2. program counter
3. CPU Registers
4. CPU Scheduling Information
5. Momory Management Information
6. Accounting Information
7. I/O Status Information
문맥 전환 Context Switch
CISC vs RISC
Process Creation
fork() (xv6)
1. 프로세스 초기화
2. eax 초기화
Process Termination
Cooperation Process 장점