Workshop on Transactional Memory 2012 Walther Maldonado Moreira University of Neuchâtel (UNINE), Switzerland Pascal Felber UNINE Gilles Muller INRIA, France.

Slides:



Advertisements
Similar presentations
CPU Scheduling Tanenbaum Ch 2.4 Silberchatz and Galvin Ch 5.
Advertisements

Institute of Networking and Multimedia, National Taiwan University, Jun-14, 2014.
CPU Scheduling CS 3100 CPU Scheduling1. Objectives To introduce CPU scheduling, which is the basis for multiprogrammed operating systems To describe various.
© Ibrahim Korpeoglu Bilkent University
OS Spring ’ 04 Scheduling Operating Systems Spring 2004.
Chapter 6: CPU Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Feb 2, 2005 Chapter 6: CPU Scheduling Basic.
TM Input Acceptance Vincent Gramoli, Derin Harmanci, Pascal Felber EPFL LPD - University of Neuchâtel Switzerland.
Chapter 5: CPU Scheduling
 Scheduling  Linux Scheduling  Linux Scheduling Policy  Classification Of Processes In Linux  Linux Scheduling Classes  Process States In Linux.
 2004 Deitel & Associates, Inc. All rights reserved. 1 Chapter 8 – Processor Scheduling Outline 8.1 Introduction 8.2Scheduling Levels 8.3Preemptive vs.
1 Scheduling Processes. 2 Processes Each process has state, that includes its text and data, procedure call stack, etc. This state resides in memory.
Page 110/9/2015 CSE 40373/60373: Multimedia Systems So far…  RMS - task with highest rate has highest priority  EDF – earliest deadline first  Tasks.
Scheduling. Alternating Sequence of CPU And I/O Bursts.
Quality of Service Karrie Karahalios Spring 2007.
Alternating Sequence of CPU And I/O Bursts. Histogram of CPU-burst Times.
1 Process Scheduling in Multiprocessor and Multithreaded Systems Matt Davis CS5354/7/2003.
On the Performance of Window-Based Contention Managers for Transactional Memory Gokarna Sharma and Costas Busch Louisiana State University.
Chapter 5: Process Scheduling. 5.2 Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Basic Concepts Maximum CPU utilization can be obtained.
Cpr E 308 Spring 2005 Process Scheduling Basic Question: Which process goes next? Personal Computers –Few processes, interactive, low response time Batch.
Software Transactional Memory Should Not Be Obstruction-Free Robert Ennals Presented by Abdulai Sei.
Performance Performance is about time and the software system’s ability to meet timing requirements.
Kernel-Assisted Scheduling and Deadline Support for Software Transactional Memory Walther Maldonado, Patrick Marlier, Pascal Felber, Etienne Rivière University.
Lecture Topics: 11/15 CPU scheduling: –Scheduling goals and algorithms.
Sunpyo Hong, Hyesoon Kim
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
CPU Scheduling CSCI Introduction By switching the CPU among processes, the O.S. can make the system more productive –Some process is running at.
Operating Systems Unit 5: – Processor scheduling – Java – Linux – Windows XP Operating Systems.
CPU Scheduling Scheduling processes (or kernel-level threads) onto the cpu is one of the most important OS functions. The cpu is an expensive resource.
REAL-TIME OPERATING SYSTEMS
Chapter 6: CPU Scheduling (Cont’d)
lecture 5: CPU Scheduling
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Chapter 6: CPU Scheduling
Scheduling of Non-Real-Time Tasks in Linux (SCHED_NORMAL/SCHED_OTHER)
Lecture 12: Real-Time Scheduling
Copyright ©: Nahrstedt, Angrave, Abdelzaher
Chapter 5a: CPU Scheduling
Processes and Threads Processes and their scheduling
Chapter 2 Scheduling.
Chapter 8 – Processor Scheduling
Operating Systems Processes Scheduling.
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 5: CPU Scheduling
CS 143A - Principles of Operating Systems
Module 5: CPU Scheduling
Lecture 21: Introduction to Process Scheduling
Operating System Concepts
3: CPU Scheduling Basic Concepts Scheduling Criteria
Jason Neih and Monica.S.Lam
Chapter 2: The Linux System Part 3
Chapter5: CPU Scheduling
Chapter 5: CPU Scheduling
Chapter 6: CPU Scheduling
CPU SCHEDULING.
Chapter 6: CPU Scheduling
Process Scheduling Decide which process should run and for how long
Chapter 5: CPU Scheduling
CS703 – Advanced Operating Systems
Lecture 21: Introduction to Process Scheduling
Operating System , Fall 2000 EA101 W 9:00-10:00 F 9:00-11:00
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Module 5: CPU Scheduling
Chapter 6: CPU Scheduling
Chapter 6: CPU Scheduling
Dynamic Performance Tuning of Word-Based Software Transactional Memory
CPU Scheduling: Basic Concepts
Module 5: CPU Scheduling
Presentation transcript:

Workshop on Transactional Memory 2012 Walther Maldonado Moreira University of Neuchâtel (UNINE), Switzerland Pascal Felber UNINE Gilles Muller INRIA, France Julia Lawall INRIA Etienne Rivière UNINE Towards Fair Transaction Scheduling with Competing QoS Requirements

