Pintos Project 1 한국어 설명서 (design report) - Alarm clock, Priority Scheduling, Advanced Scheduling
- 최초 등록일
- 2024.06.15
- 최종 저작일
- 2023.09
- 38페이지/
어도비 PDF
- 가격 8,000원
![할인쿠폰받기](/images/v4/document/ico_det_coupon.gif)
소개글
pintos 1을 한국어로 쉽게 설명해놓은 design 보고서입니다.
방대한 파일의 코드들 중, 어느 부분을 어떻게 고쳐야 할지 관련 개념과 함께 설명되어 있습니다.
목차
0. analysis
0.1. thread
0.1.1. struct thread
0.1.2. thread functions
- [thread 시작 관련 function]
- [thread 관리 function]
- [thread 동작 관련 function]
- [scheduling function]
- [timer 관련 function]
0.1.3. list
- [list function]
0.1.4. how to switch thread
0.2. synchronization
0.2.1. meaning of synchronization
0.2.2. disabling interrupts
0.2.2.1. meaning of disabling interrupts
0.2.2.2. caution
0.2.2.3. implement
0.2.3. semaphore
0.2.3.1. meaning of semaphore
0.2.3.2. implementation
0.2.4. lock
0.2.4.1. meaning of lock
0.2.4.2. implementation
0.2.5. condition
0.2.5.1. meaning of condition
0.2.5.2. implementation
0.2.6. interrupt handling
0.2.6.1. external interrupt handling
1. alarm clock
1.1. current implementation
1.1.1. timer.c functions
1.1.2. busy-waiting
1.2. new implementation
2. priority scheduling
2.1. current implementation
2.2. new implementation
2.2.1. priority scheduling modification
2.2.2. synchronization modification
2.2.3. priority donation modification
3.advanced scheduling
3.1. MLFQS
3.2. Priority scheduling
3.2.1. ready queue 관리
3.2.2. priority 관리
3.2.3. priority 계산
3.3. fixed-point arithmetic
3.4. implementation
본문내용
0.1. thread
pintos에서는 thread creation과 thread completion, Round-Robin 방식의 thread switching(simple scheduler)을 이미 구현해 두었다.
0.1.1. struct thread
kernel thread의 struct는 “threads/thread.h”에 선언되어 있다.
thread structure은 4kB page를 차지한다. struct thread는 page of memory의 시작부터 공간을 차지한다. page의 나머지 부분은 thread의 stack을 위해 이용되는데, 이는 end of the page로부터 아래쪽 방향으로 내려가며 진행된다.
따라서 kernel stack을 위한 공간을 위해 struct thread는 너무 크기가 크면 안 된다. base struct thread는 1kB 미만이어야 한다. 그리고 kernel stack도 너무 크면 안 된다. stack에서 overflow가 발생하면 thread state를 침범할 것이므로 kernel function은 struct와 array에 non-static local variable 같이 너무 많은 공간을 할당하지 않고, malloc()이나 palloc_get_page() 같은 동적 할당 function을 써야 한다.
[Member of struct thread]
tid_t tid
thread identifier를 뜻한다. 각 thread를 분간한다. 현재는 int 자료형에 1부터 numbering되게끔 짜여져 있다.
참고 자료
한양대 pintos 자료, postech pintos 자료