Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented by Reinette Grobler.

Slides:



Advertisements
Similar presentations
Computer-System Structures Er.Harsimran Singh
Advertisements

Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Tutorial 3 - Linux Interrupt Handling -
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
Chapter 7 Protocol Software On A Conventional Processor.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
Architectural Support for Operating Systems. Announcements Most office hours are finalized Assignments up every Wednesday, due next week CS 415 section.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Jonathan.
Architectural Considerations for CPU and Network Interface Integration C. D. Cranor; R. Gopalakrishnan; P. Z. Onufryk IEEE Micro Volume: 201, Jan.-Feb.
Embedded and Real Time Systems Lecture #4 David Andrews
Disco Running Commodity Operating Systems on Scalable Multiprocessors.
Advanced OS Chapter 3p2 Sections 3.4 / 3.5. Interrupts These enable software to respond to signals from hardware. The set of instructions to be executed.
1 Last Class: Introduction Operating system = interface between user & architecture Importance of OS OS history: Change is only constant User-level Applications.
1 When to Switch Processes 3 triggers –System call, Interrupt and Trap System call –when a user program invokes a system call. e.g., a system call that.
CprE 458/558: Real-Time Systems
Threads CS 416: Operating Systems Design, Spring 2001 Department of Computer Science Rutgers University
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
Soft Timers Efficient Microsecond Software Timer Support for Network Processing MOHIT ARON and PETER DRUSCHEL Rice University Published in ACM Transactions.
1 Chapter 13 Embedded Systems Embedded Systems Characteristics of Embedded Operating Systems.
1 OS & Computer Architecture Modern OS Functionality (brief review) Architecture Basics Hardware Support for OS Features.
Chapter 2: Computer-System Structures
CS 423 – Operating Systems Design Lecture 22 – Power Management Klara Nahrstedt and Raoul Rivas Spring 2013 CS Spring 2013.
General System Architecture and I/O.  I/O devices and the CPU can execute concurrently.  Each device controller is in charge of a particular device.
Hardware Definitions –Port: Point of connection –Bus: Interface Daisy Chain (A=>B=>…=>X) Shared Direct Device Access –Controller: Device Electronics –Registers:
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
Introduction to Embedded Systems Rabie A. Ramadan 6.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
1 Zhao Xia Chapter 2 Process , thread, and scheduling Chapter 2 Process , thread, and scheduling —— kernel services.
I/O management is a major component of operating system design and operation Important aspect of computer operation I/O devices vary greatly Various methods.
I/O Interfacing A lot of handshaking is required between the CPU and most I/O devices. All I/O devices operate asynchronously with respect to the CPU.
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
Srihari Makineni & Ravi Iyer Communications Technology Lab
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Outline for Today Objectives: –Time and Timers Administrative details: –Talk on learning at 4 in 130 North Building –Questions?
Chapter 2 Processes and Threads Introduction 2.2 Processes A Process is the execution of a Program More specifically… – A process is a program.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
We will focus on operating system concepts What does it do? How is it implemented? Apply to Windows, Linux, Unix, Solaris, Mac OS X. Will discuss differences.
4P13 Week 2 & 3 Talking Points 1. Kernel Processes 2.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Operating Systems 1 K. Salah Module 1.2: Fundamental Concepts Interrupts System Calls.
1 Computer Systems II Introduction to Processes. 2 First Two Major Computer System Evolution Steps Led to the idea of multiprogramming (multiple concurrent.
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Managing Processors Jeff Chase Duke University. The story so far: protected CPU mode user mode kernel mode kernel “top half” kernel “bottom half” (interrupt.
Time Management.  Time management is concerned with OS facilities and services which measure real time.  These services include:  Keeping track of.
CORE Lab. E.E. 1 Soft timers : efficient microsecond so ftware timer support for network proc essing Mohit Aron and Peter Druschel 17 th ACM Symposium.
Cluster Computers. Introduction Cluster computing –Standard PCs or workstations connected by a fast network –Good price/performance ratio –Exploit existing.
Unit - I Real Time Operating System. Content : Operating System Concepts Real-Time Tasks Real-Time Systems Types of Real-Time Tasks Real-Time Operating.
Interrupts and Exception Handling. Execution We are quite aware of the Fetch, Execute process of the control unit of the CPU –Fetch and instruction as.
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Soft Timers : Efficient Microsecond Software Timer Support for Network Processing - Mohit Aron & Peter Druschel CS533 Winter 2007.
Mohit Aron Peter Druschel Presenter: Christopher Head
REAL-TIME OPERATING SYSTEMS
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
Memory Caches & TLB Virtual Memory
Copyright ©: Nahrstedt, Angrave, Abdelzaher
OPERATING SYSTEMS CS3502 Fall 2017
Presented by Kristen Carlson Accardi
Chapter 2 Scheduling.
Real-time Software Design
CS 258 Reading Assignment 4 Discussion Exploiting Two-Case Delivery for Fast Protected Messages Bill Kramer February 13, 2002 #
CSE 451: Operating Systems Spring 2008 Module 15 I/O
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Contact Information Office: 225 Neville Hall Office Hours: Monday and Wednesday 12:00-1:00 and by appointment. Phone:
Presentation transcript:

Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented by Reinette Grobler

Managing I/O and other events Asynchronous via Interrupts –Pro: Low latency - occurs immediately after event –Con: High overhead due to context switching Synchronous via Polling –Pro: Avoids interrupts – no context switch –Con: Potential high latency - average latency is (polling interval)/2 Neither overhead of interrupts nor latency of polling is acceptable for high performance time-sensitive applications For example, Gigabit Ethernet network capable of accepting or delivering a full size (1500 byte) packet every 12  sec

Hardware Interrupts Control transfer expensive –Interrupt handler usually higher priority than running process –Save and restore CPU state of interrupted process –Cache and TLB misses experienced upon entry and exit from interrupt handler –Causes cache and TLB pollution for interrupted process Expensive even on modern CPUs –Longer pipelines to improve execution rates –Possibly multiple levels of caches Costs usually acceptable if context switch intervals in millisecond range – not microsecond intervals as in high- performance networks

Hardware Interrupt Overhead off-chip timeron-chip timer Null-event handler without memory references – no cache or TLB pollution Relative cost increases as CPUs get faster Overhead found to be independent of the event frequency

Efficient Event Scheduling Invoke event handler with minimal overhead: avoid interrupts When kernel is already running (for another reason) –Before returning to user mode the kernel checks for and executes pending events –No hardware interrupt: invoking event handler  function call –No need to save or restore CPU state –Memory access locality cost already incurred –Termed: trigger states How often ? –system calls, TLB misses, page faults, I/O interrupts, CPU idle –unpredictable as it depends on workload

Soft Timers Soft timer facility checks for pending soft timer events in trigger states Invokes associated handler when appropriate Can schedule events at much finer granularity than would be feasible using periodic hardware interrupt – as long as system reaches trigger states with sufficient frequency Pending events executed without cost of hardware timer interrupt Overdue events scheduled with hardware interrupt

Hardware Interrupt Cost with Memory References Soft timers: lower cache pollution and lower overhead than hardware timers

Frequency of trigger states When soft timer event is due the associated handler is executed at the earliest time when the system reaches a trigger state Granularity and precision of soft timer facility depends on frequency of trigger states

Optimizations in Network Subsystem Rate-based clocking –Goal: high utilization of bandwidth (depends on measurement or estimation of available bandwidth) –Transmit packets at given rate: potentially one packet every 12  sec in Gigabit Ethernet –Packet transmission scheduled at very fine granularity using soft timers Soft-timer-based network polling –Soft-timer events used to trigger reading of network interfaces’ status registers –Scheduled at  sec granularity –Improved memory access locality –May delay packet processing (configurable)

Rate-based clocking

Network polling Soft timers initiate polling Polling interval adaptively set aggregation quotas from 1 to 15

Tighter delay bounds Soft timer events experience probabilistic delays On-chip timer can be integrated with soft timers – tighter worst-case delays for soft timer events at low cost Soft timer event is scheduled with a scheduled time and a deadline Schedule hardware timer event at earliest deadline of all scheduled soft timer events Hardware timer event handler invokes all expired soft timer events

Conclusion Soft timers allow the efficient scheduling of events at granularity below conventional timers Useful range of soft timer event granularity appears to widen as CPUs get faster Solution for events that require fine granularity and can tolerate probabilistic delays