Feature scattering in the large: a longitudinal study of Linux kernel device drivers

Feature code is often scattered across wide parts of the code base. But, scattering is not necessarily bad if used with care—in fact, systems with highly scattered features have evolved successfully over years. Among others, feature scattering allows developers to circumvent limitations in programming languages and system design. Still, little is known about the characteristics governing scattering, which factors influence it, and practical limits in the evolution of large and long-lived systems. We address this issue with a longitudinal case study of feature scattering in the Linux kernel. We quantitatively and qualitatively analyze almost eight years of its development history, focusing on scattering of device-driver features. Among others, we show that, while scattered features are regularly added, their proportion is lower than non-scattered ones, indicating that the kernel architecture allows most features to be integrated in a modular manner. The median scattering degree of features is constant and low, but the scattering-degree distribution is heavily skewed. Thus, using the arithmetic mean is not a reliable threshold to monitor the evolution of feature scattering. When investigating influencing factors, we find that platform-driver features are 2.5 times more likely to be scattered across architectural (subsystem) boundaries when compared to non-platform ones. Their use illustrates a maintenance-performance trade-off in creating architectures as for Linux kernel device drivers.

[1]  Marco Tulio Valente,et al.  Extracting relative thresholds for source code metrics , 2014, 2014 Software Evolution Week - IEEE Conference on Software Maintenance, Reengineering, and Reverse Engineering (CSMR-WCRE).

[2]  Rob Williams,et al.  Linux device drivers , 2006 .

[3]  Gunter Saake,et al.  Feature-Oriented Software Product Lines , 2013, Springer Berlin Heidelberg.

[4]  Gregor Kiczales,et al.  Aspect-oriented programming , 2001, ESEC/FSE-9.

[5]  Yuanyuan Song,et al.  Information hiding interfaces for aspect-oriented design , 2005, ESEC/FSE-13.

[6]  Krzysztof Czarnecki,et al.  A Study of Variability Models and Languages in the Systems Software Domain , 2013, IEEE Transactions on Software Engineering.

[7]  Sven Apel,et al.  The road to feature modularity? , 2011, SPLC '11.

[8]  Martin P. Robillard,et al.  Representing concerns in source code , 2007, TSEM.

[9]  Bernhard Ganter,et al.  Formal Concept Analysis: Mathematical Foundations , 1998 .

[10]  Stanley M. Sutton,et al.  N degrees of separation: multi-dimensional separation of concerns , 1999, Proceedings of the 1999 International Conference on Software Engineering (IEEE Cat. No.99CB37002).

[11]  Alexander Chatzigeorgiou,et al.  Investigating the effect of evolution and refactorings on feature scattering , 2013, Software Quality Journal.

[12]  Gunter Saake,et al.  Feature-Oriented Software Product Lines , 2013, Springer Berlin Heidelberg.

[13]  Sven Apel,et al.  An analysis of the variability in forty preprocessor-based software product lines , 2010, 2010 ACM/IEEE 32nd International Conference on Software Engineering.

[14]  Michael W. Godfrey,et al.  Evolution in open source software: a case study , 2000, Proceedings 2000 International Conference on Software Maintenance.

[15]  Dror G. Feitelson,et al.  Perpetual development: A model of the Linux kernel life cycle , 2012, J. Syst. Softw..

[16]  Krzysztof Czarnecki,et al.  Feature-to-Code Mapping in Two Large Product Lines , 2010, SPLC.

[17]  Sreekrishnan Venkateswaran Essential Linux Device Drivers , 2008 .

[18]  Shirley Dex,et al.  JR 旅客販売総合システム(マルス)における運用及び管理について , 1991 .

[19]  Jean-Marie Favre,et al.  Preprocessors from an abstract point of view , 1996, 1996 Proceedings of International Conference on Software Maintenance.

[20]  Sven Apel,et al.  Feature-oriented software evolution , 2013, VaMoS.

[21]  James M. Bieman,et al.  The evolution of FreeBSD and linux , 2006, ISESE '06.

[22]  Alfred V. Aho,et al.  Do Crosscutting Concerns Cause Defects? , 2008, IEEE Transactions on Software Engineering.

[23]  Wolfgang Schröder-Preikschat,et al.  Is The Linux Kernel a Software Product Line , 2007 .

[24]  Mia Hubert,et al.  An adjusted boxplot for skewed distributions , 2008, Comput. Stat. Data Anal..

[25]  Oscar Nierstrasz,et al.  Comparative analysis of evolving software systems using the Gini coefficient , 2009, 2009 IEEE International Conference on Software Maintenance.

[26]  Thomas Leich,et al.  Aspectual Feature Modules , 2008, IEEE Transactions on Software Engineering.

[27]  Daniel Lohmann,et al.  Understanding linux feature distribution , 2012, MISS '12.

[28]  Cláudio Sant'Anna,et al.  On the Maintainability of Aspect-Oriented Software: A Concern-Oriented Measurement Framework , 2008, 2008 12th European Conference on Software Maintenance and Reengineering.

[29]  Krzysztof Czarnecki,et al.  Evolution of the Linux Kernel Variability Model , 2010, SPLC.

[30]  Henry Spencer,et al.  #ifdef Considered Harmful, or Portability Experience with C News , 1992, USENIX Summer.

[31]  Sven Apel,et al.  Analyzing the discipline of preprocessor annotations in 30 million lines of C code , 2011, AOSD '11.

[32]  Robert Love,et al.  Linux Kernel Development , 2003 .

[33]  Gregor Snelting,et al.  On the inference of configuration structures from source code , 1994, Proceedings of 16th International Conference on Software Engineering.

[34]  Krzysztof Czarnecki,et al.  A dataset of feature additions and feature removals from the Linux kernel , 2014, MSR 2014.

[35]  Marco Tulio Valente,et al.  Extracting Software Product Lines: A Case Study Using Conditional Compilation , 2011, 2011 15th European Conference on Software Maintenance and Reengineering.

[36]  Greg Kroah-Hartman,et al.  Linux Device Drivers, 3rd Edition , 2005 .

[37]  Cláudio Sant'Anna,et al.  Crosscutting patterns and design stability: An exploratory analysis , 2009, 2009 IEEE 17th International Conference on Program Comprehension.

[38]  H. J. Arnold Introduction to the Practice of Statistics , 1990 .

[39]  Cristina V. Lopes,et al.  Aspect-oriented programming , 1999, ECOOP Workshops.

[40]  Richard C. Holt,et al.  The Linux kernel: a case study of build system variability , 2014, J. Softw. Evol. Process..

[41]  Sven Apel,et al.  Coevolution of variability models and related software artifacts , 2016, Empirical Software Engineering.

[42]  Krzysztof Czarnecki,et al.  Variability modeling in the real: a perspective from the operating systems domain , 2010, ASE '10.

[43]  G.C. Murphy,et al.  Identifying, Assigning, and Quantifying Crosscutting Concerns , 2007, First International Workshop on Assessment of Contemporary Modularization Techniques (ACoM '07).

[44]  D. B. Davis,et al.  Intel Corp. , 1993 .

[45]  Sven Apel,et al.  Does feature scattering follow power-law distributions?: an investigation of five pre-processor-based systems , 2014, FOSD '14.