Cooperative Task Management without Manual Stack Management OR Presented by Tina Swenson CS533 - February 12, 2007 Event-driven Programming is Not the.

Slides:



Advertisements
Similar presentations
Copyright Hub Software Engineering Ltd 2010All rights reserved Hub Workflow Product Overview.
Advertisements

CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Cooperative Task Management without Manual Stack Management or Event-driven programming is not the.
Chess Review May 8, 2003 Berkeley, CA Compiler Support for Multithreaded Software Jeremy ConditRob von Behren Feng ZhouEric Brewer George Necula.
CHESS: A Systematic Testing Tool for Concurrent Software CSCI6900 George.
Automatic Verification of Component-Based Real-Time CORBA Applications Gabor Madl Sherif Abdelwahed
CS533 Concepts of Operating Systems Class 5 Integrated Task and Stack Management.
Fast Servers Robert Grimm New York University Or: Religious Wars, part I, Events vs. Threads.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
490dp Synchronous vs. Asynchronous Invocation Robert Grimm.
How to Code on TinyOS Xufei Mao Advisor: Dr. Xiang-yang Li CS Dept. IIT.
Fast Servers Robert Grimm New York University Or: Religious Wars, part I, Events vs. Threads.
Cooperative Task Management without Manual Stack Management or, Event-driven Programming is Not the Opposite of Threaded Programming Atul Adya, Jon Howell,
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
CS533 Concepts of Operating Systems Class 6 The Duality of Threads and Events.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
UCoM Software Architecture Universal Communicator Research UCoM Programming Model The Problem  Multi-threaded code is difficult to write.
Threads 1 CS502 Spring 2006 Threads CS-502 Spring 2006.
CS533 Concepts of Operating Systems Class 5 Event-Based Systems.
Why Events Are a Bad Idea (for high-concurrency servers) Author: Rob von Behren, Jeremy Condit and Eric Brewer Presenter: Wenhao Xu Other References: [1]
CS533 Concepts of Operating Systems Class 2 Thread vs Event-Based Programming.
CS533 Concepts of Operating Systems Class 7 Integrated Task and Stack Management.
Thread Models Preemptive threads –Advantage: Enforce fairness Cooperative threads –Advantage: Easy to understand Semi-cooperative threads –Best of both.
Concurrency, Threads, and Events Robbert van Renesse.
Verifying Distributed Real-time Properties of Embedded Systems via Graph Transformations and Model Checking Gabor Madl
CS533 Concepts of Operating Systems Class 2 The Duality of Threads and Events.
CS533 Concepts of Operating Systems Class 3 Integrated Task and Stack Management.
CS533 Concepts of Operating Systems Class 9 User-Level Remote Procedure Call.
Visual Debugging Tools for Concurrent Models of Computation Elaine Cheong 15 May 2002 EE290N: Advanced Topics in System Theory.
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
CS 3013 & CS 502 Summer 2006 Threads1 CS-3013 & CS-502 Summer 2006.
Why Threads Are A Bad Idea (for most purposes) John Ousterhout Sun Microsystems Laboratories
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
Exceptions and Mistakes CSE788 John Eisenlohr. Big Question How can we improve the quality of concurrent software?
Cooperative Task Management without Manual Stack Management Or, Event-driven Programming is not the Opposite of Thread Programming Atul Adya, John Howell,
Bjarne Stroustrup began work on "C with Classes" in The idea of creating a new language originated from Stroustrup's experience in programming for.
Chapter 4: Operating Systems. 2 Fundamentals of Wireless Sensor Networks: Theory and Practice Waltenegus Dargie and Christian Poellabauer © 2010 Outline.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 13 Threads Read Ch 5.1.
Cooperative Task Management without Manual Stack Management or, Event-driven programming is Not the Opposite of Threaded Programming Atul Adya, Jon Howell,
1 Threads Chapter 11 from the book: Inter-process Communications in Linux: The Nooks & Crannies by John Shapley Gray Publisher: Prentice Hall Pub Date:
Operating System 2 Overview. OPERATING SYSTEM OBJECTIVES AND FUNCTIONS.
Review The Joys and Pains of Threads and Multithreading –what is a thread –threads vs. processes –opportunities and risks.
Windows Programming, C.-S. Shieh, KUAS EC, Chapter 0 Overview.
CSE 60641: Operating Systems Next topic: CPU (Process/threads/scheduling, synchronization and deadlocks) –Why threads are a bad idea (for most purposes).
1 Cooperative Task Management without Manual Stack Management or Event-driven Programming is not the Opposite of Threaded Programming Atul Adya, Jon Howell,
CSE 598c – Virtual Machines Survey Proposal: Improving Performance for the JVM Sandra Rueda.
TAME Event Based Concurrency System Nabil S. Al Ramli.
By: Rob von Behren, Jeremy Condit and Eric Brewer 2003 Presenter: Farnoosh MoshirFatemi Jan
1 Why Events Are A Bad Idea (for high-concurrency servers) By Rob von Behren, Jeremy Condit and Eric Brewer (May 2003) CS533 – Spring 2006 – DONG, QIN.
(1) Introduction to Continuous Integration Philip Johnson Collaborative Software Development Laboratory Information and Computer Sciences University of.
Threads. Readings r Silberschatz et al : Chapter 4.
Atul Adya, Jon Howell, Marvin Theimer, William J. Bolosky, John R. Douceur Microsoft Research Presented by Poonam Singh CS 533 – Winter 2010.
CS533 Concepts of Operating Systems Jonathan Walpole.
Cooperative Task Management without Manual Stack management Hanyun Tao EECS 582 – W161.
Architectural Mismatch: Why reuse is so hard? Garlan, Allen, Ockerbloom; 1994.
1 Sections Java Virtual Machine and Byte Code Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Adding Concurrency to a Programming Language Peter A. Buhr and Glen Ditchfield USENIX C++ Technical Conference, Portland, Oregon, U. S. A., August 1992.
Threads & Multithreading
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Why Events Are A Bad Idea (for high-concurrency servers)
Advanced Operating Systems (CS 202)
CS703 - Advanced Operating Systems
Cooperative Task Management without Manual Stack Management or, Event-driven Programming is Not the Opposite of Threaded Programming Atul Adya, Jon Howell,
Threads and Concurrency
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
Operating System Overview
Why Threads Are A Bad Idea (for most purposes)
TAME – Event Style Programming with Threads
CS Introduction to Operating Systems
Presentation transcript:

Cooperative Task Management without Manual Stack Management OR Presented by Tina Swenson CS533 - February 12, 2007 Event-driven Programming is Not the Opposite of Threaded Programming Published by USENIX 2002 Annual Technical Conference

Cooperative Task Management without Manual Stack Management The Authors  Atul Adya  PhD MIT. Boston, MA  Thor – distributed, object-oriented database  Microsoft Research. Redmond, WA  Farsite – serverless, distributed file system   et al. (Howell, Theimer, Bolosky, Douceur)

Cooperative Task Management without Manual Stack Management Paper’s Goal  Clarify concepts associated with the event- driven and multi-threaded programming models.  The models’ names tend to merge several concepts and this causes confusion.  Present a hybrid approach to allow the two types of stack management to co-exist in the same software.

Cooperative Task Management without Manual Stack Management Events vs. Threads The Source of Confusion  Task Management  Serial  Preemptive  Stack Management  Manual  Automatic

Cooperative Task Management without Manual Stack Management Events vs. Threads The Source of Confusion  Task Management  Serial  Preemptive  Cooperative  Stack Management  Manual  Automatic  Hybrid One can choose cooperative task management while preserving the automatic stack management.

Cooperative Task Management without Manual Stack Management Stack Management  Manual (big pain)  Event handler registers continuation with EH scheduler. The continuation creates another EH that knows what to do with original’s info.  Programmer must figure this all out.  Better not have bugs.  As the code evolves, managing the stack becomes more unwieldy.  Benefit: Yields are visible in the code.

Cooperative Task Management without Manual Stack Management Stack Management  Automatic (less pain)  Compiler manages stack.  Danger: Hidden concurrency.  Solution = Check for declared assumptions.

Cooperative Task Management without Manual Stack Management Stack Management - Hybrid  The two flavors of stack management both have passionate advocates.  Both flavors can work together via a Hybrid approach.  Adapters are used to bridge the two styles.

Cooperative Task Management without Manual Stack Management Adapter Functions Main Thread: VerifyCertCFA

Cooperative Task Management without Manual Stack Management Adapter Functions VerifyFiber was created by VerifyCertCFA in the MainFiber

Cooperative Task Management without Manual Stack Management Adapter Functions

Cooperative Task Management without Manual Stack Management Adapter Functions Verify Thread: FiberStart Main Thread: VerifyCertCFA VerifyCertCFA2

Cooperative Task Management without Manual Stack Management In Practice  Farsite  Started out as traditional event-driven.  Code grew, manual-stack-management became costly.  Mechanized the wrapping IO functions.

Cooperative Task Management without Manual Stack Management What the Authors Think  Task management and stack management are orthogonal concepts.  As code evolves:  Event-based programs have the code restructuring burdon of stack ripping.  Both styles must reconfirm invariant logic because assumptions change, etc.  Hybrid-stack-management allows use of both styles of stack management.

Cooperative Task Management without Manual Stack Management What I Think