WEEK 13 PintOS TIL(6월11일 수요일)

Devkty·2025년 6월 12일
post-thumbnail

[목표]
mmap 구현을 해봅니다.
발표자료를 만듭니다.
13주차 퀴즈 오답 노트를 작성합니다.

10:00 ~ 12:00

어제 develop5에 merge한 것을 내가 작성한 코드에 맞게 merge했습니다.

12:00 ~ 13:00

식사를 했습니다.

13:30 ~ 14:30

어제 합친 develop5에 대해 pull을 당겨왔고, 내 코드만 복구하여 make check를 돌려보았다. 놀랍게도 9개의 테스트 케이스가 추가로 통과했다. 뭔가 다른 부분이 복구되면서 개선이 된것 같다.

pass tests/userprog/args-none
pass tests/userprog/args-single
pass tests/userprog/args-multiple
pass tests/userprog/args-many
pass tests/userprog/args-dbl-space
pass tests/userprog/halt
pass tests/userprog/exit
pass tests/userprog/create-normal
pass tests/userprog/create-empty
pass tests/userprog/create-null
pass tests/userprog/create-bad-ptr
pass tests/userprog/create-long
pass tests/userprog/create-exists
pass tests/userprog/create-bound
pass tests/userprog/open-normal
pass tests/userprog/open-missing
pass tests/userprog/open-boundary
pass tests/userprog/open-empty
pass tests/userprog/open-null
pass tests/userprog/open-bad-ptr
pass tests/userprog/open-twice
pass tests/userprog/close-normal
pass tests/userprog/close-twice
pass tests/userprog/close-bad-fd
pass tests/userprog/read-normal
pass tests/userprog/read-bad-ptr
pass tests/userprog/read-boundary
pass tests/userprog/read-zero
pass tests/userprog/read-stdout
pass tests/userprog/read-bad-fd
pass tests/userprog/write-normal
pass tests/userprog/write-bad-ptr
pass tests/userprog/write-boundary
pass tests/userprog/write-zero
pass tests/userprog/write-stdin
pass tests/userprog/write-bad-fd
pass tests/userprog/fork-once
pass tests/userprog/fork-multiple
pass tests/userprog/fork-recursive
pass tests/userprog/fork-read
pass tests/userprog/fork-close
pass tests/userprog/fork-boundary
pass tests/userprog/exec-once
pass tests/userprog/exec-arg
pass tests/userprog/exec-boundary
pass tests/userprog/exec-missing
pass tests/userprog/exec-bad-ptr
pass tests/userprog/exec-read
pass tests/userprog/wait-simple
pass tests/userprog/wait-twice
pass tests/userprog/wait-killed
pass tests/userprog/wait-bad-pid
pass tests/userprog/multi-recurse
pass tests/userprog/multi-child-fd
pass tests/userprog/rox-simple
pass tests/userprog/rox-child
pass tests/userprog/rox-multichild
pass tests/userprog/bad-read
pass tests/userprog/bad-write
pass tests/userprog/bad-read2
pass tests/userprog/bad-write2
pass tests/userprog/bad-jump
pass tests/userprog/bad-jump2
pass tests/vm/pt-grow-stack
pass tests/vm/pt-grow-bad
pass tests/vm/pt-big-stk-obj
pass tests/vm/pt-bad-addr
pass tests/vm/pt-bad-read
pass tests/vm/pt-write-code
FAIL tests/vm/pt-write-code2
FAIL tests/vm/pt-grow-stk-sc
pass tests/vm/page-linear
pass tests/vm/page-parallel
pass tests/vm/page-merge-seq
pass tests/vm/page-merge-par
FAIL tests/vm/page-merge-stk
FAIL tests/vm/page-merge-mm
pass tests/vm/page-shuffle
FAIL tests/vm/mmap-read
FAIL tests/vm/mmap-close
FAIL tests/vm/mmap-unmap
FAIL tests/vm/mmap-overlap
FAIL tests/vm/mmap-twice
FAIL tests/vm/mmap-write
FAIL tests/vm/mmap-ro
FAIL tests/vm/mmap-exit
FAIL tests/vm/mmap-shuffle
pass tests/vm/mmap-bad-fd
FAIL tests/vm/mmap-clean
FAIL tests/vm/mmap-inherit
FAIL tests/vm/mmap-misalign
FAIL tests/vm/mmap-null
FAIL tests/vm/mmap-over-code
FAIL tests/vm/mmap-over-data
FAIL tests/vm/mmap-over-stk
FAIL tests/vm/mmap-remove
pass tests/vm/mmap-zero
pass tests/vm/mmap-bad-fd2
pass tests/vm/mmap-bad-fd3
pass tests/vm/mmap-zero-len
FAIL tests/vm/mmap-off
FAIL tests/vm/mmap-bad-off
FAIL tests/vm/mmap-kernel
FAIL tests/vm/lazy-file
pass tests/vm/lazy-anon
FAIL tests/vm/swap-file
FAIL tests/vm/swap-anon
FAIL tests/vm/swap-iter
pass tests/vm/swap-fork
pass tests/filesys/base/lg-create
pass tests/filesys/base/lg-full
pass tests/filesys/base/lg-random
pass tests/filesys/base/lg-seq-block
pass tests/filesys/base/lg-seq-random
pass tests/filesys/base/sm-create
pass tests/filesys/base/sm-full
pass tests/filesys/base/sm-random
pass tests/filesys/base/sm-seq-block
pass tests/filesys/base/sm-seq-random
pass tests/filesys/base/syn-read
pass tests/filesys/base/syn-remove
pass tests/filesys/base/syn-write
pass tests/threads/alarm-single
pass tests/threads/alarm-multiple
pass tests/threads/alarm-simultaneous
pass tests/threads/alarm-priority
pass tests/threads/alarm-zero
pass tests/threads/alarm-negative
pass tests/threads/priority-change
pass tests/threads/priority-donate-one
pass tests/threads/priority-donate-multiple
pass tests/threads/priority-donate-multiple2
pass tests/threads/priority-donate-nest
pass tests/threads/priority-donate-sema
pass tests/threads/priority-donate-lower
pass tests/threads/priority-fifo
pass tests/threads/priority-preempt
pass tests/threads/priority-sema
pass tests/threads/priority-condvar
pass tests/threads/priority-donate-chain
FAIL tests/vm/cow/cow-simple
29 of 141 tests failed.

