Solution to the Second COSC 6360 Quiz for Fall 2013 Jehan-François Pâris

Slides:



Advertisements
Similar presentations
COMP375 Computer Architecture and Organization Senior Review.
Advertisements

EECS 470 Virtual Memory Lecture 15. Why Use Virtual Memory? Decouples size of physical memory from programmer visible virtual memory Provides a convenient.
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Computer Organization CS224 Fall 2012 Lesson 44. Virtual Memory  Use main memory as a “cache” for secondary (disk) storage l Managed jointly by CPU hardware.
Solutions for the Second Problem Set COSC 6360 Fall 2014.
Caching IV Andreas Klappenecker CPSC321 Computer Architecture.
1 Lecture 14: Virtual Memory Topics: virtual memory (Section 5.4) Reminders: midterm begins at 9am, ends at 10:40am.
1 Lecture 15: Virtual Memory and Large Caches Today: TLB design and large cache design basics (Sections )
Memory Management and Paging CSCI 3753 Operating Systems Spring 2005 Prof. Rick Han.
CE6105 Linux 作業系統 Linux Operating System 許 富 皓. Chapter 2 Memory Addressing.
The Memory Hierarchy II CPSC 321 Andreas Klappenecker.
Memory Management 2010.
Lecture 17: Virtual Memory, Large Caches
1 Lecture 14: Virtual Memory Today: DRAM and Virtual memory basics (Sections )
Caching and Demand-Paged Virtual Memory
A. Frank - P. Weisberg Operating Systems Simple/Basic Paging.
Answers to the VM Problems Spring First question A computer has 32 bit addresses and a virtual memory with a page size of 8 kilobytes.  How many.
11/10/2005Comp 120 Fall November 10 8 classes to go! questions to me –Topics you would like covered –Things you don’t understand –Suggestions.
Cache Organization of Pentium
CS 241 Section Week #12 (04/22/10).
Chapter VIII Virtual Memory Review Questions Jehan-François Pâris
Caching and Virtual Memory. Main Points Cache concept – Hardware vs. software caches When caches work and when they don’t – Spatial/temporal locality.
Some VM Complications Extra memory accesses Page tables are huge
Problems discussed in the review session for the final COSC 4330/6310 Summer 2012.
Lecture 19: Virtual Memory
1 Lecture: Virtual Memory, DRAM Main Memory Topics: virtual memory, TLB/cache access, DRAM intro (Sections 2.2)
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
Chapter 8 – Main Memory (Pgs ). Overview  Everything to do with memory is complicated by the fact that more than 1 program can be in memory.
Practical, Transparent Operating System Support for Superpages J. Navarro Rice University and Universidad Católica de Chile S. Iyer, P. Druschel, A. Cox.
1 Linux Operating System 許 富 皓. 2 Memory Addressing.
8.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Paging Physical address space of a process can be noncontiguous Avoids.
1 Lecture 13: Cache, TLB, VM Today: large caches, virtual memory, TLB (Sections 2.4, B.4, B.5)
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
Virtual Memory 1 1.
1 Lecture 16: Virtual Memory Topics: virtual memory, improving TLB performance (Sections )
COSC 3330/6308 Solutions to the Third Problem Set Jehan-François Pâris November 2012.
Introduction to Virtual Memory and Memory Management
Solution to the Fall 2012 Second COSC 6360 Quiz Jehan-François Pâris
Virtual Memory Review Goal: give illusion of a large memory Allow many processes to share single memory Strategy Break physical memory up into blocks (pages)
LECTURE 12 Virtual Memory. VIRTUAL MEMORY Just as a cache can provide fast, easy access to recently-used code and data, main memory acts as a “cache”
1 Lecture: Virtual Memory, DRAM Main Memory Topics: virtual memory, TLB/cache access, DRAM intro (Sections 2.2)
COSC 3330/6308 Second Review Session Fall Instruction Timings For each of the following MIPS instructions, check the cycles that each instruction.
Virtual Memory 1 Computer Organization II © McQuain Virtual Memory Use main memory as a “cache” for secondary (disk) storage – Managed jointly.
CGS 3763 Operating Systems Concepts Spring 2013 Dan C. Marinescu Office: HEC 304 Office hours: M-Wd 11: :30 AM.
1 Lecture: Large Caches, Virtual Memory Topics: cache innovations (Sections 2.4, B.4, B.5)
Papers on the Second Quiz Jehan-François Pâris
Memory Management & Virtual Memory. Hierarchy Cache Memory : Provide invisible speedup to main memory.
Memory: Page Table Structure
Cache Organization of Pentium
Memory COMPUTER ARCHITECTURE
CS161 – Design and Architecture of Computer
Lecture 12 Virtual Memory.
CS703 - Advanced Operating Systems
Solutions for Second Quiz
Paging and Segmentation
PRACTICAL, TRANSPARENT OPERATING SYSTEM SUPPORT FOR SUPERPAGES
Sarah Diesburg Operating Systems CS 3430
Exam Review Mark Stanovich Operating Systems COP
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
CSE 451: Operating Systems Autumn 2005 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 10 Paging & TLBs
Solutions for the Third Problem Set
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
CSE 451: Operating Systems Autumn 2003 Lecture 9 Memory Management
Lecture 8: Efficient Address Translation
CSE 471 Autumn 1998 Virtual memory
CSE 542: Operating Systems
Solutions to the Second Quiz
Lecture 9: Caching and Demand-Paged Virtual Memory
Presentation transcript:

