CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Resource Containers: A new Facility for Resource Management in Server Systems G. Banga, P. Druschel,

Slides:



Advertisements
Similar presentations
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Advertisements

Executional Architecture
More on Processes Chapter 3. Process image _the physical representation of a process in the OS _an address space consisting of code, data and stack segments.
Chapter 3 Process Description and Control
Analysis of : Operator Scheduling in a Data Stream Manager CS561 – Advanced Database Systems By Eric Bloom.
1 SEDA: An Architecture for Well- Conditioned, Scalable Internet Services Matt Welsh, David Culler, and Eric Brewer Computer Science Division University.
Introduction to Operating Systems CS-2301 B-term Introduction to Operating Systems CS-2301, System Programming for Non-majors (Slides include materials.
CS 623 Lecture #9 Yen-Yu Chen Utku Irmak. Papers to be read Better operating system features for faster network servers.Better operating system features.
Threads vs. Processes April 7, 2000 Instructor: Gary Kimura Slides courtesy of Hank Levy.
3.5 Interprocess Communication Many operating systems provide mechanisms for interprocess communication (IPC) –Processes must communicate with one another.
3.5 Interprocess Communication
Fair Scheduling in Web Servers CS 213 Lecture 17 L.N. Bhuyan.
1 Chapter 4 Threads Threads: Resource ownership and execution.
1 I/O Management in Representative Operating Systems.
1 Threads Chapter 4 Reading: 4.1,4.4, Process Characteristics l Unit of resource ownership - process is allocated: n a virtual address space to.
U NIVERSITY OF M ASSACHUSETTS, A MHERST – Department of Computer Science Resource containers: A new facility for resource management in server systems.
CSE 490dp Resource Control Robert Grimm. Problems How to access resources? –Basic usage tracking How to measure resource consumption? –Accounting How.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 11 Slide 1 Architectural Design.
Chapter 51 Threads Chapter 5. 2 Process Characteristics  Concept of Process has two facets.  A Process is: A Unit of resource ownership:  a virtual.
CS252: Systems Programming Ninghui Li Final Exam Review.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
1 CS 501 Spring 2003 CS 501: Software Engineering Lecture 16 System Architecture and Design II.
Implementing Processes and Process Management Brian Bershad.
Jozef Goetz, Application Layer PART VI Jozef Goetz, Position of application layer The application layer enables the user, whether human.
Operating Systems Lecture 2 Processes and Threads Adapted from Operating Systems Lecture Notes, Copyright 1997 Martin C. Rinard. Zhiqing Liu School of.
Processes and Threads CS550 Operating Systems. Processes and Threads These exist only at execution time They have fast state changes -> in memory and.
Windows 2000 Course Summary Computing Department, Lancaster University, UK.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Lecture 3 Process Concepts. What is a Process? A process is the dynamic execution context of an executing program. Several processes may run concurrently,
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
Background: Operating Systems Brad Karp UCL Computer Science CS GZ03 / M th November, 2008.
OPERATING SYSTEM SUPPORT DISTRIBUTED SYSTEMS CHAPTER 6 Lawrence Heyman July 8, 2002.
Processes CSCI 4534 Chapter 4. Introduction Early computer systems allowed one program to be executed at a time –The program had complete control of the.
Security Architecture and Design Chapter 4 Part 1 Pages 297 to 319.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
Threads. Readings r Silberschatz et al : Chapter 4.
1 Why Threads are a Bad Idea (for most purposes) based on a presentation by John Ousterhout Sun Microsystems Laboratories Threads!
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Processes and Threads Chapter 3 and 4 Operating Systems: Internals and Design Principles, 6/E William Stallings Patricia Roy Manatee Community College,
Introduction to Operating Systems Concepts
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Memory Management.
Processes and threads.
Threads vs. Events SEDA – An Event Model 5204 – Operating Systems.
Process Management Process Concept Why only the global variables?
Andy Wang COP 5611 Advanced Operating Systems
Processes and Threads Processes and their scheduling
OPERATING SYSTEMS CS3502 Fall 2017
Lecture Topics: 11/1 Processes Process Management
Software Design and Architecture
Threads, Events, and Scheduling
Chapter 4: Threads.
Chapter 15, Exploring the Digital Domain
CS703 - Advanced Operating Systems
Lecture Topics: 11/1 General Operating System Concepts Processes
Process Description and Control
Threads and Concurrency
Threads Chapter 4.
Threads, Events, and Scheduling
Multithreaded Programming
Processes and Process Management
Prof. Leonardo Mostarda University of Camerino
Why Threads Are A Bad Idea (for most purposes)
Threads vs. Processes Hank Levy 1.
Chapter 4: Threads.
Why Threads Are A Bad Idea (for most purposes)
Why Threads Are A Bad Idea (for most purposes)
Message Passing Systems Version 2
CSE 542: Operating Systems
Presentation transcript:

CS 443 Advanced OS Fabián E. Bustamante, Spring 2005 Resource Containers: A new Facility for Resource Management in Server Systems G. Banga, P. Druschel, J. Mogul Rice & Compaq Presented by: Aaron J Beach

Outline Background and Terms Previous Approaches and Problems A new Approach: Resource Containers Performance and Evaluation Conclusion

Background: Web Servers Many users' perceived computing performance is based on how well remote web servers perform. The OS and hardware are rarely on the critical path concerning web browsing Servers may accomplish many different tasks each consuming many different types of resources. Depending on the resource strategies of the system it can be very hard to achieve QOS, fairness, or protection for existing and new clients.

The Big Idea! The main big problem this paper seeks to convey and build upon is this: Independent activities or tasks are not coupled with the process or thread entity. However, the user-level (thread or process) is treated as the independent accountable entity for resource management. This mis-assumption is BAD!

Web servers Previous Approaches Problems Previous Solutions Mis-assumptions

Process per Connection An idle connection waits listens on the socket For each new connection a new process is spawned Drawbacks: Suffers from context switches Process creation IPC Possibly very vulnerable to Syn attacks

Event-Driven Single-Process Single process runs and calls handlers when it receives requests Avoids IPC and context switches Drawbacks: Not really concurrent, however, can spawn multiple processes if on multi-processor system

Multi-threaded Server Each connection gets its own thread Threads are scheduled by scheduler thread Idle threads listen for next connections This avoids context switches and scales better

Other Resources used by Servers Dynamic Resources such as pages created in response to user input may require third party software. This usually results in another process being spawned to handle each dynamic request.. CGI was developed for fast IPC Kernel Resources: The kernel does network processing in order to handle connections and send connections, It may have buffers for the connections. These resources are generally considered separately from the Server and charged to either no one or any unlucky process!

General Assumptions of Severs ● Process provides dual purpose ● Protection domain ● Resource Entity ● Basically the ideas of a protection domain and accountable resource entity are coupled by the process/thread

Kernel vs User Resources Server activity extends into the kernel This is not considered during Resource management Network intensive apps (i.e. Servers) may result in large percentages of overall resources being spent in the kernel!

Multi-threaded server and the Kernel ● The threads each require processing to be done within the kernel ● Lazy Receiver Processing ● Charge kernel processing to the associated connection ● Allows you to scale more gracefully and protect existing threads from incoming new threads (possibly syn attacks) ● Allows better QOS ● Still associates the protection domain and resource principle!

Process vs Independent Activity ● Single activity may spawn multiple processes to handle same connection (i.e. Dynamic Content) ● Single activity may want to protect different aspects of the same activity from eachother! ● Conclusion: ● Protection domains and resource principles are not semantically coupled!

A new approach... RESOURCE CONTAINERS! “An abstract operating system entity that logically contains all of the system resources being used by an application to achieve a particular independent activity” ● Resources ● CPU, memory, sockets, buffers ● Attributes ● Scheduling parameters (priority, QOS level, constraints ● Resource Container Aspects ● Hierarchy (parents -> children) ● Dynamic Resource Binding ● API and other practical implementation aspects

Resources Processes / Threads Dynamic Resource Binding Basically processes and threads can be associated and re-associated with the activity or purpose they are serving Charge resources within the kernel like LRP The key idea: The resource binding is the relation between resource/processing domains and the associated resource principles, effectively decoupling the two

Attributes Attributes are used by Resource Management to protect QOS of clients Can protect against SYN attacks by maintain QOS at all levels for existing clients Can Maintain Static Content requests separate of dynamic requests Attributes: Priority Type of Service Constraints

Scheduling threads Threads may serve one container or many, existing within the same protection domain To avoid rescheduling threads after every resource container binding, a list of containers is associated with a thread and the thread is scheduled based on combined attributes Threads initially inherit their parent's Container (Hierarchical)

PERFORMANCE AND EVALUATION Isolation of separate activities Dynamic requests vs Static requests Priority based scheduling QOS of differing priority clients Protecting against Syn Floods Continuing to Server existing clients

Experiment Added 6550 lines of code to Digital UNIX Modified: CPU scheduler To use Resource Containers as it's principle unit TCP/IP subsystem LRP style processing “4820 lines... to Integrate containers as the system's resource principles”... the details I guess Running a single-process Event driven server

Dynamic vs Static Requests Can Static requests maintain throughput in the face of many Dynamic requests? Constrain the resource usage of dynamic reqs

Differentiating QOS Assign resource container T-high to high priority connections. Assign resource container T-low to low priority How do T-high response time change with increase in low priority connections Reduce queue time of T-high

SYN-attack resilience Basically they had a set of known mis- behaving clients SYN attack the server, and measured the concurrent throughput to other clients.

Attributes Attributes are used by Resource Management to protect QOS of clients Can protect against SYN attacks by maintain QOS at all levels for existing clients Can Maintain Static Content requests separate of dynamic requests Attributes: Priority Type of Service Constraints

Conclusions... YO! Resource Container decouple resource principles from protection domains and extend them into the kernel and other processes Evaluation shows they are able to achieve fine-grained QOS differentiation enforce priorities of activities that may share the same process or pervade many processes This makes sense, no?