본문 바로가기
728x90

운영체제22

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.
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.
pintOS | Project 2 | 명령어 실행 기능 구현(Command Line Parsing) pintos project2 설명 보기 프로젝트1에서 실행했던 alarm clock, scheduling 등 모든 코드들은 전부 커널의 일부였고, 테스트 코드 또한 커널에 직접 컴파일했었다. 이제부터는 유저 프로그램을 실행하여 운영체제를 테스트한다. 그러나 현재 pintos는 커맨드 라인에 명령어를 작성하면, 프로그램 이름과 인자를 구분하지 못 하고 적은 명령어 전체를 하나의 프로그램으로 인식하게 구현되어 있다. 즉 프로그램과 인자를 구분하여 파싱하고 패싱할 수 있도록 하는 것이 이번 목표다. (e.g. ls -l 이라는 명령어를 적었을 때, ls 와 -l을 구분하지 못 하고 'ls -l'을 하나의 프로그램 명으로 인식) pintos에 이미 구현되어 있는 코드를 보면서 먼저 프로그램의 실행이 어떻게 되는.. 2021. 10. 7.
728x90
LIST