14:30 ~ 15:50

어제 쓴 TIL에 대해 정리해보고 깃허브를 어떻게 사용하는지에 대해 생각을 해보았습니다. 솔직히 정리할게 많지만 다음주 중에 정리해보도록 하고, 지금은 mmap에 집중하여 테스트 케이스를 통과하는데에 집중해보겠습니다.

15:50 ~ 18:00

mmap를 기윤님 코드를 보면서 이해를 하고, 작성해보았습니다. 어제 작성을 해보았지만, 잘 작동하지 않아서 수정을 해야될 것 같습니다.

vm/file.c

do_mmap

mmap을 수행하는 주요 코드입니다. 이번 mmap은 process.c에 있는 load_segment 함수를 참고하여 작성하면 좋습니다.

/* Do the mmap */
// mmap 관련 기능입니다.
void *
do_mmap (void *addr, size_t length, int writable,
		struct file *file, off_t offset) {
			off_t file_ofs;
			
	//printf("addr: %d, length: %d, writable:%d, file: %d, file_ofs: %d\n", addr, length, writable, file, file_ofs);
	void *backup_addr = addr;
	addr = pg_round_down(addr);
	off_t total_len = file_length(file);
	//printf("total_len: %d\n",total_len);
	uint32_t read_bytes = total_len - offset;
	uint32_t zero_bytes = ROUND_UP(read_bytes, PGSIZE) - read_bytes;
	off_t ofs = offset;
	uint8_t * upage = addr;

	while (read_bytes > 0 || zero_bytes > 0){
	size_t page_read_bytes = read_bytes < PGSIZE ? read_bytes : PGSIZE;
	size_t page_zero_bytes = PGSIZE - page_read_bytes;
	
	struct mmap_file *mmap = calloc(1, sizeof(struct mmap_file));
	mmap -> addr = addr;
	// mmap -> length = length;
	mmap -> writable = writable;
	mmap -> file = file;
	mmap -> ofs = ofs;
	mmap -> read_bytes = page_read_bytes;
	mmap -> zero_bytes = page_zero_bytes;

	if(!vm_alloc_page_with_initializer(VM_FILE, addr, writable, lazy_load_mmap, mmap)) {
		return false;
	}
	// vm_alloc_page()

	read_bytes -= page_read_bytes;
	zero_bytes -= page_zero_bytes;
	upage += PGSIZE;
	/* file_read를 하지 않기 때문에 수동으로 ofs을 이동시켜줘야 한다. */
	ofs += page_read_bytes;
	}
	return backup_addr;
}

