Announcements. Project #1 grades were returned on Monday. Midterm #1. Project #2. Requests for re-grades due by Tuesday

Similar documents
ECE 571 Advanced Microprocessor-Based Design Lecture 10

DISCOVERING REASONS FOR BELADY ANOMALY IN FIFO

Operating Systems. Practical Session 8, Memory Management 2

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

CS612 Algorithm Design and Analysis

II/IV B.Tech. DEGREE EXAMINATIONS, NOV/DEC-2017

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm

NEC PerforCache. Influence on M-Series Disk Array Behavior and Performance. Version 1.0

Department of Electrical and Computer Engineering University of Wisconsin - Madison. ECE/CS 752 Advanced Computer Architecture I.

Last class: Today: Threads. CPU Scheduling

EECS 579: Logic and Fault Simulation. Simulation

CIS 371 Computer Organization and Design

CPU Scheduling. Heechul Yun

Exam 1. March 12th, CS525 - Midterm Exam Solutions

Register Allocation. Maryam Siahbani CMPT 379 4/5/2016 1

Efficient TDM-based Arbitration for Mixed-Criticality Systems on Multi-Cores

Automata Theory CS S-12 Turing Machine Modifications

Administrivia. Course Objectives. Overview. Lecture Notes Week markem/cs333/ 2. Staff. 3. Prerequisites. 4. Grading. 1. Theory and application

416 Distributed Systems

CS 700: Quantitative Methods & Experimental Design in Computer Science

ELECTRICAL AND COMPUTER ENGINEERING PhD QUALIFYING EXAMINATION. Session 1. August 20, 2007

Today s Agenda: 1) Why Do We Need To Measure The Memory Component? 2) Machine Pool Memory / Best Practice Guidelines

CSCE 313 Introduction to Computer Systems. Instructor: Dezhen Song

Outline. policies for the first part. with some potential answers... MCS 260 Lecture 10.0 Introduction to Computer Science Jan Verschelde, 9 July 2014

You separate binary numbers into columns in a similar fashion. 2 5 = 32

Do we have a quorum?

Class Note #20. In today s class, the following four concepts were introduced: decision

EECS150 - Digital Design Lecture 23 - FFs revisited, FIFOs, ECCs, LSFRs. Cross-coupled NOR gates

Announcements Wednesday, August 30

CSEP 521 Applied Algorithms. Richard Anderson Winter 2013 Lecture 1

Data Structures and Algorithm. Xiaoqing Zheng

Announcements Wednesday, August 30

ECEN 651: Microprogrammed Control of Digital Systems Department of Electrical and Computer Engineering Texas A&M University

Assessment Schedule 2011 Physics: Demonstrate understanding of wave systems (90520)

Register Alloca.on. CMPT 379: Compilers Instructor: Anoop Sarkar. anoopsarkar.github.io/compilers-class

Tutorial 4. Dynamic Set: Amortized Analysis

Compiling Techniques

More About Methods. Hsuan-Tien Lin. Deptartment of CSIE, NTU. OOP Class, March 8-9, 2010

Algorithms and Data Structures

I would like to thank BRICS and, in particular, Erik Meineche Schmidt for giving me the opportunity to teach this mini-course at Aarhus University. Le

Insert Sorted List Insert as the Last element (the First element?) Delete Chaining. 2 Slide courtesy of Dr. Sang-Eon Park

COMPUTER SCIENCE TRIPOS

CSC 1700 Analysis of Algorithms: Warshall s and Floyd s algorithms

Time. Today. l Physical clocks l Logical clocks

CSE 380 Computer Operating Systems

Lecture 19. Architectural Directions

Clock-driven scheduling

Quantum Computing Approach to V&V of Complex Systems Overview

EP2200 Course Project 2017 Project II - Mobile Computation Offloading

Timing analysis and predictability of architectures

Lecture 3, Performance


2.6 Complexity Theory for Map-Reduce. Star Joins 2.6. COMPLEXITY THEORY FOR MAP-REDUCE 51

Cactus Tools for Petascale Computing

