30 seconds is not enough!: a study of operating system timer usage

The basic system timer facilities used by applications and OS kernels for scheduling timeouts and periodic activities have remained largely unchanged for decades, while hardware architectures and application loads have changed radically. This raises concerns with CPU overhead power management and application responsiveness. In this paper we study how kernel timers are used in the Linux and Vista kernels, and the instrumentation challenges and tradeoffs inherent in conducting such a study. We show how the same timer facilities serve at least five distinct purposes, and examine their performance characteristics under a selection of application workloads. We show that many timer parameters supplied by application and kernel programmers are somewhat arbitrary, and examine the potential benefit of adaptive timeouts. We also discuss the further implications of our results, both for enhancements to the system timer functionality in existing kernels, and for the clean-slate design of a system timer subsystem for new OS kernels, including the extent to which applications might require such an interface at all.

[1]  G. White,et al.  Timeout duration and the suppression of deviant behavior in children. , 1972, Journal of applied behavior analysis.

[2]  Hideyuki Tokuda,et al.  A Time-Driven Scheduling Model for Real-Time Operating Systems , 1985, RTSS.

[3]  Anthony Lauck,et al.  Hashed and hierarchical timing wheels: data structures for the efficient implementation of a timer facility , 1987, SOSP '87.

[4]  Hermann Kopetz,et al.  The real-time operating system of MARS , 1989, OPSR.

[5]  Michael L. Scott,et al.  Multi-model parallel programming in psyche , 1990, PPOPP '90.

[6]  Brian N. Bershad,et al.  Scheduler activations: effective kernel support for the user-level management of parallelism , 1991, TOCS.

[7]  J.M. Smith,et al.  Giving applications access to Gb/s networking , 1993, IEEE Network.

[8]  Ralph E. Droms,et al.  Dynamic Host Configuration Protocol , 1993, RFC.

[9]  W. Richard Stevens,et al.  TCP/IP Illustrated, Volume 1: The Protocols , 1994 .

[10]  V. Jacobson Congestion avoidance and control , 1988, CCRV.

[11]  Larry L. Peterson,et al.  Performance problems in BSD4. 4TCP , 1995, CCRV.

[12]  Michael B. Jones,et al.  An overview of the Rialto real-time architecture , 1996, EW 7.

[13]  B. Srinivasan,et al.  A firm real-time system implementation using commercial off-the-shelf hardware and free software , 1998, Proceedings. Fourth IEEE Real-Time Technology and Applications Symposium (Cat. No.98TB100245).

[14]  David Mosberger,et al.  httperf—a tool for measuring web server performance , 1998, PERV.

[15]  P. Druschel,et al.  Soft timers: efficient microsecond software timer support for network processing , 2000, OPSR.

[16]  Jeff Dike,et al.  A user-mode port of the Linux kernel , 2000, Annual Linux Showcase & Conference.

[17]  David Mazières,et al.  A Toolkit for User-Level File Systems , 2001, USENIX Annual Technical Conference, General Track.

[18]  Robert Wisniewski relayfs : An Efficient Unified Approach for Transmitting Data from Kernel to User Space , 2003 .

[19]  HarrisTim,et al.  Xen and the art of virtualization , 2003 .

[20]  Evolving an OS Kernel using Temporal Logic and Aspect-Oriented Programming , 2003 .

[21]  Richard Mortier,et al.  Using Magpie for Request Extraction and Workload Modelling , 2004, OSDI.

[22]  David A. Patterson,et al.  Path-Based Failure and Evolution Management , 2004, NSDI.

[23]  Binoy Ravindran,et al.  Time/utility function decomposition techniques for utility accrual scheduling algorithms in real-time distributed systems , 2005, IEEE Transactions on Computers.

[24]  Fabrice Bellard,et al.  QEMU, a Fast and Portable Dynamic Translator , 2005, USENIX Annual Technical Conference, FREENIX Track.

[25]  J. Mugler,et al.  Proceedings Formatting Team , 2002 .

[26]  Alan L. Cox,et al.  Whodunit: transactional profiling for multi-tier applications , 2007, EuroSys '07.

[27]  D. Niehaus Hrtimers and Beyond : Transforming the Linux Time Subsystems , 2009 .