Synchronization for fast and reentrant operating system kernel tracing

  • Authors:
  • Mathieu Desnoyers;Michel R. Dagenais

  • Affiliations:
  • (With EfficiOs, work done while at the Comp. and Softw. Eng. Dept., Ecole Polytechnique de Montreal) École Polytechnique de Montréal, Dept. of Comp. and Softw. Eng., C.P. 6079, succ. Cen ...;École Polytechnique de Montréal, Department of Computer and Software Engineering, C.P. 6079, succ. Centre-ville, Montréal, Que., Canada H3C 3A4

  • Venue:
  • Software—Practice & Experience - Focus on Selected PhD Literature Reviews in the Practical Aspects of Software Technology
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

To effectively trace an operating system, a performance monitoring and debugging infrastructure needs the ability to trace various execution contexts. These contexts range from kernel running as a thread to Non-Maskable Interrupt ( NMI) contexts. Given that any part of the kernel infrastructure used by a kernel tracer could lead to infinite recursion if traced, and because most kernel primitives require synchronization unsuitable for some execution contexts, all interactions of the tracing code with the existing kernel infrastructure must be considered in order to correctly inter-operate with the existing operating system kernel. This paper presents a new low overhead tracing mechanism and motivates the choice of synchronization sequences suitable for operating system kernel tracing, namely local atomic instructions as main buffer synchronization primitive and the Read–Copy Update ( RCU) mechanism to control tracing. It also proposes a wait-free algorithm extending the time-base needed by the tracer to 64-bit on architectures that lack hardware 64-bit time-base support. Copyright © 2010 John Wiley & Sons, Ltd.