Blue-club / pintos_6

Other
0 stars 3 forks source link

[Project2-2] User Program(wnstn819) #14

Closed wnstn819 closed 1 year ago

wnstn819 commented 1 year ago

✅ Implement TODO

👾 실행 결과

image

exit와 halt 실행은 되는데, make check를 하면 fail이 나옴 => write를 구현하지 않아서 fail이 나온다고 해서 write를 먼저 간단하게 구현하고 넘어갈 예정

⭐️ 보완할 점

wnstn819 commented 1 year ago

image

write 작성하니까 통과함

wnstn819 commented 1 year ago

테스트 방법

halt()

pintos -v -k -T 60 -m 20   --fs-disk=10 -p tests/userprog/halt:halt -- -q   -f run halt < /dev/null 2> tests/userprog/halt.errors > tests/userprog/halt.output
perl -I../.. ../../tests/userprog/halt.ck tests/userprog/halt tests/userprog/halt.result

exit()

pintos -v -k -T 60 -m 20   --fs-disk=10 -p tests/userprog/exit:exit -- -q   -f run exit < /dev/null 2> tests/userprog/exit.errors > tests/userprog/exit.output
perl -I../.. ../../tests/userprog/exit.ck tests/userprog/exit tests/userprog/exit.result
wnstn819 commented 1 year ago

thread.c에서 duplicate_pte 함수에

t->fdt = palloc_get_multiple(PAL_ZERO, FDT_PAGES); => 을 쓰면 이때까지 했던 핀토스가 터지게 된다.

t->fdt = palloc_get_page(PAL_ZERO); => 이걸 써야 test들이 성공함