Walther Maldonado – WTM /20 Table of Contents Context Soft Real Time Applications Design Deadline-Aware STM Concurrent Deadlines Experimental Results Conclusion

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Context Soft Real Time Applications Performance is not measured by raw throughput, but perceived responsiveness. Service Level Agreement (SLA) Quality of Service (QoS) Measured as a % of key events completed within a given time (deadline). e.g.: QoS(95,500) → 95% complete under 500ms Missed deadlines do not terminate the application But perceived performance degrades Results in user “frustration”

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Context Soft Real Time Applications Bulk of user applications falls in this category Multimedia playback (video/audio rendering) Failed deadlines lead frames skipped Leads to choppy video/audio Interactive applications (latency to input) Temporarily “frozen” application Increases user input error rates Gaming (latency to input) High latency handicaps players Has a direct effect on fairness

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Context Soft RT Applications (Examples) Swarm OpenGL rendering application [U. of Rochester] One thread renders the scene Others update the world state QoS translates into output framerate

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Context Soft RT Applications (Examples) Synquake Benchmark based on Quake [U. of Toronto] Interactive application based on an online game QoS measures action response time (lag) Actions have their own scope / data access patterns

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Context Transactional Memory Suitability TM is a good candidate for these applications Few actual conflicts Locks often cover more objects than needed ✔ TM can provide better scalability However, there are no time guarantees ✗ Transactions retry until the block executes successfully ✗ Durations are unbounded S ✘✘✘ ✔ ✘✘ T1

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Our Proposal How can TM be adapted to meet QoS requirements? Previous work is on irrevocable transactions ✔ Prioritizes a transaction → ensures commit ✗ Limits parallelism ✗ Penalizes throughput even when unneeded Our approach is state based Use different execution modes with varying scalable/predictable tradeoffs Switch among them according to time to deadline + Scalable − Predictable − Scalable + Predictable STM (default optimistic behavior) STM (in irrevocable mode)

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Execution Modes Optimistic (Invisible Reads) ✔ Highest throughput ✗ Conflict detection is often delayed Visible Reads ✔ Allows earlier conflict detection ✗ Slower execution Irrevocable ✔ Ensures commit ✗ Serializes execution + Scalable + Predictable Optimisti c (OPT) Irrevocable (IVC) Visible Reads (VR)

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Switching Modes Decision taken at abort/retry Estimate required time to complete in other modes: L = estimated length in Optimistic Visible Reads = 2 x L Irrevocable = 2 x L Switch times: ST VR = 6 x L ST IVC = 4 x L ST VR ST IVC Deadline time ✘ ✘ ✘✘ ✔ L

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Time Measuring Sample past execution times Use Vitter's Reservoir algorithm Provides representative distribution of durations QoS as a percentile + Sorted reservoir → Expected execution time L to use L Reservoir

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Concurrent Deadlines Meeting QoS can be impossible with simultaneous deadlines Using irrevocable ensures one TX meets its deadline Others are delayed Secondary goal to meeting QoS: balancing deadlines Even distribution of missed deadlines → fairness No thread performs overall better than others All missed deadlines within a thread fail “equally bad”

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Measuring Fairness Measure by Hit-rate Percentage of deadlines met Stable hit-rate → no thread has an advantage over than others Measure by Overflow Amount of time by which deadline was missed Stable overflow → missed deadlines are not “worse” in some cases than others S ✘✘ ✔ Deadline Overflow Time time

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Contention Managers Basic CMs: Suicide (lowest overhead) Deadline Aware (priority to deadline) Concurrent Deadlines CMs: Basic (priority to closest to deadline) Fair (priority to lower average hit rate) Cycles (priority to most average overflow time) Compound (if deadline not missed use basic, otherwise cycles)

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Irrevocable Queue Default IVC implementation is insufficient for concurrent deadlines Has no queue, no ordering (spin-lock based) Using a synchronized queue threads enter irrevocable using a “highest priority first” order Priority can be determined: Time of deadline (time stamp) Current overflow time average

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Experimental Results Setup TinySTM Linux Kernel SMP 64bit AMD Opteron Server Four 2.3 GHz quad-core CPUs (16 cores) 8GB RAM Swarm Deadline: 30 fps QoS 99% SynQuake Deadline specified for the attack action QoS 99%

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Experimental Results Single Deadlines (Swarm)

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Experimental Results Concurrent Deadlines (SynQuake)

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Experimental Results Synquake – Overflow distributions

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Conclusions Single deadlines can be met most of the time With results equivalent to irrevocable But with much lower contention Concurrent deadlines have widely varying results CM Cycles has the most stable output and good hit-rate Time stamp based queue improves overall results slightly more than overflow time CM Cycles + Time stamp Queue gives overall best result There is not necessarily a forced tradeoff between hit-rate and fairness

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Design Measuring Fairness Measured between threads or within threads Between: per-thread results should have low variance Within: overflow times should have low variance Selected two approaches to simplify: Hit-Rate variance between threads Overflow variance within threads Threads Hit Rate Samples Overflow Time

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Experimental Results Synquake – Hit Rate (Threshold 8)

Towards Fair Transaction Scheduling with Competing QoS Requirements Walther Maldonado – WTM /20 Experimental Results Synquake – Overflows (Threshold 8)