1 Usual stuff Project 2 back today Average: 66.8/80 Today: Project 3 A few project 2 comments.

Slides:



Advertisements
Similar presentations
Cache and Virtual Memory Replacement Algorithms
Advertisements

Chapter 11 – Virtual Memory Management
Background Virtual memory – separation of user logical memory from physical memory. Only part of the program needs to be in memory for execution. Logical.
Page Replacement Algorithms
Paging: Design Issues. Readings r Silbershatz et al: ,
Lecture 19: Cache Basics Today’s topics: Out-of-order execution
Buffer management.
Chapter 9: Virtual-Memory Management. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 9: Virtual Memory Background Demand Paging.
Virtual-Memory Management
Cache Memory Locality of reference: It is observed that when a program refers to memory, the access to memory for data as well as code are confined to.
Memory/Storage Architecture Lab Computer Architecture Virtual Memory.
1 Virtual Memory in the Real World Implementing exact LRU Approximating LRU Hardware Support Clock Algorithm Thrashing Cause Working Set.
Algorithm Analysis (Big O) CS-341 Dick Steflik. Complexity In examining algorithm efficiency we must understand the idea of complexity –Space complexity.
1 Virtual Memory in the Real World Implementing exact LRU Approximating LRU Hardware Support Clock Algorithm Thrashing Cause Working Set.
1 Database Buffer Management Yanlei Diao UMass Amherst Feb 20, 2007 Slides Courtesy of R. Ramakrishnan and J. Gehrke.
1 Virtual Memory vs. Physical Memory So far, all of a job’s virtual address space must be in physical memory However, many parts of programs are never.
Paging Algorithms Vivek Pai / Kai Li Princeton University.
Programming project #2 1 CS502 Spring 2006 Programming Project #3 Page Replacement Algorithms CS-502 Operating Systems Spring 2006.
Chapter 10: Virtual Memory. 9.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 22, 2005 Chapter 10: Virtual Memory.
Chapter 11 – Virtual Memory Management Outline 11.1 Introduction 11.2Locality 11.3Demand Paging 11.4Anticipatory Paging 11.5Page Replacement 11.6Page Replacement.
CSI 400/500 Operating Systems Spring 2009 Lecture #9 – Paging and Segmentation in Virtual Memory Monday, March 2 nd and Wednesday, March 4 th, 2009.
1 CSE451 – Section 7. 2 Usual stuff Project 3 will be due Monday the 27 th Experiment design to TAs: By midnight on Sunday the 19th Today: Project.
CS444/CS544 Operating Systems Virtual Memory 4/06/2007 Prof. Searleman
Virtual Memory CSCI 444/544 Operating Systems Fall 2008.
03/29/2004CSCI 315 Operating Systems Design1 Page Replacement Algorithms (Virtual Memory)
New Visual Characterization Graphs for Memory System Analysis and Evaluation Edson T. Midorikawa Hugo Henrique Cassettari.
Week 7 February 17, 2004 Adrienne Noble. Important Dates Due Monday, Feb 23 Homework 7 Due Wednesday, Feb 25 Project 3 Due Friday, Feb 27 Homework 8.
ICS 145B -- L. Bic1 Project: Page Replacement Algorithms Textbook: pages ICS 145B L. Bic.
Page 19/17/2015 CSE 30341: Operating Systems Principles Optimal Algorithm  Replace page that will not be used for longest period of time  Used for measuring.
CS 153 Design of Operating Systems Spring 2015 Final Review.
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Lecture Topics: 11/17 Page tables TLBs Virtual memory flat page tables
Chapter 21 Virtual Memoey: Policies Chien-Chung Shen CIS, UD
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Virtual Memory.
Virtual Memory Virtual Memory is created to solve difficult memory management problems Data fragmentation in physical memory: Reuses blocks of memory.
#include pthread_mutex_t sem_mut = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t cond_mut = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
Memory Management What if pgm mem > main mem ?. Memory Management What if pgm mem > main mem ? Overlays – program controlled.
Lecture 11 Page 1 CS 111 Online Virtual Memory A generalization of what demand paging allows A form of memory where the system provides a useful abstraction.
CS 3204 Operating Systems Godmar Back Lecture 21.
1 Project: Page Replacement Algorithms Lubomir Bic.
Lecture Topics: 11/24 Sharing Pages Demand Paging (and alternative) Page Replacement –optimal algorithm –implementable algorithms.
Lecture 17 Final Review Prof. Mike Schulte Computer Architecture ECE 201.
CSE 451: Operating Systems Section 9: Storage; networks.
CS 149: Operating Systems March 5 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
CSE 153 Design of Operating Systems Winter 2015 Lecture 12: Page Replacement.
CSE Four Fiddy One Section 7 Kurtis Heimerl Aaron Kimball
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 9: Virtual Memory.
COMP 3500 Introduction to Operating Systems Project 4 – Virtual Memory Part 1: Overview Dr. Xiao Qin Auburn University
Virtual Memory. 2 Last Week Memory Management Increase degree of multiprogramming –Entire process needs to fit into memory Dynamic Linking and Loading.
Test 2 Preparation. General Information Close book, close notes Review online course notes and read the book. You may work on some exercise problems at.
Virtual Memory Operating Systems 1 Computer Science Dept Va Tech August 2007 © McQuain Page Buffering LRU and the Clock Algorithm are generally.
COS 318: Operating Systems Virtual Memory Paging.
CS 333 Introduction to Operating Systems Class 14 – Page Replacement
Virtual Memory Chapter 8.
Memory Management (2).
Webserver w/user threads
Chapter 21 Virtual Memoey: Policies
Demand Paging Reference Reference on UNIX memory management
18742 Parallel Computer Architecture Caching in Multi-core Systems
EECE.4810/EECE.5730 Operating Systems
Demand Paged Virtual Memory
Reminders Homework 4 & project 2 Midterm on Monday, November 8
CS 140 Lecture Notes: Demand Paging
Project 3 Virtual memory trace analysis
CSE 451 Autumn 2003 November 13 Section.
CS 140 Lecture Notes: Demand Paging
February 12, 2004 Adrienne Noble
CS222P: Principles of Data Management Lecture #3 Buffer Manager, PAX
Virtual Memory: Policies (Part II)
Lecture 9: Caching and Demand-Paged Virtual Memory
Presentation transcript:

