본문 바로가기
728x90
반응형

pintos23

pintOS | Project 3 | Stack Growth 프로젝트 3을 정리하면서 계속 말했던 부분은 메모리를 할당할 때, 필요로 하는 페이지를 요청할 때 필요한 만큼 페이지를 할당해준다는 것이다. 여기서는 전 포스팅에서 다뤘던 vm_try_handle_fault() 함수에 대해서 더 자세하게 다룰 것이다. pintOS | Project 3 | Anonymouse Page pintOS | Project 3 | Anonymouse Page pintOS | Project 3 | Memory Management Anonymous page 파트에서는 anonymous page라고 불리는 비디스크 기반(non-disk based) 이미지를 구현할 것이다. 라고 깃북에 적혀 있다. anonymous 매핑은 백업 파일이나.. dapsu-startup.tistory.com .. 2021. 10. 20.
pintOS | Project 3 | Anonymouse Page pintOS | Project 3 | Memory Management Anonymous page 파트에서는 anonymous page라고 불리는 비디스크 기반(non-disk based) 이미지를 구현할 것이다. 라고 깃북에 적혀 있다. anonymous 매핑은 백업 파일이나 장치가 없다. file-backed page와는 달리 명명된 파일 소스가 없기 때문에 anonymous이다. 즉 anonymous page는 스택, 힙 같은 실행 파일에서 사용된다. anonymous page 구조체는 include/vm/anon.h 에 있다. struct anon_page { }; 응. 역시 있네. 껍데기만 ㅋ 일단 깃북 먼저 더 읽어보고 뭘 채워야 하는지 봐야겠다. 전 포스팅에서 페이지 유형 3가지를 말했었다. .. 2021. 10. 19.
pintOS | Project 3 | Memory Management 프로젝트 3-1 Memory management에서는 효율적으로 페이지와 프레임을 관리하는 것에 대해 구현할 것이다. 사용되고 있는 가상/물리 메모리 영역에 대해 추적해야 한다는 것. 먼저 supplemental page table(spt), 그리고 physical frame을 다룰 것이다. 먼저 page 구조체가 어떻게 생겨먹었는지 확인해보자. page는 include/vm/vm.h에 있음 struct page { const struct page_operations *operations; void *va; /* Address in terms of user space */ struct frame *frame; /* Back reference for frame */ union { struct uninit_.. 2021. 10. 17.
정글에서 살아남기| WEEK10 | 가상 메모리 너무 어렵다 프로젝트 2를 겨우 끝냈다. 그것도 extra 부분까지 다 구현해서 테스트 케이스 97개를 모두 pass했다. 하지만 과연 올패스를 하는 것만으로 만족해야 하는걸까? 나는 정말 핀토스 user program 부분들을 모두 이해했을까? pintos는 카이스트에서는 원래 한 학기에 걸쳐서 진행하는 프로젝트라고 한다. 심지어 전공 학생들도 매우 힘들어 하고 제일 싫어하는 과목이라고 한다. (교수님피셜임 ㅋㅋㅋ) 교수님 강의를 들을 때, 홍욱이형이 "비전공자 입장에서 핀토스를 공부하고 있는데, 어떤 부분에 초점을 맞춰서 공부를 해야 하는지?" 라는 질문을 했었고, 교수님께서는 "학생일 때, 이 정도로 길고 복잡한 코드량을 경험하기 드물다. 이 코드들을 읽으면서 이해하고 배치할 줄 아는 것이 pintos의 목적 .. 2021. 10. 17.
pintOS | Project 3 | Introduction pintos-kaist project 3 gitbook ↓ Introduction · GitBook Locate the page that faulted in the supplemental page table. If the memory reference is valid, use the supplemental page table entry to locate the data that goes in the page, which might be in the file system, or in a swap slot, or it might simply be an al casys-kaist.github.io ※ 해석 내 멋대로임. 수정 및 보완 부분 있으면 알려주세여 Project 3: Virtual Memory 프로젝.. 2021. 10. 14.
pintOS | Project 2 회고 1. project2 목표 pintos-kaistproject2 git book Introduction · GitBook Project2: User Programs Now that you've worked with Pintos and are becoming familiar with its infrastructure and thread package, it's time to start working on the parts of the system that allow running user programs. The base code already supports loading casys-kaist.github.io 프로젝트2의 주제는 User Progams이다. 프로젝트 1에서 구현했던 것들은 모두 커널에서.. 2021. 10. 14.
pintOS | Project 2 | 시스템 콜 (extra) intOS | Project 2 | 시스템콜 구현 (halt, exit, exec, create, remove, open, filesize) pintOS | Project 2 | 시스템콜 구현 (fork, wait, read, write, seek, tell, close) 지난 주에 이어서 마지막 Extend File Descriptor(Extra) 부분 도전! extra 부분을 테스트하기 위해서는 uesrprg/Make.vars 라는 파일에서 몇 가지 수정을 해야 한다. # -*- makefile -*- os.dsk: DEFINES = -DUSERPROG -DFILESYS KERNEL_SUBDIRS = threads tests/threads tests/threads/mlfqs KERNEL_SUBDIRS.. 2021. 10. 14.
pintOS | Project 2 | 시스템콜 구현 (fork, wait, read, write, seek, tell, close) pintOS | Project 2 | 시스템콜 구현 (halt, exit, exec, create, remove, open, filesize) pintOS | Project 2 | 시스템콜 구현 (halt, exit, exec, create, remove, open, filesize) pintOS | 명령어 실행 기능 구현(Command Line Parsing) (수정 중) pintOS | 명령어 실행 기능 구현(Command Line Parsing) pintos project2 설명 보기 프로젝트1에서 실행했던 alarm clock, scheduling 등 모든.. dapsu-startup.tistory.com 저번 글에 이어 시스템 콜 구현 계속 작성 ㄱㄱ 일단 시스템콜 핸들러 함수를 다시 한 번 보.. 2021. 10. 13.
pintOS | Project 2 | 시스템콜 구현 (halt, exit, exec, create, remove, open, filesize) pintOS | 명령어 실행 기능 구현(Command Line Parsing) (수정 중) pintOS | 명령어 실행 기능 구현(Command Line Parsing) pintos project2 설명 보기 프로젝트1에서 실행했던 alarm clock, scheduling 등 모든 코드들은 전부 커널의 일부였고, 테스트 코드 또한 커널에 직접 컴파일했었다. 이제부터는 유저 프로그램을 실행하여 dapsu-startup.tistory.com 이전 포스팅에서 pintos의 커맨드라인에서 인자를 파싱하고 패싱할 수 있도록 구현을 했다. 하지만 아직 시스템콜 핸들러가 구현되어 있지 않기 때문에 시스템콜이 호출되지 않고, 응용프로그램을 실행할 수 없다. 그렇다면 시스템 콜이 뭘까? 운영체제에는 사용자 모드(Use.. 2021. 10. 11.
728x90
반응형