1 Predictable Scheduling for a Soft Modem Michael B. Jones – Microsoft Research Stefan Saroiu – University of Washington.

Slides:



Advertisements
Similar presentations
1 Two Case Studies in Predictable Application Scheduling Using Rialto/NT Michael B. Jones – Microsoft Research John Regehr – University of Virginia Stefan.
Advertisements

Vassal: Loadable Scheduler Support for Multi-Policy Scheduling George M. Candea, Oracle Corporation Michael B. Jones, Microsoft Research.
1 Augmented CPU Reservations John Regehr John A. Stankovic University of Virginia May 31, 2001.
CPU Reservations and Time Constraints: Implementation Experience on Windows NT John Regehr – University of Virginia Michael B. Jones – Microsoft Research.
The Problems You’re Having May Not Be the Problems You Think You’re Having: Results from a Latency Study of Windows NT John Regehr — University of Virginia.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
Page 1 Building Reliable Component-based Systems Chapter 15 - Specification of Software Components Chapter 15 Specification of Software Components.
OS Fall ’ 02 Introduction Operating Systems Fall 2002.
Introduction to Operating Systems – Windows process and thread management In this lecture we will cover Threads and processes in Windows Thread priority.
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
Home: Phones OFF Please Unix Kernel Parminder Singh Kang Home:
Informationsteknologi Friday, November 16, 2007Computer Architecture I - Class 121 Today’s class Operating System Machine Level.
OS Spring’03 Introduction Operating Systems Spring 2003.
Towards Resource Aware Applications and Systems Michael B. Jones Microsoft Research.
I/O Systems CS 3100 I/O Hardware1. I/O Hardware Incredible variety of I/O devices Common concepts ◦Port ◦Bus (daisy chain or shared direct access) ◦Controller.
1 Inferring Scheduling Behavior with Hourglass John Regehr School of Computing, University of Utah 6/14/2002.
Chapter 11 Operating Systems
Building Resource-Aware Applications and Systems Michael B. Jones Microsoft Research.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Operating Systems CS208. What is Operating System? It is a program. It is the first piece of software to run after the system boots. It coordinates the.
Race Conditions CS550 Operating Systems. Review So far, we have discussed Processes and Threads and talked about multithreading and MPI processes by example.
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 Systems CSCI 444/544 Operating Systems Fall 2008.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Performance Evaluation of Real-Time Operating Systems
Chapter 3 Operating Systems Introduction to CS 1 st Semester, 2015 Sanghyun Park.
Real-Time Software Design Yonsei University 2 nd Semester, 2014 Sanghyun Park.
I/O Systems I/O Hardware Application I/O Interface
1 Scheduling Processes. 2 Processes Each process has state, that includes its text and data, procedure call stack, etc. This state resides in memory.
Windows NT and Real-Time? Reading: “Inside Microsoft Windows 2000”, (Solomon, Russinovich, Microsoft Programming Series) “Real-Time Systems and Microsoft.
1-1 Embedded Network Interface (ENI) API Concepts Shared RAM vs. FIFO modes ENI API’s.
Predictable Scheduling for a Soft Modem Stefan Saroiu – University of Washington Michael.
Chapter 13: I/O Systems. 13.2/34 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware.
Scheduling Lecture 6. What is Scheduling? An O/S often has many pending tasks. –Threads, async callbacks, device input. The order may matter. –Policy,
Time Management.  Time management is concerned with OS facilities and services which measure real time, and is essential to the operation of timesharing.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
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.
CE Operating Systems Lecture 2 Low level hardware support for operating systems.
Chapter 6: Computer Components Dr Mohamed Menacer Taibah University
Supporting Time Sensitive Application in a Commodity OS Ashvin Goel, Luca, Charles, Jim, Jonathan Walpole Oregon Graduate Institute, Portland Presented.
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 13: I/O Systems Overview I/O Hardware Application.
Computer Organization Instruction Set Architecture (ISA) Instruction Set Architecture (ISA), or simply Architecture, of a computer is the.
Chapter 3 Operating Systems. © 2005 Pearson Addison-Wesley. All rights reserved 3-2 Chapter 3 Operating Systems 3.1 The Evolution of Operating Systems.
Silberschatz, Galvin, and Gagne  Applied Operating System Concepts Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O.
Silberschatz and Galvin  Operating System Concepts Module 1: Introduction What is an operating system? Simple Batch Systems Multiprogramming.
Chapter 13: I/O Systems.
REAL-TIME OPERATING SYSTEMS
Module 12: I/O Systems I/O hardware Application I/O Interface
Chapter 3: Process Concept
EEE Embedded Systems Design Process in Operating Systems 서강대학교 전자공학과
CS 6560: Operating Systems Design
Intro to Processes CSSE 332 Operating Systems
CS 286 Computer Organization and Architecture
Chapter 6: CPU Scheduling
CSCI 315 Operating Systems Design
I/O Systems I/O Hardware Application I/O Interface
Operating System Concepts
13: I/O Systems I/O hardwared Application I/O Interface
CS703 - Advanced Operating Systems
Lecture Topics: 11/1 General Operating System Concepts Processes
Chapter 6: CPU Scheduling
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Module 12: I/O Systems I/O hardwared Application I/O Interface
Presentation transcript:

1 Predictable Scheduling for a Soft Modem Michael B. Jones – Microsoft Research Stefan Saroiu – University of Washington

2 Consumer Real-Time General-purpose Operating Systems, such as Windows 2000: –maximize aggregate throughput –approximate fair sharing of the resources Increasing use of time-dependent tasks –signal processing, audio, video Need support for: –predictable scheduling for independently developed applications –low latency responses –explicit resource allocation mechanisms