물론 위의 mmap구조체를 쓰기 위해서는 상단에 해당 구조체를 선언해줘야합니다.

struct mmap_file {
	int mapid;
	struct file *file;
	void *addr;
	size_t length;
	int writable;
	struct list_elem elem;
	off_t ofs;
	uint32_t read_bytes;
	uint32_t zero_bytes;
};

lazy_load_mmap

그러면 lazy_load_mmap이라는 lazy 페이지를 mmap하는 코드가 필요하게 됩니다. process.c의 lazy_load_segment를 참고하여 다음과 같이 만들어주면 됩니다.

// mmap에서 lazt페이지를 로드한다.
static bool
lazy_load_mmap (struct page *page, void *aux) {
	// printf("mmap lazy load\n");

	uint8_t* upage = page->va;
	uint8_t* kpage = page->frame->kva;
	
	struct mmap_file* mmap = (struct mmap_file*)aux;
	struct file* file = mmap -> file;
	off_t ofs = mmap -> ofs;
	size_t page_read_bytes = mmap -> read_bytes;
	size_t page_zero_bytes = mmap -> zero_bytes;

	ASSERT ((page_read_bytes + page_zero_bytes) % PGSIZE == 0);
	ASSERT (pg_ofs (upage) == 0);
	ASSERT (ofs % PGSIZE == 0);

	/* Do calculate how to fill this page.
		* We will read PAGE_READ_BYTES bytes from FILE
		* and zero the final PAGE_ZERO_BYTES bytes. */

	/* Load this page. */
	if (file_read_at (file, kpage, page_read_bytes, ofs) != (int) page_read_bytes) {
		return false;
	}
	memset (kpage + page_read_bytes, 0, page_zero_bytes);

	file_close(file);
	free(aux);
	return true;
}

do_mmap

그럼 mumap을 구현해봅니다.

/* Do the munmap */
// munamp 관련 기능입니다.
void
do_munmap (void *addr) {
	addr = pg_round_down(addr);
	struct page* munmap = spt_find_page(&thread_current()->spt, addr);

	if (munmap == NULL) {
		return;
	}

	struct list* mapped_pages = munmap -> mmaped_list;
	if(mapped_pages == NULL) {
		return;
	}

	struct list_elem* mapped_page_elem;
	struct page* tmp_page;

	while (!list_empty(mapped_pages)) {
		mapped_page_elem = list_pop_front(mapped_pages);
		tmp_page = list_entry(mapped_page_elem, struct page, mmaped_elem);
		vm_dealloc_page(tmp_page);
	}
	free(mapped_pages);
}

