Eliminating Receive Livelock in an Interrupt-driven Kernel Jeffrey C. Mogul K. K. Ramakrishnan AT&T Bell Laboratories

Slides:



Advertisements
Similar presentations
Scheduling Introduction to Scheduling
Advertisements

CSC 360- Instructor: K. Wu Overview of Operating Systems.
CH7 discussion-review Mahmoud Alhabbash. Q1 What is a Race Condition? How could we prevent that? – Race condition is the situation where several processes.
William Stallings Data and Computer Communications 7 th Edition Chapter 13 Congestion in Data Networks.
OPERATING SYSTEMS Threads
Chap 4 Multithreaded Programming. Thread A thread is a basic unit of CPU utilization It comprises a thread ID, a program counter, a register set and a.
Real-Time Kernels and Operating Systems Basic Issue - Purchase commercial “off-the- shelf” system or custom build one Basic Functions –Task scheduling.
Review: Chapters 1 – Chapter 1: OS is a layer between user and hardware to make life easier for user and use hardware efficiently Control program.
Chapter 7 Protocol Software On A Conventional Processor.
ECE 526 – Network Processing Systems Design Software-based Protocol Processing Chapter 7: D. E. Comer.
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.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
CSE Fall Introduction - 1 What is an Embedded Systems  Its not a desktop system  Fixed or semi-fixed functionality (not user programmable)
3.5 Interprocess Communication
Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented by Reinette Grobler.
Internet and Intranet Protocols and Applications Section V: Network Application Performance Lecture 11: Why the World Wide Wait? 4/11/2000 Arthur P. Goldberg.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Evaluating System Performance in Gigabit Networks King Fahd University of Petroleum and Minerals (KFUPM) INFORMATION AND COMPUTER SCIENCE DEPARTMENT Dr.
1 Operating Systems Ch An Overview. Architecture of Computer Hardware and Systems Software Irv Englander, John Wiley, Bare Bones Computer.
OS and the Computer System  Some OS programs exist permanently in the system area of the memory to monitor and control activities in the computer system.
G Robert Grimm New York University Receiver Livelock.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
1 Process States (1) Possible process states –running –blocked –ready Transitions between states shown.
Interrupts Signal that causes the CPU to alter its normal flow on instruction execution ◦ frees CPU from waiting for events ◦ provides control for external.
LWIP TCP/IP Stack 김백규.
1 Previous lecture review n Out of basic scheduling techniques none is a clear winner: u FCFS - simple but unfair u RR - more overhead than FCFS may not.
CS 153 Design of Operating Systems Spring 2015 Lecture 11: Scheduling & Deadlock.
Make Hosts Ready for Gigabit Networks. Hardware Requirement To allow a host to fully utilize Gbps bandwidth, its hardware system must be ready for Gbps.
Chapter 41 Processes Chapter 4. 2 Processes  Multiprogramming operating systems are built around the concept of process (also called task).  A process.
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.
The Functions of Operating Systems Interrupts. Learning Objectives Explain how interrupts are used to obtain processor time. Explain how processing of.
1 Scheduling The part of the OS that makes the choice of which process to run next is called the scheduler and the algorithm it uses is called the scheduling.
Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13.
Operating Systems David Goldschmidt, Ph.D. Computer Science The College of Saint Rose CIS 432.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Process Scheduling 1 Chapter 5. Process Scheduling Clock interrupt handling Scheduler goal Traditional UNIX scheduling SVR4 scheduler Solaris 2.x scheduling.
Operating Systems Scheduling. Bursts of CPU usage alternate with periods of waiting for I/O. (a) A CPU-bound process. (b) An I/O-bound process. Scheduling.
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 CSE451 Architectural Supports for Operating Systems Autumn 2002 Gary Kimura Lecture #2 October 2, 2002.
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Oindrila.
The Mach System Abraham Silberschatz, Peter Baer Galvin, and Greg Gagne Presented by: Jee Vang.
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.
Operating Systems CSE 411 CPU Management Sept Lecture 10 Instructor: Bhuvan Urgaonkar.
Processes, Threads, and Process States. Programs and Processes  Program: an executable file (before/after compilation)  Process: an instance of a program.
2002 Networking Operating Systems (CO32010) 1. Operating Systems 2. Processes and scheduling 3.
CSE 153 Design of Operating Systems Winter 2015 Midterm Review.
Interrupt driven I/O Computer Organization and Assembly Language: Module 12.
Silberschatz, Galvin and Gagne ©2011 Operating System Concepts Essentials – 8 th Edition Chapter 2: The Linux System Part 3.
1.  System Characteristics  Features of Real-Time Systems  Implementing Real-Time Operating Systems  Real-Time CPU Scheduling  An Example: VxWorks5.x.
1 CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor Scheduling Real-Time Scheduling.
Low Overhead Real-Time Computing General Purpose OS’s can be highly unpredictable Linux response times seen in the 100’s of milliseconds Work around this.
Embedded Real-Time Systems Processing interrupts Lecturer Department University.
Transmitter Interrupts Review of Receiver Interrupts How to Handle Transmitter Interrupts? Critical Regions Text: Tanenbaum
Advanced Operating Systems CS6025 Spring 2016 Processes and Threads (Chapter 2)
Preventing Interrupt Overload Presented by Jiyong Park Seoul National University, Korea John Regehr, Usit Duogsaa, School of Computing, University.
REAL-TIME OPERATING SYSTEMS
Process Management Process Concept Why only the global variables?
OPERATING SYSTEMS CS3502 Fall 2017
CGS 3763 Operating Systems Concepts Spring 2013
Operating Systems Chapter 5: Input/Output Management
Chapter 2: The Linux System Part 3
Operating Systems.
CSE 451: Operating Systems Autumn 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 596 Allen Center 1.
CSE 451: Operating Systems Autumn 2001 Lecture 2 Architectural Support for Operating Systems Brian Bershad 310 Sieg Hall 1.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Supporting Time-Sensitive Applications on a Commodity OS
CSE 451: Operating Systems Winter 2003 Lecture 2 Architectural Support for Operating Systems Hank Levy 412 Sieg Hall 1.
CSE 153 Design of Operating Systems Winter 2019
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Eliminating Receive Livelock in an Interrupt-driven Kernel Jeffrey C. Mogul K. K. Ramakrishnan AT&T Bell Laboratories 1996 USENIX