Lecture 3, Performance

Biology Day 24. Monday, October 13 Tuesday, October 14, 2014

Lecture Note #6: More on Task Scheduling EECS 571 Principles of Real-Time Embedded Systems Kang G. Shin EECS Department University of Michigan

URP 4273 Section 3058 Survey Of Planning Information Systems (3 Credits) Spring 2017

Today: Amortized Analysis

Season Finale: Which one is better?

4/26/2017. More algorithms for streams: Each element of data stream is a tuple Given a list of keys S Determine which tuples of stream are in S

CPU Scheduling. CPU Scheduler

I/O Devices. Device. Lecture Notes Week 8

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Coping with disk crashes

Machine learning feature selection for tuning memory page swapping

PERFORMANCE METRICS. Mahdi Nazm Bojnordi. CS/ECE 6810: Computer Architecture. Assistant Professor School of Computing University of Utah

Exploring the Potential of Instruction-Level Parallelism of Exposed Datapath Architectures with Buffered Processing Units

Simulation of Process Scheduling Algorithms

1 Lamport s Bakery Algorithm

COVER SHEET: Problem#: Points

Priority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4

Deadlock. CSE 2431: Introduction to Operating Systems Reading: Chap. 7, [OSC]

PI SERVER 2012 Do. More. Faster. Now! Copyr i g h t 2012 O S Is o f t, L L C. 1

Distributed Deadlock-Avoidance. IMDEA Software Institute, Spain

ANNOUNCEMENTS. HOMEWORKS #4 & #5 handed out today. HAND HW#4 IN FOR CREDIT NEXT THURSDAY

ECC for NAND Flash. Osso Vahabzadeh. TexasLDPC Inc. Flash Memory Summit 2017 Santa Clara, CA 1

EECS150 - Digital Design Lecture 26 Error Correction Codes, Linear Feedback Shift Registers (LFSRs)

CMSC 313 Lecture 15 Good-bye Assembly Language Programming Overview of second half on Digital Logic DigSim Demo

AstroPortal: A Science Gateway for Large-scale Astronomy Data Analysis

Vector Layout in Virtual-Memory Systems for Data-Parallel Computing

Calculating Algebraic Signatures Thomas Schwarz, S.J.

CMOS Inverter. Performance Scaling

Complexity Theory Part I

TDDI04, K. Arvidsson, IDA, Linköpings universitet CPU Scheduling. Overview: CPU Scheduling. [SGG7] Chapter 5. Basic Concepts.

Lecture 4: Stacks and Queues

ECE 407 Computer Aided Design for Electronic Systems. Simulation. Instructor: Maria K. Michael. Overview

CSE 105 Theory of Computation

Quiz 2. Due November 26th, CS525 - Advanced Database Organization Solutions

Understanding Sharded Caching Systems

CS 5321: Advanced Algorithms Amortized Analysis of Data Structures. Motivations. Motivation cont d

Optimal control techniques for virtual memory management

TDDB68 Concurrent programming and operating systems. Lecture: CPU Scheduling II

Module 9: Mathematical Induction

CPSC 121: Models of Computation. Module 9: Proof Techniques (part 2) Mathematical Induction

Safety and Liveness. Thread Synchronization: Too Much Milk. Critical Sections. A Really Cool Theorem

Module 5: CPU Scheduling

Process Scheduling. Process Scheduling. CPU and I/O Bursts. CPU - I/O Burst Cycle. Variations in Bursts. Histogram of CPU Burst Times

National Grid & New York Power Authority Northern Sub-zone Redistricting Proposal July 2008

Chapter 6: CPU Scheduling

Transcription:

Announcements Project #1 grades were returned on Monday Requests for re-grades due by Tuesday Midterm #1 Re-grade requests due by Monday Project #2 Due 10 AM Monday 1

Page State (hardware view) Page frame number (location in memory or on disk) Valid Bit indicates if a page is present in memory or stored on disk A modify or dirty bit set by hardware on write to a page indicates whether the contents of a page have been modified since the page was last loaded into main memory if a page has not been modified, the page does not have to be written to disk before the page frame can be reused Reference bit set by the hardware on read/write cleared by OS can be used to approximate LRU page replacement Protection attributes read, write, execute 2

