HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
📖
공부한 책
/
📒
Computer Systems - A Programmer’s perspective
/9. Virtual Memory/
VM as a Tool for Memory Protection

VM as a Tool for Memory Protection

notion image
  • 각각의 프로세스 마다 page table을 관리하고 있고, 개별 virtual address를 갖고 있으니 다른 프로세스로부터 private memory를 격리시키기는 쉬움
  • CPU가 주소를 생성할 때마다, MMU가 PTE를 읽으니 virtual page에 대한 접근 제어를 PTE에 추가적인 permission bit를 넣음으로 가능하게 할 수 있음
  • SUP bit 는 process가 kernel 모드로 동작해야 하는지에 대한 여부
  • READ, WRITE는 page에 대한 읽기, 쓰기를 제어하는 비트
  • 예를 들어, process가 user mode로 돌고 있다면 VP0를 읽을 수 있고, VP1은 읽고 쓸수 있고 , VP2에는 접근이 불가능함
  • 만약에 instruction이 해당 permission 을 위반한다면 CPU가 일반적인 protection fault를 발생시키고 kernel의 exception handler에 제어권을 넘겨줌
    • Unix shell에서는 해당 예외를 segmentation fault로 보고함