본문 바로가기

운영체제/Segmentation and Paging

Segmentation and Paging - (3) Paged Segmentation Segmentation and Paging - (3) Paged SegmentationPaged Segmentation - segmentation과 paging 각각의 장점을 한꺼번에 얻기 위해 두 기법을 동시에 사용. 이를 위해 먼저 segmentation을 수행하고 각 segment 별로 paging을 수행한다. Segmentation의 장점1. 두 User Process가 동일한 코드(Text Segment)를 공유하기 용이하다.2. 각 Memory Section들에게 각기 다른 Read/Write 권한을 설정할 수 있다 Paging의 장점1. Memory fragmentation(external fragmentation)을 없앰2. swapping이 용이해진다.(=메모리를 분할하는 크기를 swap..
Segmentation and Paging - (2) Paging Segmentation and Paging - (2) PagingPaging - Logical memory, Physical memory를 동일한 memory block 크기로 나눈다. - 동일한 크기의 logical memory단위를 page, physical memory단위를 frame이라 한다. - 그 이후에 MMU가 Page Table을 참조하여 virtual address를 physical address로 메모리를 변환한다.(memory translation)Paging은 Segmentation기법과 마찬가지로 main memory에 page table을 구성하고 MMU가 이를 참조함으로써 가상 주소(virtual address)를 물리 주소(physical address)로 변환한다. 예를들어..
Segmentation and Paging - (1) Segmentation Segmentation and Paging - (1) Segmentation컴파일(Compile), 링킹(Liking)과정을 거쳐 만들어진 .exe파일은 1)Text Section, 2)Data Section, 3)ZI(=BSS) Section을 갖는다.이렇게 만들어진 .exe파일을 운영체제의 로더가 메인 메모리(main memory)로 로드하게 되면 다음과 같은 Segment 구조를 갖는다Text(=Code) Segment(Read Only)Data Segment(Read and Write)Stack SegmentHeap Segment각 Segment는 각기 다른 특성을 갖는다. Q. 이렇게 하나의 프로세스를 각기 다른 영역(Segment)로 나누어 관리하는 이유는 무엇일까?(= 한 User Proce..