What happens when we fault and there are no more physical pages? Need to remove a page from main memory if it is dirty we must store it to disk first. dirty pages have been modified since they were last stored on disk. How to we pick a page? Need to choose an appropriate algorithm should it be global? should it be local (one owned by the faulting process) 3

Page Replacement Algorithms FIFO Replace the page that was brought in longest ago However old pages may be great pages (frequently used) number of page faults may increase when one increases number of page frames (discouraging!) called belady s anomaly 1,2,3,4,1,2,5,1,2,3,4,5 (consider 3 vs. 4 frames) Optimal Replace the page that will be used furthest in the future Good algorithm(!) but requires knowledge of the future With good compiler assistance, knowledge of the future is sometimes possible 4

LRU Page Replacement Algorithms Replace the page that was actually used longest ago Implementation of LRU can be a bit expensive e.g. maintain a stack of nodes representing pages and put page on top of stack when the page is accessed maintain a time stamp associated with each page Approximate LRU algorithms maintain reference bit(s) which are set whenever a page is used at the end of a given time period, reference bits are cleared 5

FIFO Example (3 frames) Reference string: 1,2,3,4,1,2,5,1,2,3,4,5 access 1 - (1) fault access 2 - (1,2) fault access 3- (1,2,3) fault access 4 - (2,3,4) fault, replacement access 1 - (3,4,1) fault, replacement access 2 - (4,1,2) fault, replacement access 5 - (1,2,5) fault, replacement access 1- (1,2,5) access 2 - (1,2,5) access 3 - (2,5,3) fault, replacement access 4 - (5,3,4) fault, replacement access 5 - (5,3,4) 9 page faults 6

LRU Example (3 frames) Reference string: 1,2,3,4,1,2,5,1,2,3,4,5 access 1 - (1) fault access 2 - (1,2) fault access 3- (1,2,3) fault access 4 - (2,3,4) fault, replacement access 1 - (3,4,1) fault, replacement access 2 - (4,1,2) fault, replacement access 5 - (1,2,5) fault, replacement access 1- (2,5,1) access 2 - (5,1,2) access 3 - (1,2,3) fault, replacement access 4 - (2,3,4) fault, replacement access 5 - (3,4,5) fault, replacement 10 page faults 7

LRU Example (4 frames) Reference string: 1,2,3,4,1,2,5,1,2,3,4,5 access 1 - (1) fault access 2 - (1,2) fault access 3- (1,2,3) fault access 4 - (1,2,3,4) fault, replacement access 1 - (2,3,4,1) access 2 - (3,4,1,2) access 5 - (4,1,2,5) fault, replacement access 1- (4,2,5,1) access 2 - (4,5,1,2) access 3 - (5,1,2,3) fault, replacement access 4 - (1,2,3,4) fault, replacement access 5 - (2,3,4,5) fault, replacement 8 faults 8

FIFO Example (4 frames) Reference string: 1,2,3,4,1,2,5,1,2,3,4,5 access 1 - (1) fault access 2 - (1,2) fault access 3- (1,2,3) fault access 4 - (1,2,3,4) fault, replacement access 1 - (1,2,3,4) access 2 - (1,2,3,4) access 5 - (2,3,4,5) fault, replacement access 1- (3,4,5,1) fault, replacement access 2 - (4,5,1,2) fault, replacement access 3 - (5,1,2,3) fault, replacement access 4 - (1,2,3,4) fault, replacement access 5 - (2,3,4,5) fault, replacement 10 Page faults 9

Thrashing Virtual memory is not free can allocate so much virtual memory that the system spends all its time getting pages the situation is called thrashing need to select one or more processes to swap out Swapping write all of the memory of a process out to disk don t run the process for a period of time part of medium term scheduling How do we know when we are thrashing? check CPU utilization? check paging rate? Answer: need to look at both low CPU utilization plus high paging rate --> thrashing 10