“Why Events are a Bad Idea (For high-concurrency servers)” Paper by Rob von Behren, Jeremy Condit and Eric Brewer, May 2003 Presentation by Loren Davis,

Slides:



Advertisements
Similar presentations
CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Cooperative Task Management without Manual Stack Management or Event-driven programming is not the.
Advertisements

Chess Review May 8, 2003 Berkeley, CA Compiler Support for Multithreaded Software Jeremy ConditRob von Behren Feng ZhouEric Brewer George Necula.
1 SEDA: An Architecture for Well- Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Capriccio: Scalable Threads for Internet Services Matthew Phillips.
SEDA: An Architecture for Well- Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
Concurrency, Thread and Event CS6410 Sept 6, 2011 Ji-Yong Shin.
Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Vidhya Priyadharshnee Palaniswamy Gnanam Spring 2011.
Why Events Are A Bad Idea (for high-concurrency servers) By Rob von Behren, Jeremy Condit and Eric Brewer.
1 On the Duality of Operating System Structures by Hugh C. Lauer, Xerox Corporation and Roger M. Needham, Cambridge University Presented by Scott Fletcher.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
Capriccio: Scalable Threads for Internet Services ( by Behren, Condit, Zhou, Necula, Brewer ) Presented by Alex Sherman and Sarita Bafna.
Capriccio: Scalable Threads for Internet Services (von Behren) Kenneth Chiu.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, George Necula and Eric Brewer University of California at Berkeley.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
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]
1 On the Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University Oct 1978, reprinted April 1979 Presented by David.
Concurrency, Threads, and Events Robbert van Renesse.
On the Duality of Operating System Structures Hugh Lauer Xerox Corporation Roger Needham Cambridge University Presented by Yahia Mahmoud.
User-Level Interprocess Communication for Shared Memory Multiprocessors Brian N. Bershad, Thomas E. Anderson, Edward D. Lazowska, and Henry M. Levy Presented.
Why Events Are A Bad Idea (for high-concurrency servers) Rob von Behren, Jeremy Condit and Eric Brewer Computer Science Division, University of California.
On the Duality of Operating System Structures Hugh C. Lauer Xerox Corporation Roger M. Needham Cambridge University Presented By: Ashwini Kulkarni.
Why Events Are A Bad Idea (for high-concurrency servers) Rob von Behren, Jeremy Condit and Eric Brewer University of California at Berkeley
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
SEDA – Staged Event-Driven Architecture
Writing a Research Proposal
Why Events Are A Bad Idea (for high-concurrency servers) Rob von Behren, Jeremy Condit and Eric Brewer Presented by: Hisham Benotman CS533 - Concepts of.
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services by, Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
Cooperative Task Management without Manual Stack Management Or, Event-driven Programming is not the Opposite of Thread Programming Atul Adya, John Howell,
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
Dave Archer - CS533 - Spring On the Duality of Operating System Structures Hugh C. Lauer, Roger M. Needham.
On the Duality of Operating System Structures 1. Hugh C. Lauer Xerox Corporation Palo Alto, Californi a Roger M. Needham Cambridge University Cambridge,
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Presented by Changdae Kim and Jaeung Han OFFENCE.
Condition Variables and Transactional Memory: Problem or Opportunity? Polina Dudnik and Michael Swift University of Wisconsin, Madison.
CS533 - Concepts of Operating Systems 1 On The Duality of Operating System Structures Hugh Lauer, Xerox Roger Needham, Cambridge University 1979 Presented.
Capriccio: Scalable Threads for Internet Services Rob von Behren, Jeremy Condit, Feng Zhou, Geroge Necula and Eric Brewer University of California at Berkeley.
ON THE DUALITY OF OPERATING SYSTEM STRUCTURES Hugh C. Lauer and Roger M. Needham Presented by: Ali R. Butt (adapted from many slides available online and.
5204 – Operating Systems Threads vs. Events. 2 CS 5204 – Operating Systems Forms of task management serial preemptivecooperative (yield) (interrupt)
Presenting: Why Events Are A “Bad” Idea ( for high-concurrency servers) Paper by: Behren, Condit and Brewer, 2003 Presented by: Rania Elnaggar 1/30/2008.
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,
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University of.
By: Rob von Behren, Jeremy Condit and Eric Brewer 2003 Presenter: Farnoosh MoshirFatemi Jan
SEDA An architecture for Well-Conditioned, scalable Internet Services Matt Welsh, David Culler, and Eric Brewer University of California, Berkeley Symposium.
Threads versus Events CSE451 Andrew Whitaker. This Class Threads vs. events is an ongoing debate  So, neat-and-tidy answers aren’t necessarily available.
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.
CS533 Concepts of Operating Systems Jonathan Walpole.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
REVIEW OF “ON THE DUALITY OF OPERATING SYSTEM STRUCTURES” Paper by Hugh C. Lauer and Roger M. Needham Presentation by Erin Chapman.
Paper Review of Why Events Are A Bad Idea (for high-concurrency servers) Rob von Behren, Jeremy Condit and Eric Brewer By Anandhi Sundaram.
Multithreading vs. Event Driven in Code Development of High Performance Servers.
SEDA: An Architecture for Scalable, Well-Conditioned Internet Services
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Why Events Are A Bad Idea (for high-concurrency servers)
On the Duality of Operating System Structures
Concurrency, threads, and events
CS533 Concepts of Operating Systems
Presenter: Godmar Back
Capriccio – A Thread Model
On the Duality of Operating System Structures
Academic Perspectives
Fast Communication and User Level Parallelism
Background and Motivation
Hugh Lauer Xerox Corporation Roger Needham Cambridge University
Capriccio: Scalable Threads for Internet Services
Why Events Are a Bad Idea (for high concurrency servers)
On the Duality of Operating System Structures
SEDA: An Architecture for Well-Conditioned, Scalable Internet Services
CS 5204 Operating Systems Lecture 5
CS533 Concepts of Operating Systems Class 4
Presentation transcript:

“Why Events are a Bad Idea (For high-concurrency servers)” Paper by Rob von Behren, Jeremy Condit and Eric Brewer, May 2003 Presentation by Loren Davis, August 2011

What’s this Paper About? Who are the authors? – Rob von Behren, Jeremy Condit and Eric Brewer were CS professors at UC Berkeley – Eric Brewer was a co-author of SEDA What did they do? – They wrote a threading library that scaled well up to 100,000 threads – They “refined” the duality argument in Lauer and Needham’s paper Why is that required reading in this course? – Glad you asked

Their Use of Previous Work The key result of this paper is not that they put threads ahead of events in the tug-of-war Based on the same papers we read previously, they predicted that threads and events should have similar performance And they were right

A Review of Threads and Events

Lauer and Needham Wrote “On the Duality of Operating System Structures” in 1978 Contrasted “Message-Oriented systems” (few, static processes and message-passing) with “Procedure-Oriented systems” (many, dynamic processes and shared memory) Described message port/message queue library and monitor library based on C.A.R. Hoare Argued that neither had any inherent advantage over the other

Lauer-Needham Duality Event-Driven Message Channels Dispatch message Delayed send, await SendReply Wait in message loop Message handlers Wait for messages Threaded Procedure names Procedure call Create, join threads Procedure return Wait for lock Procedure bodies Condition variables, signals

What von Behren Took Ignored the definitions given for “Message-oriented” and “Procedure-oriented” – Which were not well-defined – Or relevant to current operating systems – Or even used in the duality argument Recast the argument as about control flow through a blocking graph Applied the results to events and threads Concluded that the two should, in theory, be as fast Provided actual data

Why Some Things are Bad Ideas (For some purposes) The title, “Why Events are a Bad Idea (For high-concurrency servers),” is a riff on Osterhout’s paper (5 April) – “Why Threads Are a Bad Idea (For most purposes)” – Yet, “his arguments do not conflict with ours.” – In particular, Osterhout supported threads for true concurrency – But believed that threads are hard to program

Adya et al. Li Lei will present this paper Von Behren et al. use one result in particular: – Events had been thought to be easier to program – In reality, it’s cooperative multitasking that’s easier to program – It’s possible to get cooperative multitasking with threads

Welsh, Culler and Brewer Wrote the Staged Event-Driven Architecture (SEDA) Applications included a web server, Haboob One of the few event-driven frameworks to rigorously use Lauer-Needham messaging Believed that messages had inherent advantages over threads

SEDA Versus Threads in Two Graphs The graph on the left repeats the SEDA benchmark The graph on the right compares SEDA to a new threading system with similar scheduling (green) and one that prioritizes new connections (blue)

What Happened The authors of the 2001 SEDA paper believed that threads were the problem – “[C]ache and TLB misses, scheduling overhead, and lock contention” The authors of this paper, in 2003, believed that that couldn’t be true – How could it be, when every event-driven program has a threaded dual with the same flow? (Half-true.) They found the real problem in the threading library – Non-scalable, O(n) operations – Too many context switches Haboob becomes CPU-limited at 512 connections

Future Research Some of the points they raised, they dealt with by saying that solutions should exist, thanks to Lauer-Needham duality, but didn’t actually write – These include introspection and modularity They give examples of cooperative threading packages, but not ones designed for large numbers of blocking threads They call for improved compiler support for threading, including explicit parallel blocks, static analysis of them, dynamic stack growth, and live-state management

Conclusions Threads perform similarly to, or even better than, events They have a simpler programming model Static analysis of them is easier Compilers should tightly integrate them