Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 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 |
| 31 |
Tags
- botw
- 자 이제 시작이야
- 파란 장미
- 글루민
- 노가다
- 핀토스 프로젝트 4
- 핀토스 프로젝트 3
- 글리치
- 셋업
- multi-oom
- Project 1
- 일지 시작한 지 얼마나 됐다고
- 황금 장미
- 핀토스 프로젝트
- 마일섬
- alarm clock
- 아직도 실험 중
- 끝
- 핀토스 프로젝트 2
- 내일부터
- 핀토스 프로젝트 1
- 바빠지나?
- PINTOS
Archives
- Today
- Total
거북이의 쉼터
(2022.02.18) Extend File Descriptor 구현 (3/3) 본문
1. 서론 및 필요 내용 설명
아 실행하기 정말 쫄린다. 일단 Make.vars를 수정하고 실행을 해 보자.
2. 구현해야 하는 것
Extra 프로젝트를 끝내보자.
3. 디버깅
일단 Make.vars를 수정해야 make를 할 때 extra 프로젝트 검사 스크립트가 돌아간다. 우선은 나머지 테스트 케이스는 옆으로 치워두고 dup2-simple, dup2-complex 부터 집중하도록 스크립트를 변경하자. 실행한다.
pass tests/userprog/dup2/dup2-complex
pass tests/userprog/dup2/dup2-simple
통과하네? 왜 아무 문제 없이 동작하는거지? 그럼 multi-oom를 테스트하자.
pass tests/userprog/no-vm/multi-oom
????? 왜냐???? 내 코드에 아무런 문제가 없다고? 그럴리 없어. 전체 실행 make check 딱대.

진짜냐? 테스트 케이스를 개별 실행해서 동태를 보자.
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
Kernel command line: -q -f put dup2-complex put sample.txt run dup2-complex
0 ~ 9fc00 1
100000 ~ 13e0000 1
Pintos booting with:
base_mem: 0x0 ~ 0x9fc00 (Usable: 639 kB)
ext_mem: 0x100000 ~ 0x13e0000 (Usable: 19,328 kB)
Calibrating timer... 314,163,200 loops/s.
hd0:0: detected 329 sector (164 kB) disk, model "QEMU HARDDISK", serial "QM00001"
hd0:1: detected 20,160 sector (9 MB) disk, model "QEMU HARDDISK", serial "QM00002"
hd1:0: detected 125 sector (62 kB) disk, model "QEMU HARDDISK", serial "QM00003"
Formatting file system...done.
Boot complete.
Putting 'dup2-complex' into the file system...
Putting 'sample.txt' into the file system...
Executing 'dup2-complex':
(dup2-complex) open "sample.txt"
(dup2-complex) open "sample.txt"
(dup2-complex) first dup2()
Pintos is funny
child: exit(110)
(dup2-complex) Parent success
dup2-complex: exit(0)
Execution of 'dup2-complex' complete.
Timer: 80 ticks
Thread: 34 idle ticks, 43 kernel ticks, 3 user ticks
hd0:0: 0 reads, 0 writes
hd0:1: 207 reads, 321 writes
hd1:0: 125 reads, 0 writes
Console: 1042 characters output
Keyboard: 0 keys pressed
Exception: 0 page faults
Powering off...
multi-oom 개별 테스트도 일부 수정해서 검사한 결과 EXTRA2 선언이 잘 된 것으로 나온다.
int
main (int argc UNUSED, char *argv[] UNUSED) {
msg ("begin");
#ifdef EXTRA2
msg("Extra");
#endif
int first_run_depth = make_children ();
CHECK (first_run_depth >= EXPECTED_DEPTH_TO_PASS, "Spawned at least %d children.", EXPECTED_DEPTH_TO_PASS);
for (int i = 0; i < EXPECTED_REPETITIONS; i++) {
int current_run_depth = make_children();
if (current_run_depth < first_run_depth) {
fail ("should have forked at least %d times, but %d times forked",
first_run_depth, current_run_depth);
}
}
msg ("success. Program forked %d iterations.", EXPECTED_REPETITIONS);
msg ("end");
}
Boot complete.
Putting 'multi-oom' into the file system...
Executing 'multi-oom':
(multi-oom) begin
(multi-oom) Extra
child_6_X: exit(-1)
child_7_X: exit(-1)
child_8_X: exit(-1)
child_9_X: exit(-1)
child_10_X: exit(-1)
...
child_1_O: exit(50)
child_0_O: exit(50)
(multi-oom) success. Program forked 10 iterations.
(multi-oom) end
multi-oom: exit(0)
Execution of 'multi-oom' complete.
별다른 문제 발견이 안된다. 진짜 이걸 원트에 끝낸다고? ㅋㅋㅋㅋㅋㅋ 좀 허무하지만 그래... 어제 고생 많이 했지. 다음 포스팅부터는 이제 프로젝트 3을 보자.
4. 후기

이럴 거였으면 어제 포스팅 때 끝냈지... 오늘은 놀러 갑니다.
'코딩 삽질 > KAIST PINTOS (CS330)' 카테고리의 다른 글
| (2022.02.22) Memory Mgmt 가이드라인 (1/2) (0) | 2022.02.22 |
|---|---|
| (2022.02.20) 프로젝트 3 Introduction 맛보기 (1) | 2022.02.20 |
| (2022.02.17) Extend File Descriptor 구현 (2/3) (0) | 2022.02.17 |
| (2022.02.17) Extend File Descriptor 구현 (1/3) (0) | 2022.02.17 |
| (2022.02.16) Extend File Descriptor 가이드라인 (0) | 2022.02.16 |
Comments