RESOURCE MANAGEMENT MICHAEL ROITZSCH

Similar documents
PROBABILISTIC SCHEDULING MICHAEL ROITZSCH

RESOURCE MANAGEMENT MICHAEL ROITZSCH

RESOURCE MANAGEMENT MICHAEL ROITZSCH

Department of Computer Science Institute for System Architecture, Operating Systems Group REAL-TIME MICHAEL ROITZSCH OVERVIEW

REAL-TIME OVERVIEW SO FAR MICHAEL ROITZSCH. talked about in-kernel building blocks:

Exokernel Engler, Kaashoek etc. advantage: fault isolation slow (kernel crossings)

Operating Systems. V. Input / Output

Multimedia Systems 2011/2012

Real Time and Embedded Systems. by Dr. Lesley Shannon Course Website:

OS Extensibility: SPIN and Exokernels. Robert Grimm New York University

I/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13

Lecture 2: September 9

Overview Computer Networking What is QoS? Queuing discipline and scheduling. Traffic Enforcement. Integrated services

Secure Partitioning (s-par) for Enterprise-Class Consolidation

Anne Bracy CS 3410 Computer Science Cornell University

Operating System Design Issues. I/O Management

Introduction to Operating Systems. Chapter Chapter

Today: Protection! Protection!

Microkernel-based Operating Systems - Introduction

Virtualization, Xen and Denali

Introduction to Operating. Chapter Chapter

SECURITY ARCHITECTURES CARSTEN WEINHOLD

Using Time Division Multiplexing to support Real-time Networking on Ethernet

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

Practical Considerations for Multi- Level Schedulers. Benjamin

Scheduling II. Today. Next Time. ! Proportional-share scheduling! Multilevel-feedback queue! Multiprocessor scheduling. !

Introduction. CS3026 Operating Systems Lecture 01

A Userspace Packet Switch for Virtual Machines

Operating System Structure

G Robert Grimm New York University

L6: OSI Reference Model

Introduction to Operating Systems. Chapter Chapter

Storage Systems. NPTEL Course Jan K. Gopinath Indian Institute of Science

Network stack virtualization for FreeBSD 7.0. Marko Zec

Outline. Operating Systems: Devices and I/O p. 1/18

Why Study Multimedia? Operating Systems. Multimedia Resource Requirements. Continuous Media. Influences on Quality. An End-To-End Problem

Packet Scheduling and QoS

3. Quality of Service

Operating System Structure

Lecture 3: O/S Organization. plan: O/S organization processes isolation

Operating System Kernels

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

SE300 SWE Practices. Lecture 10 Introduction to Event- Driven Architectures. Tuesday, March 17, Sam Siewert

Resource allocation in networks. Resource Allocation in Networks. Resource allocation

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

Network Model for Delay-Sensitive Traffic

Operating System Support for Multimedia. Slides courtesy of Tay Vaughan Making Multimedia Work

Mon Sep 17, 2007 Lecture 3: Process Management

Real-Time Protocol (RTP)

Introduction. Application Performance in the QLinux Multimedia Operating System. Solution: QLinux. Introduction. Outline. QLinux Design Principles

Developing deterministic networking technology for railway applications using TTEthernet software-based end systems

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Computer Networks. More on Standards & Protocols Quality of Service. Week 10. College of Information Science and Engineering Ritsumeikan University

Operating Systems 2010/2011

Qualifying exam: operating systems, 1/6/2014

Operating Systems. V. Input / Output. Eurecom

Advanced Operating Systems (CS 202)

Containing RDMA and High Performance Computing

CSE 123b Communications Software

RSVP and the Integrated Services Architecture for the Internet

Lecture 15 Networking Fundamentals. Today s Plan

Block Device Driver. Pradipta De

Lecture 5: February 3

What is an Operating System? A Whirlwind Tour of Operating Systems. How did OS evolve? How did OS evolve?

CS61C Machine Structures Lecture 37 Networks. No Machine is an Island!

Operating Systems. Operating Systems

Today: Protection. Sermons in Computer Science. Domain Structure. Protection

Faculty of Computer Science Institute for System Architecture, Operating Systems Group. Naming. Stefan Kalkowski. Dresden,

Last 2 Classes: Introduction to Operating Systems & C++ tutorial. Today: OS and Computer Architecture

Shadow: Real Applications, Simulated Networks. Dr. Rob Jansen U.S. Naval Research Laboratory Center for High Assurance Computer Systems

Utilizing Linux Kernel Components in K42 K42 Team modified October 2001

Process Description and Control

Lecture 5: Performance Analysis I

So far. Next: scheduling next process from Wait to Run. 1/31/08 CSE 30341: Operating Systems Principles

Jan 20, 2005 Lecture 2: Multiprogramming OS

Microkernel Construction

Multimedia-Systems. Operating Systems. Prof. Dr.-Ing. Ralf Steinmetz Prof. Dr. rer. nat. Max Mühlhäuser Prof. Dr.-Ing. Wolfgang Effelsberg

