66 Pages

vm2

Course: CS 161, Fall 2009
School: Harvard
Rating:
 
 
 
 
 

Word Count: 2594

Document Preview

CS161: Operating Systems Lecture 9: Virtual Memory Hardware Support and MIPS R2000 24 Feb 2009 Geoffrey Challen 2009 Geoffrey Challen, Harvard University Last Time Address Translation: Given a virtual address (VA), how do we produce a physical address (PA)? Base and bounds Segmentation Paging 2009 Geoffrey Challen, Harvard University 2 Today Hardware Support: How do we make it work? How do we make it fast? MIPS...

Register Now

Unformatted Document Excerpt

Coursehero >> Massachusetts >> Harvard >> CS 161

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
CS161: Operating Systems Lecture 9: Virtual Memory Hardware Support and MIPS R2000 24 Feb 2009 Geoffrey Challen 2009 Geoffrey Challen, Harvard University Last Time Address Translation: Given a virtual address (VA), how do we produce a physical address (PA)? Base and bounds Segmentation Paging 2009 Geoffrey Challen, Harvard University 2 Today Hardware Support: How do we make it work? How do we make it fast? MIPS R2000 Case Study: Complete architectural overview. Useful for ASST3! 2009 Geoffrey Challen, Harvard University 3 Today Hardware Support: How do we make it work? How do we make it fast? MIPS R2000 Case Study: (Covered in section) Complete architectural overview. Useful for ASST3! 2009 Geoffrey Challen, Harvard University 4 Address Translation Overhead Remember two engineers in a bar... Engineer 1 What if we translate every user address? Engineer 2 Wow, that sounds really slow. Engineer 1 Could be. What do we normally do to improve performance? Engineer 2 Well, we could try a cache? 2009 Geoffrey Challen, Harvard University 5 Everything's a Cache Memory Disk L2 Cache L1 Cache CPU Registers 2009 Geoffrey Challen, Harvard University 6 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table VFN 23 57 0 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN PFN 2009 Geoffrey Challen, Harvard University (...) 7 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA PA TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN PFN 2009 Geoffrey Challen, Harvard University (...) 8 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 PA TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN PFN 2009 Geoffrey Challen, Harvard University (...) 9 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VA 2356 PA ? TLB VFN 23 57 87 10 12 13 18 22 11 9 16 94 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VFN PFN On a cache miss, we load the answer from a slower store. 2009 Geoffrey Challen, Harvard University 48 82 78 19 94 89 29 (...) 10 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VA 2356 PA ? TLB VFN 23 57 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VFN PFN 2009 Geoffrey Challen, Harvard University (...) 11 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 PA TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 12 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 PA 1056 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 13 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 PA 1056 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 14 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 2357 PA 1056 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 15 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VA 2356 2357 PA ! TLB VFN 23 57 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 1056 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 16 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VA 2356 2357 PA ! TLB VFN 23 57 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 1056 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 17 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 2357 PA 1056 1057 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 PFN 10 2009 Geoffrey Challen, Harvard University (...) 18 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 2357 ... PA 1056 1057 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 9 PFN 10 89 2009 Geoffrey Challen, Harvard University (...) 19 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 2357 ... PA 1056 1057 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 9 16 PFN 10 89 85 2009 Geoffrey Challen, Harvard University (...) 20 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 2357 ... PA 1056 1057 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 9 16 89 PFN 10 89 85 55 2009 Geoffrey Challen, Harvard University (...) 21 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VA 2356 2357 ... 8234 PA ? TLB VFN 23 57 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 1056 1057 VFN 23 9 16 89 PFN 10 89 85 55 When TLB fills, need to evict something 2009 Geoffrey Challen, Harvard University (...) 22 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VA 2356 2357 ... 8234 PA ? TLB VFN 23 57 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 1056 1057 VFN 23 9 16 89 PFN 10 89 85 55 When TLB fills, need to evict something 2009 Geoffrey Challen, Harvard University (...) 23 <a href="/keyword/translation-lookaside/" >translation lookaside</a> Buffer Idea: Cache most recently performed translations near the CPU. Address Format 3 2 Page Number 1 Offset Mapping Table 0 TRANSLATIONS VFN 23 57 PFN 10 37 23 12 57 11 38 23 3 89 85 77 56 18 81 54 19 55 65 VA 2356 2357 ... 8234 PA 1056 1057 1834 TLB 87 10 12 13 18 22 11 9 16 94 48 82 78 19 94 89 29 VFN 23 9 82 89 PFN 10 89 18 55 2009 Geoffrey Challen, Harvard University (...) 24 TLB: Searching Problem: How do we quickly look up a VFN in the TLB? 2009 Geoffrey Challen, Harvard University 25 TLB: Searching: Linear Problem: How do we quickly look up a VFN in the TLB? Solution 1: Search the entire table on every reference. VA 8912 PA 5512 Linear Search TLB 89 VFN 23 9 16 89 PFN 10 89 85 55 2009 Geoffrey Challen, Harvard University 26 TLB: Searching: Linear Problem: How do we quickly look up a VFN in the TLB? Solution 1: Search the entire table on every reference. VA 8912 PA 5512 Linear Search TLB 89 Advantages: Simple Disadvantages: Too slow VFN 23 9 16 89 PFN 10 89 85 55 2009 Geoffrey Challen, Harvard University 27 TLB: Searching: Direct Map Problem: How do we quickly look up a VFN in the TLB? Solution 2: Map (hash) each PFN into a single slot in the TLB. 2009 Geoffrey Challen, Harvard University 28 TLB: Searching: Direct Map Problem: How do we quickly look up a VFN in the TLB? Solution 2: Map (hash) each PFN into a single slot in the TLB. Using top digit: Virtual Memory 0 index = VFN.top_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) TLB VFN PFN 9999 2009 Geoffrey Challen, Harvard University 29 TLB: Searching: Direct Map Problem: How do we quickly look up a VFN in the TLB? Remember locality? Do I want my entire code segment to map to Solution 2: Map (hash) each PFN into a single slot in theslot in the TLB? the same TLB. Using top digit: Virtual Memory 0 index = VFN.top_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) TLB VFN PFN 9999 2009 Geoffrey Challen, Harvard University 30 TLB: Searching: Direct Map Problem: How do we quickly look up a VFN in the TLB? Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: Virtual Memory 0 index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) TLB VFN PFN 9999 2009 Geoffrey Challen, Harvard University 31 TLB: Searching: Direct Map Problem: How do we quickly look up a VFN in the TLB? Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: Virtual Memory 0 index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) TLB VFN PFN 9999 Maybe this is better? Maybe use a mix of high and low digits? 32 2009 Geoffrey Challen, Harvard University TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: TLB VFN PFN 2009 Geoffrey Challen, Harvard University 33 TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: I don't know anything about PFN 12... better ask! TLB VFN PFN 2009 Geoffrey Challen, Harvard University 34 TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: TLB VFN PFN 12 2009 Geoffrey Challen, Harvard University 57 35 TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: load from 8236 TLB VFN PFN 12 2009 Geoffrey Challen, Harvard University 57 36 TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: load from 8236 TLB I don't know anything about PFN 82... better ask! VFN PFN 12 2009 Geoffrey Challen, Harvard University 57 37 TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: load from 8236 TLB VFN PFN 82 2009 Geoffrey Challen, Harvard University 12 38 TLB: Direct Map: Thrashing Solution 2: Map (hash) each PFN into a single slot in the TLB. Using bottom digit: index = VFN.bottom_digit % 4 if TLB[index].VFN == VFN: return TLB[index].PFN else: TLB[index] = get_mapping(VFN) PC: 1230: load from 8236 PC: 1231 TLB Flip-flopping between pages like this is called thrashing. VFN PFN 82 2009 Geoffrey Challen, Harvard University 12 39 TLB Performance TLB Hit: VFN was translated by the TLB (fast) TLB Miss: TLB had to consult the full mapping (slow) TLB Hit Rate = # TLB Hits # Total Accesses Even small TLBs (128 entries) achieve hit rates of around 98%. Why? 2009 Geoffrey Challen, Harvard University 40 TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! 2009 Geoffrey Challen, Harvard University 41 TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! PC: 1230: load from 8236 PC: 1231 TLB VFN1 PFN1 VFN2 PFN2 2009 Geoffrey Challen, Harvard University 42 TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! PC: 1230: load from 8236 PC: 1231 TLB VFN1 PFN1 VFN2 PFN2 12 57 82 12 43 2009 Geoffrey Challen, Harvard University TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! PC: 1230: load from 8236 PC: 1231 TLB VFN1 PFN1 VFN2 PFN2 12 57 82 12 44 2009 Geoffrey Challen, Harvard University TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Ain't hardware Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! wonderful? PC: 1230: load from 8236 PC: 1231 TLB VFN1 PFN1 VFN2 PFN2 12 57 82 12 45 2009 Geoffrey Challen, Harvard University TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! Well, 2-way was good... how about... TLB VFN1 PFN1 VFN2 PFN2 12 57 82 12 2009 Geoffrey Challen, Harvard University 46 TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! Well, 2-way was good... how about... 4-way! TLB VFN1 PFN1 VFN2 PFN2 VFN3 PFN3 VFN4 PFN4 2009 Geoffrey Challen, Harvard University 47 TLB: Search: Set Associative Problem: How do we quickly look up a VFN in the TLB? Solution 3: Map (hash) each PFN into multiple slots in the TLB. Each set searched in parallel! Well, 2-way was good... how about... TLB 8-way! V P V P V P V P V P V P V P V P 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 2009 Geoffrey Challen, Harvard University 48 TLB Search: Fully Associative Problem: How do we quickly look up a VFN in the TLB? Solution 4: Each VFN can be put into any slot in the TLB. Whole TLB searched in parallel. Also called &quot;Content Addressable Memory&quot; (CAM). VA 8912 PA Simultaneous Search TLB 89 VFN 23 9 16 89 PFN 10 89 85 55 49 2009 Geoffrey Challen, Harvard University TLB Search: Fully Associative Problem: CAMs VFN in the TLB? How do we quickly look up a are expensive, and it's hard to build large ones. Solution 4: Most processors use directEach VFN can be put into any slot in the TLB. mapped or two-way Whole TLB searched in parallel. Also called &quot;Content Addressable Memory&quot; (CAM). associative VA 8912 PA 5512 Simultaneous Search TLB 89 VFN 23 9 16 89 PFN 10 89 85 55 50 2009 Geoffrey Challen, Harvard University TLB: Context Switch What happens on a context switch? Process 1 VA 8912 PA 5512 Simultaneous Search TLB VA 8900 Process 2 PA VFN 23 9 16 89 PFN 10 89 85 55 2009 Geoffrey Challen, Harvard University 51 TLB: Context Switch What happens on a context switch? Process 1 VA 8912 PA 5512 Simultaneous Search TLB VFN PFN VA 8900 Process 2 PA 1) Can we avoid this? 2) What does this mean about the TLB hit rate after a context switch? 52 2009 Geoffrey Challen, Harvard University Handling Address Translation Virtual Address 1) Look up in TLB (fast) Physical Address TLB Hit!!! TLB Mapping Table Operating System 2009 Geoffrey Challen, Harvard University 53 Handling Address Translation Virtual Address 1) Look up in TLB (fast) 2) Look up in mapping table (slower) Physical Address TLB TLB Miss Mapping Table Mapping table hit! Operating System 2009 Geoffrey Challen, Harvard University 54 Handling Address Translation Virtual Address 1) Look up in TLB (fast) 2) Look up in mapping table (slower) Physical Address TLB Load TLB Mapping Table Operating System 2009 Geoffrey Challen, Harvard University 55 Handling Address Translation Virtual Address 1) Look up in TLB (fast) 2) Look up in mapping table (slower) TLB TLB Miss Mapping Table Mapping table miss! 3) Ask the operating system for help (slowest) Why does this happen? I.E., why would a translation not be loadable from the Operating mapping table? System 2009 Geoffrey Challen, Harvard University 56 Handling Address Translation Virtual Address 1) Look up in TLB (fast) 2) Look up in mapping table (slower) Physical Address TLB Load TLB Mapping Table Load mapping table 3) Ask the operating system for help (slowest) Operating System 2009 Geoffrey Challen, Harvard University 57 Software Hardware Boundary Virtual Address Always handled by hardware! TLB TLB Fault Mapping Table Page Fault Always handled by software! Operating System 2009 Geoffrey Challen, Harvard University 58 Software Hardware Boundary Virtual Address TLB TLB Fault Mapping Table Page Fault What about TLB faults? Operating System 2009 Geoffrey Challen, Harvard University 59 TLB Fault Handling Software (MIPS R2000): Advantages: Disadvantages: Simplicity Flexibility More able to monitor page accesses Good for homework assigments in operating systems What about the overhead? Hardware (x86): Advantages: Disadvantages: Speed How much does the hardware have to know about the page table structure? What about reduced operating system visibility? 2009 Geoffrey Challen, Harvard University 60 Where is the kernel? Questions: 1) How does the kernel address physical memory? 2) How do we protect the kernel from user processes? 2009 Geoffrey Challen, Harvard University 61 Kernel Addressing Question: 1) How does the kernel address physical memory? Answer 1: Run the kernel unmapped! Kernel uses real, physical addresses. Can manually read translation tables to translate User VA -&gt; PA. 2009 Geoffrey Challen, Harvard University 62 Kernel Addressing Question: 1) How does the kernel address physical memory? Virtual Memory Answer 2: Hardware reserves a portion of the virtual address space for the kernel. 500 Kernel mapped into every process. Kernel uses processes page tables to access process VA-&gt;PA mappings. Kernel Memory (500-999) User Memory (0-499) 2009 Geoffrey Challen, Harvard University 63 Kernel Addressing Question: 1) How does the kernel address physical memory? Answer 3: All kernel memory is mapped! (Just like user memory) Accessing user memory requires manually setting up mapping to PA in the kernel. User Virtual Memory Physical Memory Kernel Virtual Memory 2009 Geoffrey Challen, Harvard University 64 Kernel Protection Question: 2) How do we protect the kernel from user processes? Answer: Special instructions needed to enter kernel mode and use kernel addressing. Processes cannot manipulate page tables! 2009 Geoffrey Challen, Harvard University 65 Next Time Demand Paging: When do we bring in pages belonging to a process? Page Replacement: When do we remove pages from a process? What pages do we remove? 2009 Geoffrey Challen, Harvard University 66
Textbooks related to the document above:
Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Harvard - CS - 161
CS161: Operating SystemsMatt Welsh mdw@eecs.harvard.eduVirtual Machines April 2, 2009 2009 Matt Welsh Harvard University1IntroductionThis talk is an overview on modern virtual machines: VMWare and Xen. Very cool stuff. Lots of exciting r
Penn State - CHEM - 110
CHEM 110, Chapter 10 summary : challenging contents Electron domains One pair of non-bonding electron pair = 1 domain One bond (no matter single, double or triple) = 1 domain Example: for the structure ofX, the atom X has 5 domains.VSEPR Valenc
San Diego State - ART - 545
CDE MAY, 20091CALIFORNIA DREAMING EXCHAGE MAY, 2009CDE MAY, 20093CALIFORNIA DREAMING EXCHAGE MAY, 2009SAN DIEGO STATE UNIVERSITY GRAPHIC DESIGN STUDIOCDE MAY, 20095ResearchCalifornia Dreaming Exchange is a non-profit organization
UMBC - CSEE - 341
! &quot;$ &amp; )$ % &amp; &quot; &quot;# #&amp;% '( $ *#%+ $ &amp; /$ $ &amp; $ &quot; $ &amp; $$,-( $ &amp; . &quot; - !021034 33 1 $ ,2 41 410 0 &amp;030&amp; 5 6 % &amp; &quot;* $ &quot; $( 7 , # # #&amp; &amp;&amp; $ $'$#&quot;338 %&amp; $ :9 ; , &quot; $ ( :&quot;,#&amp; $ 9 $(
UMBC - CSEE - 341
! # !( () % # * )! ! $ !'# ! ! !'# + ( ,-&quot; &quot;&amp; %% $! # ! '! #' / % #$ /&quot;. ' #% &quot; /%0 # &quot; % $2 / $ ! # #1 / #!##&quot; 0'3 # &amp; ##! ! /&quot;% ! &amp;#/##%#)&amp;1 # / ' # 7 # ! # ! # / ! ! # # '! 5 / ! 6) / 1 8 ! ! ##4
UMBC - CSEE - 341
CMSC 341Extensible HashingMotivations Another way to handle data that is too large to be stored in the primary memory Most records have to be stored in disk Disk read/write operations much more expensive than operations in main memory e.g., d
UMBC - CSEE - 341
!! &quot;# $ &amp;&quot; $ ' * % &amp; &quot; ) % &amp; .&amp; + * ! &quot;, &amp;' &amp;( ! &quot; ! &quot; # $ %)- $&amp;/ , /''&quot;001/ 2 3- 4 4 5 46 / ) -' 47 / &quot; 8/ &quot;! &quot;9 &quot;009&quot; 9: 9)/ &quot;! &quot;9) 9)5/ 7;&lt;=/ * $=8/ 7',(=
Kent State - GEOG - 40195
Applied Climatology: Advanced Meteorology &amp; ForecastingFall 2005 Dr. Scott SheridanWelcome to Applied Climatology! As most of you know, the topic of this course was selected to meet the wishes of those of you that planned to enroll (so now you cant
Kent State - GEOG - 40195
Weather forecasting modelsOutline The basics behind weather forecasting Issues regarding models Running models Model output Model verificationThe basisNumerical weather predictionBjerknes in 1904 first discussed the idea of utilizin
Kent State - GEOG - 40195
KinematicsOutline Geostrophic wind and wind shear Vorticity and divergence AdvectionThe horizontal direction x east-west flow y north-south flow s horizontal flow (general) l streamline flow (with the wind) n normal flow (perpend
Kent State - GEOG - 40195
Vertical profiles of the atmosphereOutline Moisture and saturation The skew-T Derived parametersSaturationSaturation Mix. Ratio (mb)Vapor pressure (e) Saturation v.p. (es) es = 6.1 e (19.8 T / 273+T) Mixing ratio (w= v/ d) Saturation m.r. (
Kent State - GEOG - 40195
FrontsOutline Frontogenesis Fronts and the jet stream Types of frontsFront termsFrontogenesis refers to conditions where a front is likely to begin to form. Frontolysis refers to conditions where a front is likely to dissipate. Mesoscale fron
Kent State - GEOG - 40195
CyclonesOutline Types of cyclones Mid-latitude cylone Development of cyclones Jet stream basicsWarm and cold lows Warm core lows Cold core lowsweaken with height Where does this occur?strengthen with height Why does this tilt? Wher
Kent State - GEOG - 31064
Pressure Atmospheric forces(5) Wind flow in the upper atmosphere Wind flow at the surfaceMotionGEOG 31064Principles of Climatology (Dr. Scott Sheridan)The equation of stateP = R T P = pressure = density R = ideal gas constan
Kent State - GEOG - 31064
(6) Hadleycell PolarvortexCirculationGlobalcirculation Thewesterlies/RossbywavesGEOG31064PrinciplesofClimatology(Dr.ScottSheridan)Whydoestheatmosphere circulate?Howistheenergytransferred?15% 60% 25% AtmosphericLatentHeat AtmosphericSens
Kent State - GEOG - 31064
World Map of Kppen-Geiger Climate Classificationupdated with CRU TS 2.1 temperature and VASClimO v1.1 precipitation data 1951 to 2000 Af Am As Dfa Aw Dfb BWk BWh Dfc Dfd BSk BSh Dsc Cfa Dsd Cfb Cfc Csa Csb Csc EF0Main climatesA: equatorial B: ar
Kent State - GEOG - 31064
Principles of Climatology (GEOG 31064) Dr. Scott SheridanLab 1 &quot;Heating things up&quot;To be done in class Thursday, January 24, 2008 Due in class Thursday, January 31, 2008In this lab, we're going to look at temperature changes within several differ
Kent State - GEOG - 31064
Principles of Climatology (GEOG 31064) Dr. Scott SheridanLab 3 Campus microclimatesTuesday, March 4, 2008 Due in class Thursday, March 13, 2008 In this lab, you will be working in groups of up to four. The main goal of this lab is to understand te
Kent State - GEOG - 31064
Principles of Climatology (GEOG 31064) Dr. Scott SheridanLab 4 Recent climate trendsTuesday, March 25, 2008 Due in class Tuesday, April 1, 2008 1. Temperature trends since 1976 Go to the website: http:/www.cpc.ncep.noaa.gov/charts.shtml Look at 5
Kent State - GEOG - 31064
Principles of Climatology (GEOG 31064) Dr. Scott SheridanLab 5 Climate change and the energy balanceApril 10, 2008 Due in class April 22, 2008. In this activity, you will be gaining insight into the complexities of climate change prediction by uti
Kent State - GEOG - 31064
Principles of Climatology (GEOG 31064) Dr. Scott SheridanThis is a review sheet for EXAM 1 to be held TUESDAY, FEBRUARY 12th, 2008 in class The exam is based on my lectures, though since much of this is `review' from previous courses, understanding
Kent State - GEOG - 17063
Ch. 3. Nature, society, and developmentWorld Geography (Sheridan) Fall 2006Chapter 3 Climate and vegetation of the earth Hazards Culture Dimensions of development&lt;&gt;JANUARYJULYASIAN MONSOONSummerWinterVegetation typesWorld land
Kent State - GEOG - 17063
7Latin America: OverviewWorld Geography (Sheridan)Primary landform divisions of Latin AmericaGeologic activitySt. LuciaPitonsSoufriere (Sulfur) VolcanoBrazil Largest river in world (Amazon) Longest mountain range (Andes) Highest na
Kent State - GEOG - 17063
8MexicoWorld Geography (Sheridan)Mexico, physicallyMexico, populationMexico City 19M Guadalajara 4M Monterrey 3M Puebla 2M 107 million peopleCultural Geography of Mexico Three Eras Pre-Colombian (to 1521) Spanish (1521-1821) Independen
Kent State - GEOG - 17063
9 BrazilWorld Geography (Sheridan)Overview10th largest economy in world Largest in Latin America 188 million people Racial diversity 54% White 39% Multiracial 6% Black &lt;1% Native, AsianTopographyAncient highlandsWell erodedSedimentary basi
Kent State - GEOG - 17063
Europe The Habitat10World Geography (Sheridan)Physical GeographyPrimary land featuresA formerly glaciated landscapeSignificant ice presence With lower ocean levels, fewer peninsulas and waterwaysEuropean shorelinesGlaciated lakesClim
Kent State - GEOG - 17063
11Europe Culture &amp; EconomyWorld Geography (Sheridan)Traditional definitions of Europe Christian Indo-European White Healthy Educated Urbanized Wealthy Good transit Non-agricultural Stabilized population Democratic Densely populated
Kent State - GEOG - 17063
Europe Politics: Disintegration and integration12World Geography (Sheridan)European mapsSeparatist movementsSpain Core vs. periphery Linguistic divides Galician, Catalonian Ethnic divides Basque separatist movement Political / relig
Kent State - GEOG - 17063
13-15Russia, the former Soviet Union and the StansWorld Geography (Sheridan)Political MapPhysical GeographyClimateOb River Valley Taiga/Tundra Wide area of swampland Floods in springDesertification: Aral Sea Has lost over 90% of its
Kent State - GEOG - 17063
16 OCEANIAUrban locations40% of Australias population lives in Sydney or MelbourneClimateResources Only 10% of land is arable Minerals are 40% of exportsAustralian Trade PartnersWhite Australia 1901: Australian independence; 3.7M people
Kent State - GEOG - 17063
Asia, IntroductionCh. 17TopographyWinter monsoonSummer monsoonRegionsClimate typesWallace's lineGanges DeltaHimalayas &amp; Tibetan PlateauRegionsWorld's most populous countries China (1) 1,278M India (2) 1,103M Indonesia (
Kent State - GEOG - 17063
Ch. 19ChinaLoess plateau houseOpium Wars (1834-1860)Led to: Opening of ports Freedom of foreigners' travel Freedom of commerce Cession of Hong Kong Legalization of opium tradePollutionCoal is 65% of China's energy consumptionPollutionTh
Kent State - GEOG - 17063
20 Southeast AsiaWorld Geography (Sheridan)PhysicallyAncient statesIslam in Southeast Asia Far more Muslims in SE Asia than in Arab world Islam brought to region 12th-15th centuries Gradual foothold as Buddhist/Hindu empires collapsedIsl
Kent State - GEOG - 17063
South AsiaCh. 21PrecipitationCyclones in Bangladesh1970- 500,000 killed - Storm surge of 11 m 1991- 140,000 killedColonialism in India Initial focus on trade ports British rule &quot;indirect&quot; in many placesThe Partition13 million migrated
Kent State - GEOG - 17063
The Middle East &amp; North AfricaCh. 22Rub Al-KhaliSize of Texas Sand dunes 1,000 highOasisMiddle eastern water crisisEthnicitiesIsraelIsraeli settlementsGaza settlements abandoned 2005, West Bank plans uncertainIsrael-Palestine Pale
Kent State - GEOG - 17063
Ch. 23 EgyptEgypt mapEgypt 77 million people Overall population 199 per square mile 356,000 square miles Almost everyone lives within Nile delta (~15,000 square miles) Only 3% of land is arableNile agricultureNilometerDams at Aswan
Kent State - GEOG - 17063
IRAN1Iran-Iraq War1980-1988 1.5M lives lost Chemical attacks on Iranian soldiers2Iran-Iraq War3Mahmoud Ahmadinejad Elected president in 2005 with 62% of vote Return to conservative base4
Kent State - GEOG - 17063
Ch. 25 Africa: overviewWorld Geography (Sheridan)JULY ITCZJAN. ITCZSahel vulnerabilitySahel precipitationAncient CivilizationsLinguistic DiversityReligious DiversityPopulation densityPopulation pyramidsUrban developmentThe Sla
Kent State - GEOG - 17063
Ch. 26/27 Africa: statesCase studies of current issues South Africa Zimbabwe NigeriaSouth Africa Dutch East India settlement in 17th C. Taken over by British by 1805. Independence in 1910 Apartheid laws in place by end of WW2. Blacks ~80%
Kent State - GEOG - 17064
GEOGRAPHY OF THE US &amp; CANADAWHAT IS GEOGRAPHY? Literally: &quot;To write about the earth&quot; &quot;Place&quot;, &quot;location&quot;, and &quot;region&quot;. How and why does something have the spatial pattern it does? &quot;The bridge between the human and physical sciences.&quot;1 Why
Kent State - GEOG - 17064
POPULATION (Ch.3)Outline Pre-European population European influence Patterns of Immigration The contemporary population Ethnic diversity Language Religion PoliticsNative American population Settled within last 35,000 years Diversity i
Kent State - GEOG - 17064
1THE CITY (Ch.4)2Outline Idea of the city Development of cities over time Function of cities Models of city structure Urban &quot;issues&quot;3Why cities?(just about 80 percent of Americans and Canadians live in a city or its metropolitan area)
Kent State - GEOG - 17064
1REGIONS (Ch.5)2Outline Why regions? Nations as regions Changing regions Problems with regionalizing Ways of determining regions The 15 regions well be studying3Delineation of regions For administrative or economic activity Gover
Kent State - GEOG - 17064
US &amp; Canada: The Atlantic Northeast (Ch.6)What states and provinces are part of the region?Map12What regions does it border? Boreal forest French Canada Heartland Appalach. Megalop.Map OverviewScenic Rural Economically disadvantaged
Kent State - GEOG - 17064
The Main Drivers Study The Province of Newfoundland and LabradorMay 18, 2002The Centre for Spatial Economics PO Box 989, 4 Barton Street Waterdown, Ontario L0R 2H0 Phone: (905) 690-7647The Centre for Spatial EconomicsPage 2IntroductionThis
Kent State - GEOG - 17064
Kent State - GEOG - 17064
What states and provinces are part of the region?Map US &amp; Canada: French Canada (Ch.7)12What regions does it border?MapOverview Most culturally distinct French-speaking 7 million people341Physical setting St. Lawrence River va
Kent State - GEOG - 17064
What states are part of the region?MapUS &amp; Canada: Megalopolis (Ch.8)12MapWhat regions does it border? Atlantic Northeast Appalachians Inland South Southeastern CoastOverview 3Around 1 / 120th of NA's land Around 1 / 6th of NA's
Kent State - GEOG - 17064
What states and provinces are part of the region?US &amp; Canada: Appalachians &amp; Ozarks (Ch.9)Map12What states and provinces are part of the region?Map OverviewMountainous Rural Economically disadvantaged Recent growth in southern areas
Kent State - GEOG - 17064
US &amp; Canada:Heartland(Ch.12)1What states and provinces are part of the region?Map2What regions does it border?Map31Overview Relatively flat area Most populated region Generally culturally homogeneous; &quot;average&quot; North American
Kent State - GEOG - 17064
US &amp; Canada: Rocky Mountains (Ch.14)1What states and provinces are part of the region?2What regions does it border? 31Overview Rugged Scenic Unpopulated4Physical setting Mostly mountainous with some peaks above 14,000 ft Relative
Kent State - GEOG - 17064
US &amp; Canada: Intermontane West (Ch.15)1What states and provinces are part of the region?2What regions does it border?31Overview Rugged and topographically diverse Population growing rapidly Inadequate water resources4Physical set
Kent State - GEOG - 17064
US &amp; Canada: Boreal Forest (Ch.19)Ouimet Canyon, near Thunder Bay, Ontario1States? Provinces?2What regions border it?31Overview Forested Scant human presence, now or ever Little agriculture Coldest spots in North America4Physic
Kent State - GEOG - 17064
US &amp; Canada: The Canadian Identity1Canada Much day-to-day life in the different regions of Canada similar to that in the US Climate, cultural, physiographic similaritiesUS and Canadian cultures seem very similar to most everyone else in the
Kent State - GEOG - 69701
GEOG 69701Research and Presentation of Geographic DataSpring 2008Dr. Scott SheridanWelcome to Res and Pres. There are three primary goals in this course: preparing you for researching, writing, and presenting your work. We will do this by writi
Kent State - GEOG - 69701
GEOG 69701 Research and Presentation of Geographic Data (Spring 2008)Dr. Scott SheridanAssignment 1: January 15, 2008 This assignment is due in class next Tuesday.1. Read Craft of Research Chapters 1, 3, and 4 (pp. 9-16 and 35-71) 2. Meet with
Kent State - GEOG - 69701
GEOG 69701 Research and Presentation of Geographic Data (Spring 2008)Dr. Scott SheridanAssignment 2: January 22, 2008 This assignment is due in class Tuesday, January 29. Read Craft of Research Chapter 5 (pp. 75-89) On the left hand side of the c
Kent State - GEOG - 69701
GEOG 69701 Research and Presentation of Geographic Data (Spring 2008)Dr. Scott SheridanAssignment 3: January 29, 2008 Due in class Tuesday, February 5. Read Craft of Research Chapter 6 (pp. 75-89) Next week we'll discuss the purpose and structure
Kent State - GEOG - 69701
GEOG 69701 Research and Presentation of Geographic Data (Spring 2008)Dr. Scott SheridanLiterature Review Presentations in class Tuesday and Thursday, February 19 and 21. Paper due in class Thursday, February 21. Paper This assignment is due in cl
Kent State - GEOG - 69701
GEOG 69701 Research and Presentation of Geographic Data (Spring 2008)Dr. Scott SheridanMarch 13, 2008 This assignment is due in class Tuesday, March 25. Funding proposal evaluation Read all of your classmates' funding proposals, and vote for your
Kent State - GEOG - 69701
GEOG 69701 Research and Presentation of Geographic Data (Spring 2008)Dr. Scott SheridanApril 8, 2008 This assignment is due when it says it's due. 1. Your methods Your revised methodology is due in by Monday, April 14 if it is turned in earlier,