Speculative Use of Idle Resources Ph.D
Total Page:16
File Type:pdf, Size:1020Kb
Speculative Use of Idle Resources Ph.D. Dissertation Proposal Lars Eggert [email protected] Computer Science Department University of Southern California Los Angeles, CA 90089-0781 USA October 22, 2001 (Appendices added July 2, 2002) Abstract Even a fully loaded computer system, where the bottleneck resource is constantly busy, often has some idle capacities available on other resources. This proposal argues for using these idle ca- pacities speculatively, increasing system performance for correct predictions. In such a system, all resources will ideally be constantly loaded with either regular foreground tasks, or speculative idle-time tasks. The key contribution of this proposal is a model for non-interfering use of idle resource capacity, based on three principles: resource prioritization between regular foreground and idle-time use, preemptability of idle-time processing, and isolation of speculative side effects. Current operating systems fail to provide all three capabilities. Without new mechanisms, processing of speculative tasks can delay or even starve foreground processing, and result in a decreased foreground per- formance, instead of increasing it. Under the proposed model, speculative tasks only execute using otherwise idle resource capaci- ties; the model also shields foreground processing from the side effects of their presence in the system. Thus, speculation can no longer delay or interfere with foreground processing. Based on the model, a proof-of-concept design of network extensions for idle-time service can isolate fore- ground network packets from the presence of idle-time traffic to within 1-2% throughput. The remainder of this thesis will focus on idle-time support for the network file system (NFS). Idle-time NFS requires an extension of the current mechanism to disk I/O and storage capacity, as well as new mechanisms to isolate speculative side effects based on virtualization of OS state. - i - Contents 1 Introduction 1 2 A Model for Speculative Use of Idle Resources 6 2.1 Introduction ...................................................................................................................6 2.2 Principles for Speculative Use....................................................................................... 9 2.2.1 Prioritization ............................................................................................... 11 2.2.2 Preemptability............................................................................................. 14 2.2.3 Isolation....................................................................................................... 16 2.3 Application of the Model to OS Extensions................................................................ 19 2.3.1 Prioritization ............................................................................................... 19 2.3.2 Preemptability............................................................................................. 21 2.3.3 Isolation....................................................................................................... 22 2.4 Integrated Scheduling.................................................................................................. 23 3 Discussion 25 3.1 Applications and Benefits............................................................................................ 25 3.1.1 Network Service.......................................................................................... 26 3.1.2 Disk Service................................................................................................ 28 3.1.3 Application-Layer Uses .............................................................................. 29 3.2 Challenges ................................................................................................................... 29 3.2.1 Inter-Resource Interference......................................................................... 30 3.2.2 Preemption Overhead.................................................................................. 31 3.2.3 Cache Pollution vs. Pre-Load Effect........................................................... 33 3.2.4 Speculative Workload Generation............................................................... 34 3.2.5 Miscellaneous Issues................................................................................... 35 4 Idle-Time Networking 36 4.1 Idle-Time Network Model........................................................................................... 36 - ii - 4.2 Idle-Time Networking with Current OS Mechanisms................................................. 38 4.2.1 Experimental Setup..................................................................................... 39 4.2.2 Full Foreground Load ................................................................................. 40 4.2.3 Light Foreground Load............................................................................... 41 4.3 Conventional Network Stack Processing..................................................................... 43 4.3.1 Outbound Network Processing ................................................................... 44 4.3.2 Inbound Network Processing...................................................................... 46 4.3.3 Discussion................................................................................................... 48 4.4 OS Extensions for Idle-Time Networking................................................................... 50 4.4.1 Design Goals............................................................................................... 51 4.4.2 Design ......................................................................................................... 51 4.5 Experimental Evaluation ............................................................................................. 54 4.5.1 Full Foreground Load ................................................................................. 54 4.5.2 Light Foreground Load............................................................................... 55 4.5.3 Discussion................................................................................................... 55 5 Related Work 57 5.1 Real-Time Systems...................................................................................................... 57 5.1.1 Examples..................................................................................................... 57 5.1.2 Discussion................................................................................................... 58 5.2 Speculative Uses of Idle Capacity............................................................................... 61 5.2.1 Prefetching and Caching ............................................................................. 61 5.2.1.1 Effects on System Caches ............................................................... 62 5.2.2 Optimization and Maintenance ................................................................... 63 5.2.3 Idle-Time Execution.................................................................................... 63 5.2.3.1 Process Migration............................................................................ 64 5.2.3.2 Data Migration ................................................................................ 66 5.2.3.3 Speculative Execution in Hardware ................................................ 66 5.2.3.4 Speculative Execution in Software ................................................. 68 - iii - 6 Plan 69 7 Appendix: Extended Research Plan 72 8 Appendix: Related Work – Concurrency Control 74 8.1 Concurrency Control in Database Systems ................................................................. 74 8.1.1 Locking ....................................................................................................... 75 8.1.2 Timestamps ................................................................................................. 75 8.1.3 Rollback ...................................................................................................... 75 8.2 Discussion.................................................................................................................... 76 8.2.1 OS Processes as Database Applications...................................................... 76 8.2.2 Concurrency Control for State Merging...................................................... 77 8.2.3 Concurrency Control for Speculative Use .................................................. 78 8.3 Conclusion................................................................................................................... 79 - iv - Figures Figure 1: Scheduler for a temporally-shared resource without prioritization............................. 11 Figure 2: Scheduler for a temporally-shared resource with prioritization.................................. 12 Figure 3: Scheduler for a spatially-shared resource without prioritization. ............................... 12 Figure 4: Scheduler for a spatially-shared resource with prioritization...................................... 13 Figure 5: Scheduler for a temporally-shared resource without preemptability........................... 13 Figure 6: Scheduler for a temporally-shared resource with preemptability................................ 14 Figure 7: Scheduler for a spatially-shared resource without preemptability............................... 15 Figure 8: Scheduler for a spatially-shared resource with preemptability...................................