The Active Block I/O Scheduling System (ABISS)

CSE398: Network Systems Design

Problem Set: Processes

IO-Lite: A Unified I/O Buffering and Caching System

Lecture 2 Process Management

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

Resource Containers. A new facility for resource management in server systems. Presented by Uday Ananth. G. Banga, P. Druschel, J. C.

GUARANTEED END-TO-END LATENCY THROUGH ETHERNET

Extensible Network Security Services on Software Programmable Router OS. David Yau, Prem Gopalan, Seung Chul Han, Feng Liang

Advanced Computer Networks. End Host Optimization

Wireless Networks (CSC-7602) Lecture 8 (22 Oct. 2007) Seung-Jong Park (Jay) Fair Queueing

DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING UNIT I

Example Networks on chip Freescale: MPC Telematics chip

COS 318: Operating Systems

Operating System Services

Mohammad Hossein Manshaei 1393

COS 318: Operating Systems

CS 333 Introduction to Operating Systems. Class 2 OS-Related Hardware & Software The Process Concept

COSC6376 Cloud Computing Lecture 15: IO Virtualization

Networking and Internetworking 1

Tolerating Malicious Drivers in Linux. Silas Boyd-Wickizer and Nickolai Zeldovich

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

The Bhopal School of Social Sciences, Bhopal

Transcription:

Department of Computer Science Institute for System Architecture, Operating Systems Group RESOURCE MANAGEMENT MICHAEL ROITZSCH

AGENDA done: time, drivers today: misc. resources architectures for resource management solutions for specific resources 2

KERNEL RESOURCES 3

PROBLEM kernel manages tasks threads capabilities mapping database it all comes down to memory kernel memory is limited opens the possibility of DoS attacks 4

IDEA memory management policy should not be in the kernel manage kernel memory in userland kernel provides memory control mechanism exception for bootstrapping: initial kernel memory is managed by kernel 5

SOLUTION kernel-memory objects in L4.sec extension of the recursive address space model create kernel-memory object by converting user pages userland apps pay for kernel memory allocated on their behalf converted pages no longer accessible by userland 6

SOLUTION kernel uses kernel-memory objects for storing allocated data structures supports map and unmap reconvert on unmap reconvert transfers object back to userland recursively deletes all kernel structures dependency graph must be cycle-free 7

PRINCIPLE separate enforcement and management 8

ARCHITECTURES 9

EXOKERNEL Application Management Library OS Enforcement Exokernel 10

DESIGN provide primitives at the lowest possible level necessary for protection use physical names wherever possible resource management primitives: explicit allocation exposed revocation protected sharing ownership tracking 11

CONSEQUENCES each application can use its own library OS library OS es cannot trust each other no central management for global resources think of a file system kernel manages disk ownership with block granularity each library OS comes with its own filesystem implementation one partition per application? 12

SHARING invariants in shared resources must be maintained four mechanisms provided by the exokernel software regions for sub-page memory protection, allows to share state capabilities for access control critical sections wakeup predicates: code downloaded into the kernel for arbitrary checks 13

MULTISERVER Low-Level Resource Manager Higher-Level Resource Manager L4 Microkernel Application Client-Libs 14

LEVELS different abstraction levels for resources basic resources hardware compound resources memory, CPU, IO-ports, interrupts block device, framebuffer, network card file, GUI window, TCP session 15

HIERARCHIES applications use multiple resources that depend on other resources resource tree of cooperating resource managers isolation of resources allows managers to provide real-time guarantees for their specific resource DROPS: Dresden Real-time OPerating System 16

HIERARCHIES some resources are by themselves managed in a hierarchy recursive virtual memory hierarchy can differentiate service different memory properties by different pagers 17

PROBLEM hierarchies not reflected by system structure global names every application can access any resource each resource managers should do its own access control in practice, they just don t this scatters policy across the system 18

BASTEI App App App App Higher-Level Resource Manager Higher-Level Resource Manager Low-Level Resource Manager Core 19

SUBSYSTEMS direct access only to the parent parent decide for their subsystem, which resources the applications see hierarchical systems make the resource hierarchy explicit 20

BREAKPOINT often research only deals with generic management concepts we just discussed drilling down is required for usable systems coming up next: specific resources in DROPS for each resource we will cover the layered managers we will outline an idea to provide real-time guarantees 21

NETWORK 22

ORE driver for physical L4 VFS network card built with DDE using Flips Linux 2.6 drivers provides multiple ORe virtual network cards implements a simple virtual bridge 23

FLIPS Flexible IP Stack L4 VFS TCP/IP stack written by ripping the Flips relevant code out of Linux 2.4 ORe uses DDE to use Linux code with little modifications 24

L4 VFS L4 VFS virtual file system layer Flips provides POSIX file interface ORe for network: BSD sockets 25