이렇게 하면 될줄 알았는데, 테스트 케이스를 실행해서 하나도 통과안해서 테스트 케이스를 확인을 해봤더니, syscall을 따로 구현해줘야했다.

syscall.c

SYS_MMAP 과 SYS_MUNMAP

void *sys_mmap(void *addr, size_t length, int writable, int fd, off_t offset);
	void munmap(void *addr);

	case SYS_MMAP:
	{
		void *addr = (void *)f->R.rdi;
		size_t length = (size_t)f->R.rsi;
		int writable = (int)f->R.rdx;
		int fd = (int)f->R.r10;
		off_t offset = (off_t)f->R.r8;

		if(is_kernel_vaddr(addr) || is_kernel_vaddr(addr + length))
			break;

		f->R.rax = sys_mmap(addr, length, writable, fd, offset);
		break;
	}

	case SYS_MUNMAP:
	{
		void *addr = (void *)f->R.rdi;

		if(is_kernel_vaddr(addr))
			break;

		sys_munmap(addr);
		break;
	}

sys_mmap 와 sys_munmap

밑에 추가적인 함수 구현은 밑에 작성했습니다.

void *sys_mmap(void *addr, size_t length, int writable, int fd, off_t offset) {
	

	if (fd < 0 || fd >= MAX_FD || thread_current()->fd_table[fd] == NULL)
		return NULL;

	struct file *file = thread_current()->fd_table[fd];
	if (file == NULL)
		return NULL;

	return do_mmap(addr, length, writable, file, offset);
}

void sys_munmap(void *addr) {
	return do_munmap(addr);
}

18:00 ~ 19:00

식사를 했습니다.

19:00 ~ 22:00

시스템 콜을 구현하고, mmap가 정상적으로 되지 않아서 여러 수정을 거졌습니다. 시스템 콜에서 정의가 이상해지는 문제가 있어서 다음과 같은 프로토타입을 선언하여 사용했습니다.

void *sys_mmap(void *addr, size_t length, int writable, int fd, off_t offset);
void munmap(void *addr);

mmap 인자에 다음과 같이 추가했습니다.

mmap -> read_bytes = page_read_bytes;
mmap -> zero_bytes = page_zero_bytes;

그래서 mmap-read는 되는데, 다른 테스트 케이스가 안되서 디버깅 해봐야합니다.