Solution to the Second COSC 6360 Quiz for Fall 2013 Jehan-François Pâris

First question Consider a virtual memory system with 4 KB pages, 8 MB of RAM and a TLB with 256 entries. – What would be the TLB coverage of this architecture? (5 points) – How can superpages increase this coverage? (10 points)

Answer The TLB coverage is 256×4KB = 1MB Superpages allow TLB entries to cover more main memory space – If the same TLB included 16 superpages of 64KB each, the TLB coverage would be 16×64KB + 240×4KB = 1,984KB

Second question A system of physical clocks consists of two clocks, namely, one that is slow and loses one minute every hour and another that is fast and advances by two minutes every hour. Assuming that the clocks are managed by Lamport’s physical clock protocol, what will be the time marked by each clock at three o’clock given that: – Both clocks indicated the correct time at noon; – The sole message exchanged between them is a message sent at two o’clock by the processor on which the fast clock resides to the processor on which the slow clock resides; – Message transmission delays are negligible.

Answer TimeFast ClockSlow Clock noon12:00 pm

Answer TimeFast ClockSlow Clock noon12:00 pm 1:00 pm 1:02 pm 12:59 pm

Answer TimeFast ClockSlow Clock noon12:00 pm 1:00 pm 1:02 pm 12:59 pm 2:00 pm 2:04 pm

Answer TimeFast ClockSlow Clock noon12:00 pm 1:00 pm 1:02 pm 12:59 pm 2:00 pm 2:04 pm 3:00 pm 3:06 pm 3:03 pm

Third Question What problem do Corey kernel shares address? (10 points) How do these kernel shares solve that problem? (5 points)

Answer (I) Many kernel operations involve looking up identifiers in tables to Accessing these tables becomes costly whenever multiple cores contend for locks on the tables or on individual table entries.

Answer (II) Kernel shares lets applications dynamically create lookup tables and specify how these tables are shared.

Fourth question Explain why the ARC page replacement policy is said to be: – Scan resistant (10 points) – Self-tuning (10 points)

Answer The ARC cache replacement policy is scan-resistant because blocks that are only accessed once are expelled faster than blocks that are referenced only once. It is self-tuning because it does not have a single user-settable tuning parameter.

Fifth question What are the major advantage and the major disadvantage of proof- carrying code (PCC)? (2×5 points)

Answer Main advantage: – Provides complete protection against misbehaving extensions at zero run-time cost Main disadvantage: – It is extremely difficult to generate correctness proofs for non-trivial extensions

Sixth question How do the Nooks object tracking functions try to prevent extensions from corrupting kernel data structures? (20 points)

Answer Object tracking code will prevent extensions from directly modifying kernel data structures. It will instead: – Copy kernel data structures into extension address space – Copy them back after changes have been applied – Perform checks whenever possible