1/20
week10
leetcode
1/21
leetcode
- Implement strStr()
- Divide Two Integers
- Substring with Concatenation of All Words
- Next Permutation
- Longest Valid Parentheses
- Search in Rotated Sorted Array
- Find First and Last Position of Element in Sorted Array
1/22
leetcode
- Search Insert Position
- Valid Sudoku
1/23
OS 개념공부(KAIST PintOS Assignment)
- Memory Management
- Anonymous Page
- Stack Growth
- Memory Mapped Files
- Swap In/Out
1/24
Memory Management 구현
Anonymous Page
1/25
WIL(Weekly I Learned)
- Memory Management
- supplement page table은 hash table 사용한다.
- USER POOL에서 frame이 꽉 차면 이미 할당되어 있는 frame 중에서 적당한 frame을 evict(replace)한다.
- Anonymous Page
- uninit page는 uninit_new()를 통해 page 구조체의 멤버를 채우고, 프로세스의 spt에 해당 page를 추가한다. page fault가 발생할 때, 해당 타입으로 초기화된다.
- anon page는 file-backed page와 다르게 프로세스 자체에 의해 런타임 때 만들어지고 사용된다. 힙과 스택 영역의 메모리들이 이에 해당된다. anon page의 데이터는 0으로 초기화한 후 프로세스에게 넘긴다.
- load_segment에서 ELF segment 중 read only segment와 writable segment가 있다. read only segment(init, text, ...)는 file page로 관리가 가능하지만, writable segment(bss, ...)는 write가 되면 file로 writeback을 하면 안되기 때문에 PintOS에서 load되는 모든 페이지를 anonymous page로 관리하는 design 채택했다.
- Stack Growth
- Memory Mapped Files
- file-backed page이면, page fault 발생하면 physical memory가 할당되고 DMA 방식으로 디스크에서 file을 바로 읽어서 복사한다.
- mmap은 stack과 heap 사이 빈 공간에 할당받는다.
- 프로세스 간 파일 공유에서 사용된다. 열린 파일을 메모리에 매핑시켜 공유한다.
- Swap In/Out
- anon page를 저장할 공간이 디스크 내에 없어서 별도의 공간 SWAP DISK를 만들고, Swap out된 anon page를 저장한다.
week12 발제
week12 키워드
- PROJECT4 : File system
- Indexed and Extensible Files, Subdirectories and Soft Links, Buffer Cache, Synchronization, Mount, File System Journaling
- File Allocation Table(FAT), Berkley FFS, EXT, File system component(file-extensible file, directory-working directory, link-hard/soft link), File system implementation(sector&cluster, super block, disk inode, in-memory inode, open inode table)
leetcode
- Sudoku Solver
- Count and Say
- Combination Sum
- Combination Sum II
- First Missing Positive
1/26
leetcode
- Multiply Strings
- Wildcard Matching
- Jump Game II
1/27
comment