pass tests/userprog/args-none
pass tests/userprog/args-single
pass tests/userprog/args-multiple
pass tests/userprog/args-many
pass tests/userprog/args-dbl-space
pass tests/userprog/halt
pass tests/userprog/exit
pass tests/userprog/create-normal
pass tests/userprog/create-empty
pass tests/userprog/create-null
pass tests/userprog/create-bad-ptr
pass tests/userprog/create-long
pass tests/userprog/create-exists
pass tests/userprog/create-bound
pass tests/userprog/open-normal
pass tests/userprog/open-missing
pass tests/userprog/open-boundary
pass tests/userprog/open-empty
pass tests/userprog/open-null
pass tests/userprog/open-bad-ptr
pass tests/userprog/open-twice
pass tests/userprog/close-normal
pass tests/userprog/close-twice
pass tests/userprog/close-bad-fd
pass tests/userprog/read-normal
pass tests/userprog/read-bad-ptr
pass tests/userprog/read-boundary
pass tests/userprog/read-zero
pass tests/userprog/read-stdout
pass tests/userprog/read-bad-fd
pass tests/userprog/write-normal
pass tests/userprog/write-bad-ptr
pass tests/userprog/write-boundary
pass tests/userprog/write-zero
pass tests/userprog/write-stdin
pass tests/userprog/write-bad-fd
pass tests/userprog/fork-once
pass tests/userprog/fork-multiple
pass tests/userprog/fork-recursive
pass tests/userprog/fork-read
pass tests/userprog/fork-close
pass tests/userprog/fork-boundary
pass tests/userprog/exec-once
pass tests/userprog/exec-arg
pass tests/userprog/exec-boundary
pass tests/userprog/exec-missing
pass tests/userprog/exec-bad-ptr
pass tests/userprog/exec-read
pass tests/userprog/wait-simple
pass tests/userprog/wait-twice
pass tests/userprog/wait-killed
pass tests/userprog/wait-bad-pid
FAIL tests/userprog/multi-recurse
pass tests/userprog/multi-child-fd
pass tests/userprog/rox-simple
pass tests/userprog/rox-child
pass tests/userprog/rox-multichild
pass tests/userprog/bad-read
pass tests/userprog/bad-write
pass tests/userprog/bad-read2
pass tests/userprog/bad-write2
pass tests/userprog/bad-jump
pass tests/userprog/bad-jump2
pass tests/vm/pt-grow-stack
pass tests/vm/pt-grow-bad
pass tests/vm/pt-big-stk-obj
pass tests/vm/pt-bad-addr
pass tests/vm/pt-bad-read
pass tests/vm/pt-write-code
FAIL tests/vm/pt-write-code2
FAIL tests/vm/pt-grow-stk-sc
pass tests/vm/page-linear
pass tests/vm/page-parallel
pass tests/vm/page-merge-seq
pass tests/vm/page-merge-par
FAIL tests/vm/page-merge-stk
FAIL tests/vm/page-merge-mm
pass tests/vm/page-shuffle
pass tests/vm/mmap-read
FAIL tests/vm/mmap-close
pass tests/vm/mmap-unmap
FAIL tests/vm/mmap-overlap
pass tests/vm/mmap-twice
FAIL tests/vm/mmap-write
FAIL tests/vm/mmap-ro
FAIL tests/vm/mmap-exit
FAIL tests/vm/mmap-shuffle
pass tests/vm/mmap-bad-fd
FAIL tests/vm/mmap-clean
FAIL tests/vm/mmap-inherit
FAIL tests/vm/mmap-misalign
pass tests/vm/mmap-null
pass tests/vm/mmap-over-code
pass tests/vm/mmap-over-data
pass tests/vm/mmap-over-stk
FAIL tests/vm/mmap-remove
pass tests/vm/mmap-zero
pass tests/vm/mmap-bad-fd2
pass tests/vm/mmap-bad-fd3
FAIL tests/vm/mmap-zero-len
FAIL tests/vm/mmap-off
pass tests/vm/mmap-bad-off
FAIL tests/vm/mmap-kernel
FAIL tests/vm/lazy-file
pass tests/vm/lazy-anon
FAIL tests/vm/swap-file
FAIL tests/vm/swap-anon
FAIL tests/vm/swap-iter
pass tests/vm/swap-fork
pass tests/filesys/base/lg-create
pass tests/filesys/base/lg-full
pass tests/filesys/base/lg-random
pass tests/filesys/base/lg-seq-block
pass tests/filesys/base/lg-seq-random
pass tests/filesys/base/sm-create
pass tests/filesys/base/sm-full
pass tests/filesys/base/sm-random
pass tests/filesys/base/sm-seq-block
pass tests/filesys/base/sm-seq-random
pass tests/filesys/base/syn-read
pass tests/filesys/base/syn-remove
pass tests/filesys/base/syn-write
pass tests/threads/alarm-single
pass tests/threads/alarm-multiple
pass tests/threads/alarm-simultaneous
pass tests/threads/alarm-priority
pass tests/threads/alarm-zero
pass tests/threads/alarm-negative
pass tests/threads/priority-change
pass tests/threads/priority-donate-one
pass tests/threads/priority-donate-multiple
pass tests/threads/priority-donate-multiple2
pass tests/threads/priority-donate-nest
pass tests/threads/priority-donate-sema
pass tests/threads/priority-donate-lower
pass tests/threads/priority-fifo
pass tests/threads/priority-preempt
pass tests/threads/priority-sema
pass tests/threads/priority-condvar
pass tests/threads/priority-donate-chain
FAIL tests/vm/cow/cow-simple
23 of 141 tests failed.

