{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec10-caches-tlbs

lec10-caches-tlbs - CS162 Operating Systems and Systems...

Info icon This preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
CS162 Operating Systems and Systems Programming Lecture 10 Caches and TLBs February 22, 2011 Anthony D. Joseph and Ion Stoica http://inst.eecs.berkeley.edu/~cs162
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Lec 10.2 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 Segmentation: Paging Note: paging is equivalent to segmentation when a segment maps onto a page! The offset of the first address in a page is 0 Recap: Segmentation vs. Paging Offset Seg # Virtual Address Base0 Limit0 V Base1 Limit1 V Base2 Limit2 V Base3 Limit3 N + Physical Address offset Offset Virtual Page # Virtual Address page #0 page #2 page #3 V,R page #1 V,R V,R,W V,R,W page #2 V,R Physical Address Offset Physical Page #
Image of page 2
Lec 10.3 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 Recap: Address Segmentation 1111 1111 heap code data Virtual memory view Physical memory view data heap 00 00 0000 01 00 0000 (0x40) 10 00 0000 (0x80) 11 00 0000 (0xC0) seg # offset code 0000 0000 0001 0000 (0x10) 0101 0000 (0x50) 0111 0000 (0x70) 1110 0000 (0xE0) Seg # base limit 11 1011 0000 1 0000 10 0111 0000 1 1000 01 0101 0000 10 0000 00 0001 0000 10 0000 stack 11 11 0000 (0xF0) stack 1011 0000 + 11 0000 - -------------- 1110 0000
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Lec 10.4 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 Recap: Address Segmentation 1111 1111 stack heap code data Virtual memory view Physical memory view data heap stack 00 00 0000 01 00 0000 10 00 0000 11 00 0000 11 10 0000 seg # offset code 0000 0000 0001 0000 0101 0000 0111 0000 1110 0000 Seg # base limit 11 1011 0000 1 0000 10 0111 0000 1 1000 01 0101 0000 10 0000 00 0001 0000 10 0000 What happens if stack grows to 1110 0000?
Image of page 4
Lec 10.5 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 Recap: Address Segmentation 1111 1111 stack heap code data Virtual memory view Physical memory view data heap stack 00 00 0000 01 00 0000 10 00 0000 11 00 0000 11 10 0000 seg # offset code 0000 0000 0001 0000 0101 0000 0111 0000 1110 0000 Seg # base limit 11 1011 0000 1 0000 10 0111 0000 1 1000 01 0101 0000 10 0000 00 0001 0000 10 0000 No room to grow!! Buffer overflow error or resize segment and move segments around to make room
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Lec 10.6 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 Recap: Paging 1111 1 111 stack heap code data Virtual memory view 0000 0 000 0100 0 000 1000 0 000 1100 0 000 1111 0 000 page # offset Physical memory view data code heap stack 0000 0000 0001 0000 0101 000 0111 000 1110 0000 11111 11101 11110 11100 11101 null 11100 null 11011 null 11010 null 11001 null 11000 null 10111 null 10110 null 10101 null 10100 null 10011 null 10010 10000 10001 01111 10000 01110 01111 null 01110 null 01101 null 01100 null 01011 01101 01010 01100 01001 01011 01000 01010 00111 null 00110 null 00101 null 00100 null 00011 00101 00010 00100 00001 00011 00000 00010 Page Table 1110 1 111
Image of page 6
Lec 10.7 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 Recap: Paging 1111 1111 stack heap code data Virtual memory view 0000 0 000 0100 0 000 1000 0 000 1100 0 000 page # offset Physical memory view data code heap stack 0000 0000 0001 0000 0101 000 0111 000 1110 0000 11111 11101 11110 11100 11101 null 11100 null 11011 null 11010 null 11001 null 11000 null 10111 null 10110 null 10101 null 10100 null 10011 null 10010 10000 10001 01111 10000 01110 01111 null 01110 null 01101 null 01100 null 01011 01101 01010 01100 01001 01011 01000 01010 00111 null 00110 null 00101 null 00100 null 00011 00101 00010 00100 00001 00011 00000 00010 Page Table 1110 0 000 What happens if stack grows to 1110 0000?
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document Right Arrow Icon
Lec 10.8 2/22 Anthony D. Joseph and Ion Stoica CS162 ©UCB Fall 2012 stack Recap: Paging 1111 1111 stack heap code data Virtual memory view 0000 0 000 0100 0 000 1000 0 000 1100 0 000 page # offset Physical memory view data code heap stack 11111 11101 11110 11100 11101 10111 11100 10110 11011 null 11010 null 11001 null 11000 null 10111 null 10110 null 10101 null 10100 null 10011 null 10010 10000 10001 01111 10000 01110 01111 null 01110 null 01101 null 01100 null 01011 01101 01010 01100 01001 01011 01000 01010 00111 null 00110 null 00101 null 00100 null 00011 00101 00010 00100 00001 00011 00000 00010 Page Table 0000 0000 0001 0000 0101 000 0111 000 1110 0000 Allocate new pages where room!
Image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern