Operating Systems Principles. Page Replacement Algorithms

Similar documents
What to do when coalescing fails. The Need for Relocation. Memory Compaction. Why we swap. Pure Swapping 4/14/2017. Virtual Memory and Demand Paging

static principle: output determined by a connection with strong node dynamic principle: output (sometimes) determined by a weak (floating) node

Memory Management. What to do when coalescing fails. The Need for Relocation. Memory Compaction. Pure Swapping. Why we swap 4/15/2018

EFFECT OF DIETARY ENZYME ON PERFORMANCE OF WEANLING PIGS

PTSE RATES IN PNNI NETWORKS

CSE 5311 Notes 2: Binary Search Trees

Other Uses for Cluster Sampling

Provider How To. Software Process Service Results

Adiabatic CMOS Circuit Design: Principles and Examples

Lesions of prefrontal cortex reduce attentional modulation of neuronal responses. and synchrony in V4

Shear behaviour of regular and irregular rock joints under cyclic conditions

Rotoroll OK! User's Guide

A savings procedure based construction heuristic for the offshore wind cable layout optimization problem

Crossing the Line A GIS investigation

Using Contrapositives to Enhance the Implication Graphs of Logic Circuits

Comparative Performance of Broiler Chickens Fed Varying Levels of Palm Kernel Cake and Maize Offal

Using Contrapositive Law in an Implication Graph to Identify Logic Redundancies

Java Application Development

Increasing the usage level of corn and distillers grains in market turkey diets through the use of supplemental amino acids

NTSE-2013(Stage-I) (For Class X Students) ENGLISH LANGUAGE TEST

Mediating Multi-Party Negotiation Through Marker-Based Tracking of Mobile Phones

Effects of Enzyme Inducers in Therapeutic Efficacy of Rosiglitazone: An Antidiabetic Drug in Albino Rats

Once small always small? To what extent morphometric characteristics and postweaning starter regime affect pig lifetime growth performance

Deployment for Region B. 17 JUL 2018 VMware Validated Design 4.3 VMware Validated Design for Software-Defined Data Center 4.3

Whangarei District Council Class 4 Gambling Venue Policy

SUPPLEMENTARY INFORMATION

EECS150 - Digital Design Lecture 7 - Boolean Algebra II

EECS150 - Digital Design Lecture 5 - Boolean Algebra II

Kiwanis Dawn Busters of Metairie of the Louisiana Mississippi West Tennessee District of Kiwanis International

Including CD-ROM for whiteboard use or printing. Primary THE ALGEBRA BOOK. Written by Laura Sumner

Poultry No The replacement value of betaine for DL-methionine and Choline in broiler diets

Technical Report GIT-CERCS The Sleepy Keeper Approach: Methodology, Layout and Power Results for a 4-bit Adder

Anti-Tumour Necrosis Factor-alpha Therapy in Crohn s Disease: Clinical and Health Economic Aspects

Review TEACHING FOR GENERALIZATION & MAINTENANCE

Algorithms for Intermediate Waveband Switching in Optical WDM Mesh Networks

EFFECT OF SOYBEAN CYST NEMATODE ON GROWTH OF DRY BEAN. Research Report to Northarvest Bean Growers, January 19, 2009

Adaptive echolocation behavior in bats for the analysis of auditory scenes

Outline. EECS150 - Digital Design Lecture 5 - Boolean Algebra II. Canonical Forms. Sum of Products (cont.)

Adaptive Resource Discovery for Ubiquitous Computing

P AND K IN POTATOES. Donald A Horneck Oregon State University Extension Service

EE247 Lecture 4. EECS 247 Lecture 4: Filters 2005 H.K. Page 1. This Lecture

LHb VTA. VTA-projecting RMTg-projecting overlay. Supplemental Figure 2. Retrograde labeling of LHb neurons. a. VTA-projecting LHb

Bistability of cerebellar Purkinje cells modulated by sensory stimulation

LEARNING OBJECTIVES: UNUT.WHRO Explain how each of the diet-planning principles can be used to plan a healthy diet.

Input from external experts and manufacturer on the 2 nd draft project plan Stool DNA testing for early detection of colorectal cancer

Mechanisms underlying cross-orientation suppression in cat visual cortex

Deployment for Multiple Availability Zones. 22 JAN 2019 VMware Validated Design 5.0 VMware Validated Design for Software-Defined Data Center 5.

Effects of Feeding Citrus Pulp or Corn Supplements With Increasing Levels of Added Undegraded Intake Protein on the Performance of Growing Cattle

Site Protection and Recovery. 26 SEP 2017 VMware Validated Design 4.1 VMware Validated Design for Software-Defined Data Center 4.1

Tonic excitation or inhibition is set by GABA A conductance in hippocampal interneurons

Chapter 02 - Planning a Healthy Diet Multiple Choice

Perception of Saudi dentists and lay people to altered smile esthetics

The kinetics and stiffness characteristics of the lower extremity in older adults during vertical jumping

Nonpharmacologic Interventions for Treatment-Resistant Depression in Adults Executive Summary

Certificate Replacement. 13 FEB 2018 VMware Validated Design 4.2 VMware Validated Design for Software-Defined Data Center 4.2

The Role of Background Statistics in Face Adaptation

Influence of Hot-Humid Environment on Growth Performance and Reproduction of Swine 1

EFFECTS OF DIETARY CALCIUM LEVELS ON GROWTH-PERFORMANCE AND DIGESTIVE FUNCTION IN CATTLE FED A HIGH-FAT FINISHING DIET

Deployment for Region A. Modified on 21 DEC 2017 VMware Validated Design 4.1 VMware Validated Design for Software-Defined Data Center 4.

McAfee Enterprise Security Manager 11.1.x Installation Guide

Current Food Safety Knowledge of Registered Dietitians

INFLUENCE OF DIFFERENT STRAINS AND WAYS OF INOCULATION ON THE RABBIT S RESPONSE TO EXPERIMENTAL INFECTION WITH PASTEURELLA MULTOCIDA

Neighbourhood Watch London

Efficient sensory cortical coding optimizes pursuit eye movements

Low Power Integrated Scan-Retention Mechanism

Write down the correct answer for each of the following computations. Try to complete

Prediction of the Wrist Joint Position During a Postural Tremor Using Neural Oscillators and an Adaptive Controller

Site Protection and Recovery. 30 OCT 2018 VMware Validated Design 4.3 VMware Validated Design for Software-Defined Data Center 4.3

FRAMEstar. 2-Component PCR Plates

Asian Journal of Food and Agro-Industry ISSN Available online at

Introduction. Lance Baumgard. Introduction con t. Research Emphasis at AZ. Teaching and Advising. Research Emphasis at ISU 4/29/2010

Neural population coding of sound level adapts to stimulus statistics

Changing Views of the Role of Superior Colliculus in the Control of Gaze

An Energy Efficient Seizure Prediction Algorithm

Certificate Replacement. VMware Validated Design 4.0 VMware Validated Design for Remote Office Branch Office 4.0

Aquaculture (2012) Contents lists available at SciVerse ScienceDirect. Aquaculture

Climbing fibers encode a temporal-difference prediction error during cerebellar learning in mice

What can you do with money? What can you not do with money? You can save it. And what about you? Add one sentence about yourself in the language box.

SUPPLEMENTARY INFORMATION

Glycemic Index: The Analytical Perspective

Effect of topiramate on hippocampus-dependent spatial memory in rats

Strategies for Cost-Effective Supplementation of Beef Cattle 1

Chemosphere 88 (2012) Contents lists available at SciVerse ScienceDirect. Chemosphere. journal homepage:

For citation purposes, the electronic version is the definitive version of this article:

Extent to Which Crude Protein May Be Reduced in Corn-soybean Meal Broiler Diets Through Amino Acid Supplementation 1

SUPPLEMENTARY INFORMATION

Provide a Buffet and Carvery Service

Detecting Undiagnosed Type 2 Diabetes: Family History as a Risk Factor and Screening Tool. Rodolfo Valdez, Ph.D.

Assessment of Partial Equi-Protein Replacement of Soyabean Meal with Cassava and Leucaena Leaf Meals in the Diets of Broiler Chicken Finishers

Effect of Dietary Crude Protein, Lysine Level and Amino Acid Balance on Performance of Broilers 0 to 18 Days of Age

Effect of Graded Levels of Niacin Supplementation on Total Mixed Ration Containing Different Non-Protein Nitrogen Sources in vitro

Neural mechanisms mediating optimism bias. Positive Negative t-test (P) Correlation with optimism

Deployment. 22 AUG 2017 VMware Validated Design 4.1 VMware Validated Design for Management and Workload Consolidation 4.1

Scenarios. 22 AUG 2017 VMware Validated Design 4.1 VMware Validated Design for IT Automating IT 4.1

THE EVALUATION OF DEHULLED CANOLA MEAL IN THE DIETS OF GROWING AND FINISHING PIGS

New strategies in haemodiafiltration (HDF): prospective comparative analysis between on-line mixed HDF and mid-dilution HDF

LUMBAR DECOMPRESSION. Murat Cosar, MD, Larry T. Khoo, MD, Christopher A. Yeung, MD, and Anthony T. Yeung, MD

Comparative Utilizations of Fish Waste Meal with Imported Fishmeal by African Catfish (Clarias gariepinus)

A Reevaluation of Assessment Center Construct-Related Validity

PROVEN ANTICOCCIDIAL IN NEW FORMULATION

Transcription:

Operting Systems Priniples Pge Replement Algorithms Steve Gor gor@se.unl.eu http://www.se.unl.eu/~gor/courses/csce45 Virtul Memory Mngement Funmentl issues Plement strtegy Replement strtegies Lo ontrol strtegies Exmple: Demn pging» No plement strtegy require per se» Lo ontrol: lo pges only when fults our» Replement:... Pge Pge