1 Usual stuff Project 2 back today Average: 66.8/80 Today: Project 3 A few project 2 comments

2 Project 3 Out now and due next Friday Given: vmtrace Simulates virtual memory on a memory trace file Tracefile = a list of all VA references during execution Takes in: a memory trace file (given, netscape.exe.et.gz) physical memory size page size Outputs: # of memory references # of page faults compulsory faults page evictions pageouts

3 P3 Goals Implement some page replacement algorithms Design and perform an experiment on some aspect of virtual memory Important to pick a good topic, ask us if not sure!

4 Replacement Algorithms Given: random You need to write: FIFO LRU Clock One of your choice A few possibilities: True LRU (e.g. via storing full timestamp) Variations on LRU Clock (enhanced second-chance, etc) LFU/MFU Your own! You can write more than 3 if your experiment focuses on replacement algorithms.

5 Project 3 experiment Have a hypothesis “Algorithm y is better than algorithm x” “Big pages are better” “Prefetching will reduce the number of page faults” “If we understand why x happens, we can fix it” Explain why you think it will turn out that way Two steps Determine baseline behavior New test Change one aspect of the system, observe differences

6 Good experiment ideas What is the ideal page size for this trace under different amounts of main memory? Compare performance of various replacement algorithms. How much better/worse is page replacement algorithm X than Y? Compare “real” LRU and LRU clock, FIFO, 2Q, ARC, etc How close can we come to LRU without doing any work between page faults? No scanning, constant work per page fault How important is recency vs. frequency in predicting page re-use?

7 Not so good ideas What kind of music is made when I convert the address trace to notes? Can I make a fractal out of this data?

8 Tips vmtrace is not an execution simulation You control what happens on a page fault You control what happens on a memory access You can modify formats for PTE, page, etc Refresh your scripting skills vmtrace is very CPU-intensive spinlock/coredump: PIII-800/256MB Find faster machines (such as Linux boxes in the lab) Copy the trace file to local machine