본문 바로가기
  • 책과 글

CS/운영체제17

19. Paging: Faster Translations(TLBs) paging은 오버헤드 많이 발생 requires a large amount of mapping information mapping information은 보통 물리 메모리에 저장되고, 페이징은 논리적으로 프로그램에 의해 생성되는 각 가상 주소에 대한 여분의 메모리를 필요로 한다. THE CRUX: HOW TO SPEED UP ADDRESS TRANSLATION --> TLB(Translation - lookaside buffer) : simply a hardware cache of popular virtual-to-physical address translations 19.1 TLB Basic Algorithm - TLB 먼저 확인 후, - 1. success시 line 3이하 - 2. else 시 l.. 2019. 12. 11.
18. Paging: Introduction Paging : Instead of splitting up our address space into three logical segment, we split up our address space into fixed-sized units we call a page. - address space & Physical memory(-->page frame) - 두 가지 장점 : 1. flexibility & 2. simplicity - address space 의 가상 페이지가 어떤 물리 메모리에 위치하는지 기록하기 위해 page table이 필요 - 다른 프로세스에 대해서는 다른 페이지 테이블로 관리 18.1 Where are Page Tables Stored? - 각 프로세스의 메모리 somewhere에 페.. 2019. 12. 10.
17. Free-Space Management(2) -free()를 통한 메모리 반환이 이뤄지면 어떤 일이 일어날까? - 다음 free space(next : 16708)를 가리키게 됨 - 할당되었던 모든 공간에 대해 다 free()가 이루어지면, merge작업을 통해 하나로 합쳐서 하나의 빈 공간으로 됨 17.3 Basic Strategies - "best" approach란 없다. 메모리 요청과 free는 프로그래머에 의해 발생하는, arbitrary한 것이기 때문 Best Fit - 남은 공간들 중, request된 size보다 크면서 가장 작은 공간 할당하는 방법 Worst Fit - best fit과 반대 개념. 가장 큰 chunk를 할당 First Fit - request 된 size보다 큰 가장 첫 번째 chunk를 할당 Next Fit 17.. 2019. 12. 10.
17. Free-Space Management(1) external fragmentation(외부 단편화) : 1. when the free space you are managing consists of variable-sized units : 2. when using segmentation to implement virtual memory. - 위와 같은 경우처럼, 20 bytes만큼의 free space가 존재하지만, 15 bytes의 연속된 메모리 공간을 요구하는 프로세스는 할당될 수 없는 'wasteful'한 상황 17.1 Assumptions - 외부 단편화에만 포커싱 - 메모리 공간은 한 번 할당되고 나면, 그 메모리 주소를 옮길 수 없음(cannot be relocated) -> 즉, compaction 불가능 - the allocator m.. 2019. 11. 23.