Concept of paging
Paging은 각각의 address space를 fixed-size로 나누어 page로 나누는 것이다.
Paging에서, physical memory도 page frame이라는 것으로 나누어진다.
Process 마다 있는 page table은 virtual address를 physical address로 변환할 줄 알아야한다.
Advantages Of Paging
Flexibility : address space를 효과적으로 사용할 수 있게 도와준다.
Simplicity : page와 page frame이 같은 size를 가지고 있고, 할당하기도 쉽고 가지고 있기도 쉽다.
여기서 중요한 점은 logical address에서는 contiguous하다는 것이다.
Common Flags Of Page Table Entry
Valid bit는 1개이고 protection bit는 read,written,executed를 표현하기 위해 3개의 bit가 필요하다.
Page에 비해 Frame이 부족할 경우 해당 data를 disk에 저장하게 된다. 이를 구별하기 위해 present bit가 있다.
Dirty bit는 page가 변했는지를 알려준다.
Reference Bit는 해당 Fame에 얼마나 접근했었는지를 알려준다. 이게 필요한 이유는 접근을 잘 안하는 Frame을 disk로 보내기 위해서이다.
Paging : Too Slow
segmentation과 paging을 비교하였을 때, segmentation은 하드웨어에서 바로 logical address를 physical address로 바꿔주지만, Page table은 너무커서 DRAM에 저장되어 있기 때문에 paging은 logical address를 physical address로 바꿔 줄 때마다 DRAM에 접근해야 한다.
Accessing Memory With Paging
'3-2 > 운영체제' 카테고리의 다른 글
Advanced Page Tables (0) | 2021.10.22 |
---|---|
Translation Lookaside Buffer (0) | 2021.10.21 |
Segmentation (0) | 2021.10.08 |
Memory API (0) | 2021.10.08 |
The Abstraction : Address Space (0) | 2021.09.30 |