Problem: receive livelock –the system spends all its time processing interrupts, to the exclusion of other necessary tasks Solution: load dependant scheduling –The OS lowers the priority of network interrupt handling as load increases

OS Scheduling Techniques Interrupts –When a task requires service, it generates an interrupt. The interrupt handler provides some service immediately. Polling –When a task requires service, it turns on a flag. The OS polls the flags periodically, and provides some service to the tasks with flags turned on.

Benefits of Scheduling Techniques Interrupts –Much lower overhead –Rapid response Polling –Perform better under heavy load

How interrupt-driven scheduling causes excess latency under overload Timeline of Ethernet packet processing link-level processing at device IPL, which includes copying the packet into kernel buffers further processing following a software interrupt, which includes locating the appropriate user process, and and queueing the packet for delivery to this process finally, awakening the user process, which then (in kernel mode) copies the received packet into its own buffer.

Under Load, Avoid Livelock –Use interrupts only to initiate polling. –Use round-robin polling to fairly allocate resources among event sources. –Temporarily disable input when feedback from a full queue, or a limit on CPU usage, indicates that other important tasks are pending. –Drop packets early, rather than late, to avoid wasted work. Try to process packets that are received to completion. Unloaded, Maintain High Performance –Re-enable interrupts when no work is pending, to avoid polling overhead and to keep latency low. –Let the receiving interface buffer bursts, to avoid dropping packets. –Eliminate the IP input queue, and associated overhead.

Livelock in a Unix router filled circles: kernel-based forwarding performance open squares: the screend program, a firewall application

Why livelock occurs in the 4.2BSD Router

Fixing the livelock problem Do as much work as possible in a kernel thread Eliminate the IP input queue and its associated queue manipulations and software interrupt

Guaranteeing progress for user-level processes