REAL-TIME guaranteed timely communication service lower bound for bandwidth upper bound for latency and jitter networks in embedded systems field busses collapsed network stacks bus topology, single broadcast domain example: CAN bus 26

ETHERNET Input high-performance bus Output switches use buffers on output ports delay bound depends on traffic to the output if queues get too long, frames are dropped 27

IDEA traffic on output ports depends on inbound traffic inbound traffic depends on the computers sending to the switch shaping the traffic sent by computers helps bounds incoming traffic at the switch bounds the queue length in the switch prevents dropped packets use network calculus for shaping parameters 28

TOKEN BUCKET tokens arrive at rate r token bucket with size b Traffic is shaped! by the token bucket (b+r!t)! by the medium (M+C!t). Resulting traffic bound for a duration t at the switch: T-SPEC min( b " rt, M " Ct) application packet buffer output packet buffer packets arrive from applications packets drain tokens packets (#M) leave to network with rate C 30 29

RESULTS switch is a shared medium all nodes must cooperate for this to work worst-case delays 1ms network utilization > 90% no node synchronization required predictable packet transmission on off-theshelf switched ethernet hard real-time capable 30

HARD DISK 31

WINDHOEK IDE driver to access L4 VFS hard disks includes disk request Filesystem scheduling based on DDE Windhoek provides block device ongoing work on USB block devices 32

FILESYSTEM L4 VFS Filesystem no real one implemented we have a tmpfs using RAM as backing store Windhoek VPFS: securely reuse a Linux filesystem 33

L4 VFS L4 VFS hierarchical name space Filesystem connects subtrees to different backend servers Windhoek aka mounting 34

Frequency REAL-TIME guaranteed bandwidth of data streams read from / written to disk execution times of disk requests vary disk head position rotational delay poor ratio between worst case and average case 0.07 0.06 0.05 0.04 0.03 0.02 average: 4ms worst: 30ms 0.01 0 0 2 4 6 8 10 12 Request Service Time (ms) 35

IDEA quality-based probabilistic scheduling map disk bandwidth to the periodic execution of disk requests constant number per period fixed request size Period 1 Period 2 Period 3... Stream 1: Stream 2: Best-Effort Requests: Time 36

SCHEDULING quality parameter: fraction of requests processed on time admission control calculates reservation time for each stream disk scheduler enforces reservation requests are only executed as long as the reservation is not depleted problem: disk requests cannot be aborted, admission math must deal with this 37

OPTIMIZE scheduler picks requests according to remaining reservation and quality not good for disk utilization existing non-real-time disk schedulers are much better elevator SATF: shortest access time first 38

OPTIMIZE solution: two level scheduling using Dynamic Active Subset first level selects set of disk requests that can be executed in any order while still meeting all guarantees this set is then handed to the second level scheduler can execute disk requests in any order any non-real-time scheduler works 39

GRAPHICS 40

NITPICKER Terminal multiplexes the frame buffer DOpE no virtual desktops, but window merging Nitpicker details in the legacy / security lectures 41

DOPE widget drawing server Terminal also handles mouse and keyboard input DOpE distributed to applications Nitpicker can also operate on raw framebuffer real-time capable 42

TERMINAL Terminal DOpE client providing a terminal window VT100 emulation DOpE can support readline applications Nitpicker shell python 43

REAL-TIME guaranteed update rates of GUI elements video output, animations periodic jobs known frame rate and drawing time support non-real-time applications at the same time unpredictable minimize latency for responsiveness 44

TRADITION traditional GUIs implement GUI elements ( widgets, controls ) outside the display system as a library in the application window system has no global view on objects involved in a redraw cannot predict effects of redraw operations no guarantees 45

DOPE DOpE (Desktop Operating Environment) implements widgets in the window server shared memory buffers for transfer no client interaction for redraw operations 46

SCREENSHOT 47

SCHEDULING processing time for redraw correlates with pixels to be carried over the bus DOpE reserves fixed CPU shares reservation is used to locally schedule redraw operations periodic scheduling of real-time redraws remaining time used for non-real-time drawing 48

SCHEDULING complex non-real-time redraws can be split outstanding redraws can be merged maximum queue length for outstanding redraws is bounded by the screen pixels bounded latency for all graphical output even for non-real-time applications guaranteed response time to user input 49

TRENDS bus-bandwidth-scheduling only sufficient for software drawing today: compositing window managers GPU is becoming an essential co-processor needs to be scheduled (like a CPU?) access must be governed current hardware not well suited no paging in graphics memory (no MMU!) 50

COMQUAD 51

GOAL Components with Quantitative Properties and Adaptivity combine component technology and resource management consider resource consumption of components make real-time guarantees accessible to the common software engineer 52

SUMMARY kernel resource management basic resource management concepts exokernel multiserver management details for specific resources network disk graphics 53

COURSE EIP Applications System Services Basic Abstractions 54