3 Why Study Soft Modems ? Signal Processing done on host CPU: –requires predictable scheduling –requires low latency responses While coexisting with other system activities –Soft Modem is a background real-time task Successful in home computer market: –Low cost –Easy to update – software upgrade

4 Methodology Instrumented Windows 2000 performance kernel: –Logs predefined and custom events –Writes them to a memory buffer –Dumps buffers to disk at end of trace Driver Software: –No source for signal processing code Measurement Environment: –All experiments run with normal-priority spinning competitor thread System: –Windows 2000 Professional –Pentium II 450 MHz (uniprocessor) –384 MB ECC SDRAM MB allocated to logging

5 Vendor Driver - Signal Processing in Interrupt (INT) Operation of the modem: –1. DMA transfers between A/D and D/A and physical memory –2. When enough data samples, the modem raises an interrupt –3. Inside ISR, process incoming data and provide outgoing samples, before buffers exhausted Uses input and output data buffers holding bit samples (1024 bytes/buffer)

6 Three Additional Versions DPC Version (DPC) –The ISR queues a DPC –DPC performs signal processing Thread Version (THR) –The ISR queues a DPC that signals a thread via a semaphore –Thread performs signal processing –Experimented with several different priorities Rialto/NT Version (RES) –Same as THR, but thread scheduled using Rialto/NT real-time periodic CPU Reservation

7 Interrupt Rate 3 different phases, interrupts very regular Falls within PC 99 recommended interrupt rates of 3-16ms

8 Elapsed Times in ISR (INT) PC 99 recommends maximum time during which a driver-based modem disables interrupts should not exceed 100 µs 1.8 ms with repeatable worst case of 3.3 ms

9 CPU Utilization 14.7% sustained load on 450MHz Pentium II

10 Elapsed Times in ISR (DPC) ISR times now small, typically < 6µs

11 Elapsed Times in Queued DPC PC 99 recommends that the total execution time required for all queued DPCs should not exceed 500 µs But now long DPC times: 1.8ms avg., 3.3 max (same as elapsed times in ISR for INT)

12 Samples Pending to be Processed (INT & THR 24) Small relative to 512 sample buffer size

13 Samples Pending to be Processed (THR 8) Unsurprisingly, contention kills modem

14 Latency Results Set the multimedia timers to fire once every millisecond Register a routine to be called every millisecond Routine does very little work –Stores cycle counter value and sleeps again Histograms show differences between recorded times and ideal times

15 Coexisting Thread Latencies (Control Case - No Modem) Maximum 1978µs between wakeups

16 Coexisting Thread Latencies (INT) Maximum 5313µs between wakeups

17 Coexisting Thread Latencies (DPC) Maximum 4396µs between wakeups

18 Coexisting Thread Latencies (THR 24) Maximum 2239µs between wakeups

19 What Have We Learned So Far? Signal processing in the context of the interrupt handler is: –unnecessary –detrimental to the latencies and predictability of coexisting activities Vendor choice understandable –For any priority there is a potentially unbounded delay between the interrupt and the thread running In practice –Delays are reasonable for well-configured systems [Intel OSDI ’99] –Using interrupts extreme form of priority inflation

20 Two Possible Solutions Rate Monotonic Analysis – determine the “right” priority assignments among all threads. Two problems: –Assumes cooperative priority assignment among all threads - unrealistic –Working priority assignment dependent upon timing requirements of all threads +Changes in application mix may require changes in priority assignments Use a time-based real-time scheduler –Such as Rialto/NT

21 Rialto/NT Abstractions Two real-time software abstractions: –CPU Reservations – ongoing reservation for at least X time units out of every Y units for a thread –Time Constraints – one-shot time reservation for specified amount of work between start time and deadline The Soft Modem work only uses CPU Reservations

22 Rialto/NT Implementation Rialto/NT developed on top of Windows 2000 priority scheduler Limitations: –CPU Reservations must be integer multiples of milliseconds –Frequency of reservations must be power-of-two multiple of 1ms

23 Samples Pending to be Processed (RES 2ms/8ms – 25%) Fits well within 512-sample buffer size

24 Coexisting Thread Latencies (RES 2ms/8ms – 25%) Maximum 1971µs between wakeups

25 File Transfer Times Results for 10 copies of 200,000 bytes each For 1/8, 2/15, 3/17, 4/17, 7/20 no test passed

26 Modem Reservation Ranges Sensitivity to both percentage and gaps If period < 12.5ms, must get 14.7% to work If period > 12.5ms, (period – amount) >= 12.5ms must also hold

27 Conclusions Signal Processing in interrupt context is: –Unnecessary –Detrimental to the predictability and latencies of the coexisting activities The DPC version has similar problems Threads help alleviate these problems –Modem runs well with real-time priorities and non- real-time competition –However modem threads may interfere with other threads Real-time scheduler allows –Control over modem’s degree of interference with other time-sensitive activities –Performance isolation for threads using reservations

28 Industry Perspective Vendor did build their own THR version –Worked fine during normal load –However, modem was starved when +copying data between two IDE devices +using USB scanner (Intel 440BX chipset) that turned off interrupts for ms –Therefore they shipped the INT version Vendor is willing to be a “good citizen” –if ensured that others would be as well Systematic latency timing verification of components is needed to enforce good behavior

29 Soft DSL is Coming More demanding than soft modems –4ms processing period G.lite –1.531Mbps downstream and 512Kbps upstream –~ 25% of a 600 MHz Pentium III Full rate DSL –3.062Mbps downstream and 512Kbps upstream –Nearly 50% of a 600 MHz Pentium III Soft Bluetooth period 312.5µs

30 Further Research Possibilities Soft DSL studies Multiple soft devices within the same machine Similar studies on multiprocessors

31 For More Information See the authors: –Mike Jones + –Stefan Saroiu + See related papers at Mike’s web site