Operating Systems - Begin Memory Management - Lecture Slides | COMP 310, Study notes of Operating Systems

Material Type: Notes; Class: Operating Systems; Subject: Computer Science; University: University of San Diego; Term: Unknown 1989;

Typology: Study notes

Pre 2010

Uploaded on 08/16/2009

koofers-user-bdi
koofers-user-bdi 🇺🇸

10 documents

1 / 7

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
1
COMP 310:
Operating Systems
Lecture 15:
Paging
October 8, 2004
Christine Alvarado
Today’s Topics
Begin Memory Management
Paging
TLBs
Advanced paging techniques
pf3
pf4
pf5

Partial preview of the text

Download Operating Systems - Begin Memory Management - Lecture Slides | COMP 310 and more Study notes Operating Systems in PDF only on Docsity!

COMP 310:

Operating Systems

Lecture 15:

Paging

October 8, 2004

Christine Alvarado

Today’s Topics

 Begin Memory Management

 Paging

 TLBs

 Advanced paging techniques

Paging  Paging uses fixed size units for physical and virtual memory.  A single job might get more than one unit

P

Page 1 Page 3 Page 2 Page N Virtual Memory Physical Memory Paging  Mapping from VM to PM invisible to program  Must provide protection:

 Program can’t access memory outside its VM

space.

Page Table Illustration Physical memory Page frame Offset Physical Address Page number Offset Virtual Address Page frame Page Table Paging Example  Pages are 4K

 VPN is 20 bits (2^20 VPNs), offset is 12 bits

 Virtual Address is 0x

 Page number is?

 Offset is?

 Look up page number in page table to get page frame (let’s say it’s 0x16000)  What is the PA?

Another example  Draw the page table that corresponds to the following mappings:

 Pages are 3 bits

 VPN is 4 bits

 Mappings

 VA 1011  PA 0111

 VA 1100  PA 1100

 VA 0111  PA 0011

 VA 0001  PA 1001

Structure of a PTE

 Page table entries control mapping

 Modify bit says whether or not the page has been written  Reference bit says whether or not page has been accessed  Valid bit says whether or not the PTE can be used  The Protection bits say what operations are allow on page (R, W, X)  The page frame number (PFN) determines physical page

Segmentation  Partition memory into logically related units  Instead of Page number and offset, use Segment number and offset  Segments can be different sizes