권호형 딸깍으로 고쳐줬다.

mmap를 할 때, 파일을 열어서 확인후 닫아버려서 file을 mmap에 넘기지 못하는 문제가 있어서 file을 다시 열어서 사용할 수 있게 했다.

sys_mmap

void *sys_mmap(void *addr, size_t length, int writable, int fd, off_t offset) {
	

	if (fd < 0 || fd >= MAX_FD || thread_current()->fd_table[fd] == NULL)
		return NULL;

	struct file *file = thread_current()->fd_table[fd];
	if (file == NULL)
		return NULL;
	
	file = file_reopen(file);

	return do_mmap(addr, length, writable, file, offset);
}

void sys_munmap(void *addr) {
	return do_munmap(addr);
}
pass tests/userprog/args-none
pass tests/userprog/args-single
pass tests/userprog/args-multiple
pass tests/userprog/args-many
pass tests/userprog/args-dbl-space
pass tests/userprog/halt
pass tests/userprog/exit
pass tests/userprog/create-normal
pass tests/userprog/create-empty
pass tests/userprog/create-null
pass tests/userprog/create-bad-ptr
pass tests/userprog/create-long
pass tests/userprog/create-exists
pass tests/userprog/create-bound
pass tests/userprog/open-normal
pass tests/userprog/open-missing
pass tests/userprog/open-boundary
pass tests/userprog/open-empty
pass tests/userprog/open-null
pass tests/userprog/open-bad-ptr
pass tests/userprog/open-twice
pass tests/userprog/close-normal
pass tests/userprog/close-twice
pass tests/userprog/close-bad-fd
pass tests/userprog/read-normal
pass tests/userprog/read-bad-ptr
pass tests/userprog/read-boundary
pass tests/userprog/read-zero
pass tests/userprog/read-stdout
pass tests/userprog/read-bad-fd
pass tests/userprog/write-normal
pass tests/userprog/write-bad-ptr
pass tests/userprog/write-boundary
pass tests/userprog/write-zero
pass tests/userprog/write-stdin
pass tests/userprog/write-bad-fd
pass tests/userprog/fork-once
pass tests/userprog/fork-multiple
pass tests/userprog/fork-recursive
pass tests/userprog/fork-read
pass tests/userprog/fork-close
pass tests/userprog/fork-boundary
pass tests/userprog/exec-once
pass tests/userprog/exec-arg
pass tests/userprog/exec-boundary
pass tests/userprog/exec-missing
pass tests/userprog/exec-bad-ptr
pass tests/userprog/exec-read
pass tests/userprog/wait-simple
pass tests/userprog/wait-twice
pass tests/userprog/wait-killed
pass tests/userprog/wait-bad-pid
pass tests/userprog/multi-recurse
pass tests/userprog/multi-child-fd
pass tests/userprog/rox-simple
pass tests/userprog/rox-child
pass tests/userprog/rox-multichild
pass tests/userprog/bad-read
pass tests/userprog/bad-write
pass tests/userprog/bad-read2
pass tests/userprog/bad-write2
pass tests/userprog/bad-jump
pass tests/userprog/bad-jump2
pass tests/vm/pt-grow-stack
pass tests/vm/pt-grow-bad
pass tests/vm/pt-big-stk-obj
pass tests/vm/pt-bad-addr
pass tests/vm/pt-bad-read
pass tests/vm/pt-write-code
FAIL tests/vm/pt-write-code2
FAIL tests/vm/pt-grow-stk-sc
pass tests/vm/page-linear
pass tests/vm/page-parallel
pass tests/vm/page-merge-seq
pass tests/vm/page-merge-par
FAIL tests/vm/page-merge-stk
FAIL tests/vm/page-merge-mm
pass tests/vm/page-shuffle
pass tests/vm/mmap-read
pass tests/vm/mmap-close
pass tests/vm/mmap-unmap
FAIL tests/vm/mmap-overlap
pass tests/vm/mmap-twice
FAIL tests/vm/mmap-write
FAIL tests/vm/mmap-ro
FAIL tests/vm/mmap-exit
FAIL tests/vm/mmap-shuffle
pass tests/vm/mmap-bad-fd
pass tests/vm/mmap-clean
pass tests/vm/mmap-inherit
FAIL tests/vm/mmap-misalign
pass tests/vm/mmap-null
pass tests/vm/mmap-over-code
pass tests/vm/mmap-over-data
pass tests/vm/mmap-over-stk
pass tests/vm/mmap-remove
pass tests/vm/mmap-zero
FAIL tests/vm/mmap-bad-fd2
FAIL tests/vm/mmap-bad-fd3
FAIL tests/vm/mmap-zero-len
FAIL tests/vm/mmap-off
pass tests/vm/mmap-bad-off
FAIL tests/vm/mmap-kernel
FAIL tests/vm/lazy-file
pass tests/vm/lazy-anon
FAIL tests/vm/swap-file
FAIL tests/vm/swap-anon
FAIL tests/vm/swap-iter
pass tests/vm/swap-fork
pass tests/filesys/base/lg-create
pass tests/filesys/base/lg-full
pass tests/filesys/base/lg-random
pass tests/filesys/base/lg-seq-block
pass tests/filesys/base/lg-seq-random
pass tests/filesys/base/sm-create
pass tests/filesys/base/sm-full
pass tests/filesys/base/sm-random
pass tests/filesys/base/sm-seq-block
pass tests/filesys/base/sm-seq-random
pass tests/filesys/base/syn-read
pass tests/filesys/base/syn-remove
pass tests/filesys/base/syn-write
pass tests/threads/alarm-single
pass tests/threads/alarm-multiple
pass tests/threads/alarm-simultaneous
pass tests/threads/alarm-priority
pass tests/threads/alarm-zero
pass tests/threads/alarm-negative
pass tests/threads/priority-change
pass tests/threads/priority-donate-one
pass tests/threads/priority-donate-multiple
pass tests/threads/priority-donate-multiple2
pass tests/threads/priority-donate-nest
pass tests/threads/priority-donate-sema
pass tests/threads/priority-donate-lower
pass tests/threads/priority-fifo
pass tests/threads/priority-preempt
pass tests/threads/priority-sema
pass tests/threads/priority-condvar
pass tests/threads/priority-donate-chain
FAIL tests/vm/cow/cow-simple
20 of 141 tests failed.

추가적인 조언으로 munmap에서 pml4_isdirty로 수정사항을 파일에 적고 종료를 해야한다고 한다.
그래서 mmap-exit을 트러블 슈팅하려고 한다.
→ pml4_is_dirty만 추가하면 되는줄 알았는데, 잘안됐습니다. 해결이 안되고 inode값이 0보다 작게 나옵니다…

22:00 ~ 23:00

시간이 늦은 관계로 발표자료를 작성해보도록 하겠습니다.
두가지의 주제로 선정하였고, 어느정도의 흐름을 파악하고 있습니다.
1. pintos에서 page fault는 어떻게 이루어지는가?
2. 스레싱이란 무엇인가?

23:00 ~ 24:00

라면 식사를 하고 왔다. 오늘은 오랫동안 발표자료 만들고, pintos를 고쳐볼 예정입니다.

00:00 ~ 04:20

pintos에서의 page fault에 대해서 알아보겠습니다.
이해하고, 발표자료 작성까지 완료했습니다. 생각보다 오래걸렸습니다…

profile
모든걸 기록하며 성장하고 싶은 개발자입니다. 현재 크래프톤 정글 8기를 수료하고 구직활동 중입니다.

0개의 댓글