Effects of Virtual Cache Aliasing on the Performance of the NetBSD Operating System Rafal Boni CS 535 Project Presentation.

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

An Overview Of Virtual Machine Architectures Ross Rosemark.
1 Lecture 13: Cache and Virtual Memroy Review Cache optimization approaches, cache miss classification, Adapted from UCB CS252 S01.
Virtual Memory. The Limits of Physical Addressing CPU Memory A0-A31 D0-D31 “Physical addresses” of memory locations Data All programs share one address.
May 7, A Real Problem  What if you wanted to run a program that needs more memory than you have?
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.
Lecture 34: Chapter 5 Today’s topic –Virtual Memories 1.
CSIE30300 Computer Architecture Unit 10: Virtual Memory Hsin-Chou Chi [Adapted from material by and
1 A Real Problem  What if you wanted to run a program that needs more memory than you have?
Cs 325 virtualmemory.1 Accessing Caches in Virtual Memory Environment.
The Memory Hierarchy (Lectures #24) ECE 445 – Computer Organization The slides included herein were taken from the materials accompanying Computer Organization.
Virtual Memory Adapted from lecture notes of Dr. Patterson and Dr. Kubiatowicz of UC Berkeley.
Spring 2003CSE P5481 Introduction Why memory subsystem design is important CPU speeds increase 55% per year DRAM speeds increase 3% per year rate of increase.
Computer ArchitectureFall 2008 © November 10, 2007 Nael Abu-Ghazaleh Lecture 23 Virtual.
Recap. The Memory Hierarchy Increasing distance from the processor in access time L1$ L2$ Main Memory Secondary Memory Processor (Relative) size of the.
Computer ArchitectureFall 2007 © November 21, 2007 Karem A. Sakallah Lecture 23 Virtual Memory (2) CS : Computer Architecture.
CS 333 Introduction to Operating Systems Class 11 – Virtual Memory (1)
Memory Management 2010.
CS 300 – Lecture 20 Intro to Computer Architecture / Assembly Language Caches.
Microkernels: Mach and L4
Cs238 Lecture 3 Operating System Structures Dr. Alan R. Davis.
Exokernel: An Operating System Architecture for Application-Level Resource Management Dawson R. Engler, M. Frans Kaashoek, and James O’Toole Jr. M.I.T.
Virtual Memory BY JEMINI ISLAM. What is Virtual Memory Virtual memory is a memory management system that gives a computer the appearance of having more.
1 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4 to 6 transistors) DRAM: –value is stored as a charge.
1  1998 Morgan Kaufmann Publishers Chapter Seven Large and Fast: Exploiting Memory Hierarchy (Part II)
1 CSE SUNY New Paltz Chapter Seven Exploiting Memory Hierarchy.
Lecture 33: Chapter 5 Today’s topic –Cache Replacement Algorithms –Multi-level Caches –Virtual Memories 1.
Tanenbaum 8.3 See references
UNIX System Administration OS Kernal Copyright 2002, Dr. Ken Hoganson All rights reserved. OS Kernel Concept Kernel or MicroKernel Concept: An OS architecture-design.
CS533 Concepts of Operating Systems Jonathan Walpole.
Some VM Complications Extra memory accesses Page tables are huge
Operating System Support for Virtual Machines Samuel T. King, George W. Dunlap,Peter M.Chen Presented By, Rajesh 1 References [1] Virtual Machines: Supporting.
CSE 451: Operating Systems Section 10 Project 3 wrap-up, final exam review.
Lecture 19: Virtual Memory
CPE432 Chapter 5A.1Dr. W. Abu-Sufah, UJ Chapter 5B:Virtual Memory Adapted from Slides by Prof. Mary Jane Irwin, Penn State University Read Section 5.4,
July 30, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 8: Exploiting Memory Hierarchy: Virtual Memory * Jeremy R. Johnson Monday.
VICTORIA UNIVERSITY OF WELLINGTON Te Whare Wananga o te Upoko o te Ika a Maui COMP 203 / NWEN 201 Computer Organisation / Computer Architectures Virtual.
CS399 New Beginnings Jonathan Walpole. Virtual Memory (1)
Virtual Memory Part 1 Li-Shiuan Peh Computer Science & Artificial Intelligence Lab. Massachusetts Institute of Technology May 2, 2012L22-1
1 Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: –illusion of having more physical memory –program relocation.
By Teacher Asma Aleisa Year 1433 H.   Goals of memory management  To provide a convenient abstraction for programming.  To allocate scarce memory.
November 23, A Real Problem  What if you wanted to run a program that needs more memory than you have?
Lecture 11 Page 1 CS 111 Online Working Sets Give each running process an allocation of page frames matched to its needs How do we know what its needs.
1 Some Real Problem  What if a program needs more memory than the machine has? —even if individual programs fit in memory, how can we run multiple programs?
CS333 Intro to Operating Systems Jonathan Walpole.
1 Chapter Seven CACHE MEMORY AND VIRTUAL MEMORY. 2 SRAM: –value is stored on a pair of inverting gates –very fast but takes up more space than DRAM (4.
CS2100 Computer Organisation Virtual Memory – Own reading only (AY2015/6) Semester 1.
Virtual Memory Ch. 8 & 9 Silberschatz Operating Systems Book.
Protection of Processes Security and privacy of data is challenging currently. Protecting information – Not limited to hardware. – Depends on innovation.
Memory Management Chapter 5 Advanced Operating System.
CDA 5155 Virtual Memory Lecture 27. Memory Hierarchy Cache (SRAM) Main Memory (DRAM) Disk Storage (Magnetic media) CostLatencyAccess.
Module 3: Operating-System Structures
Virtual Memory Chapter 7.4.
Memory COMPUTER ARCHITECTURE
A Real Problem What if you wanted to run a program that needs more memory than you have? September 11, 2018.
Andy Wang COP 5611 Advanced Operating Systems
Some Real Problem What if a program needs more memory than the machine has? even if individual programs fit in memory, how can we run multiple programs?
CS510 Operating System Foundations
OS Virtualization.
CSCI206 - Computer Organization & Programming
Lecture 14 Virtual Memory and the Alpha Memory Hierarchy
Page Replacement.
Morgan Kaufmann Publishers Memory Hierarchy: Virtual Memory
Chapter 2: Operating-System Structures
CSC3050 – Computer Architecture
Virtual Memory: Working Sets
CSE 542: Operating Systems
Chapter 2: Operating-System Structures
Xen and the Art of Virtualization
Cache writes and examples
Presentation transcript:

Effects of Virtual Cache Aliasing on the Performance of the NetBSD Operating System Rafal Boni CS 535 Project Presentation

Background and motivation  Why NetBSD?  Runs on > 10 CPU families, > 45 different platforms all from one code base.  Has made it a point to provide clean, machine- independent interfaces to major kernel systems  Why cache performance?  To find out more about the VM system  As a practical matter of supporting a new machine with a virtually addressed cache.

CPU Cache Architectures  Small, fast store between CPU registers and slower but larger main memory.  Many design choices:  Lookup: virtual or physical addresses?  Tagging: virtual or physical addresses?  Associativity: is each “index” able to store more than one cached item (“line”)?  Write policy: write-back or write-through?

Physical (“Real”) Caches  Using physical addresses for both lookup and tagging, cache can effectively become invisible to OS  This is a serious plus for the OS developer!  However, address translation must be performed before cache lookup can happen:  This is a serious performance issue for on-die cache!  Probably acceptable for secondary and higher- level caches, though.

Virtual Caches  Why? The need for speed!  Uses un-translated virtual address for lookup  No bottleneck, can do address translation in parallel with cache lookup!  Allows fast, on-die cache design.  The downsides?  Requires OS to manage cache explicitly  Possible issue of cache aliasing, requires much more sophisticated software management.

Cache aliases: what are they?  Multiple mappings of one physical page at different addresses in virtual space.  Writes via one mapping may not be visible to others!  As in the example from [Chao90].

How to deal with aliases?  Have your hardware detect them, OS fix them up. But this costs silicon!  Prohibit multiple mappings to a single physical page – global address space.  Keep only a single page of any set of aliased pages mapped at a time.  Force all read/write shared pages to be accessed un-cached.  Best of all – try to avoid creating aliases!

Let’s get to the meat of it!  My goals are:  To evaluate how well NetBSD deals with cache aliases – how often it generates them, how it deals with them, etc.  To propose some enhancements to the current state of the art…  And to benchmark those enhancements.  Many of the proposed enhancements come from OS research literature.

The measure of success  To measure the effects of the proposed enhancements, I use three application-level workloads:  “Development workload” – compiling the “tcsh” UNIX shell  “File System workload” – creation and deletion of a number of files; reused the “tcsh” source distribution.  “Networking workload” – by design distinct from above, only takes into account data transfer, not FS operations!

Baseline results

Proposed enhancements  Have VM system use virtual addresses to initialize pages  Currently do so using physical address, which causes cache thrash and requires extra cache flushes to prevent aliases.  So far, this hasn’t show any performance benefit – still debugging implementation.  Better page placement by OS key to performance!

Questions?