Pge Replement Algorithms Conept Typilly Σ i VAS i >> Physil Memory With emn pging, physil memory fills quikly So when proess fults & memory is full, some pge must e swppe out (So hnling pge fult now requires isk esses not!) Whih pge shoul e reple?» Lol replement reple pge of the fulting proess» Glol replement possily reple the pge of nother proess Pge Replement Algorithms Evlution methoology Reor tre of pges esse y proess» Exmple: (Virtul) ress tre... (,), (,9), (4,), (,), (5,), (,), (,9), (,4), (,), (4,8)»... genertes pge tre,, 4,, 5,,,,, 4 (represente s,,,, e,,,,, ) Simulte the ehvior of pge replement lgorithm on the tre & reor the numer of pge fults generte» fewer fults == etter performne 4 Pge Pge 4

Lol Pge Replement FIFO replement Simple to implement» A single pointer suffies Physil Memory Optiml Pge Replement Clirvoynt replement Reple the pge tht won t e neee for the longest time in the future Performne with 4 pge frmes: Pge Frmes Pge Tre 4 5 6 7 8 9 e e e e e e Pge Frmes 4 5 6 7 8 9 e e e e e e e Fults Fults 5 pge neee next = 7 = 6 = 9 = = 5 = = = 4 6 Pge 5 Pge 6

Lest Reently Use Replement Bk to the future Lest Reently Use Replement Implementtion Reple the pge tht hsn t een referene for the longest time» Use the reent pst s preitor of the future Pge Frmes 4 5 6 7 8 9 e e e e e e Fults pge lst use = = 4 = = = 7 = 8 e = 5 = = 7 = 8 e = 5 = 9 7 Mintin stk of reently use pges Pge Frmes 4 5 6 7 8 9 e e e e e e Fults LRU Pge Stk e e e e e e 8 Pge 7 Pge 8

Approximte LRU Replement The Clok lgorithm Mintin irulr list of pges resient in memory» Use lok (or use) it to trk how often pge is esse it set whenever pge is referene Clok sweeps over pges looking for one with use it =» Reples pges tht hven t een referene for one omplete revolution of the lok resient it use it frme numer Pg 7: Pg : 5 Pg 4: Pg : Pg : 4 fun Clok_Replement egin while (pge not foun for replement) o if(use it for urrent pge = ) then reple urrent pge else reset use it en if vne lok pointer en while en Clok_Replement 9 Clok Pge Replement Exmple Pge Frmes 4 5 6 7 8 9 e e e e e e Fults Pge tle entries for resient pges: The LRU pge e e e e e Pge 9 Pge

Performne of Pge Replement Algorithms Bely s Anomly More memory Better performne! Lest reently use» Ages pges se on when they were lst use FIFO» Ages pges se on when they re rought into memory The priniple of lolity Pge Frmes FIFO Replement 4 5 6 7 8 9 e e e e e e e e 9% of the exeution of progrm is sequentil Fults Most intertive onstruts onsist of reltively smll numer of instrutions When proessing lrge t strutures, the ominnt ost is sequentil proessing on iniviul struture elements Pge Frmes e e e e e e e Fults Pge Pge

Expliitly Using Lolity The working set moel of pge replement Working Set Pge Replement Implementtion Assume reently referene pges re likely to e referene gin soon...... n only keep those pges reently referene in memory (lle the working set)» pges my e remove even when no pge fult ours» numer of frmes llote to proess will vry over time A proess is llowe to exeute only if its working set fits into memory» impliit lo ontrol Keep trk of the lst τ referenes» The pges referene uring the lst τ memory esses re the working set» τ is lle the winow size Exmple: working set omputtion, τ = 4 referenes: Pges in Memory 4 5 6 7 8 9 e e Pge t = - - - - - Pge - - - - - - - Pge - Pge t = - - - - Pge e t = - - - - - Fults 4 Pge Pge 4

Optiml Pge Replement For proesses with vrile numer of frmes VMIN Reple pge tht is not referene in the next τ esses Exmple: τ = 4 Pges in Memory 4 5 6 7 8 9 e e Pge t = - - - - - - - - - Pge - - - - - - - - - - Pge - - - - Pge - t = - - - - - - Pge e - - - - - - - - Fults Pge-Fult-Frequeny Pge Replement An lternte working set omputtion Expliitly ttempt to minimize pge fults» When pge fult frequeny is high inrese working set» When pge fult frequeny is low erese working set Algorithm:» Keep trk of the rte t whih fults our Reor the time, t lst, of the lst pge fult» If the time etween pge fults is lrge then reue working set If t urrent t lst > τ, then remove from memory ll pges not referene in [t lst, t urrent ]» If the time etween pge fults is smll then inrese working set If t urrent t lst τ, then fulting pge to the working set 5 6 Pge 5 Pge 6

Pge-Fult-Frequeny Pge Replement Exmple, winow size = If t urrent t lst >, remove pges not referene in [t lst, t urrent ] from the working set If t urrent t lst, fulting pge to the working set Pges in Memory 4 5 6 7 8 9 e e Pge - - - - - Pge - - - - - - Pge - Pge - Pge e - - Fults t ur t lst 7 Pge 7