Common Coupling As a Measure of Reuse Effort in Kernel-Based Software with Case Studies on the Creation of Mklinux and Darwin
Total Page:16
File Type:pdf, Size:1020Kb
IUScholarWorks at Indiana University South Bend Common Coupling as a Measure of Reuse Effort in Kernel-Based Software with Case Studies on the Creation of MkLinux and Darwin Yu, Liguo To cite this article: Yu, Liguo. “Common Coupling as a Measure of Reuse Effort in Kernel-Based Software with Case Studies on the Creation of MkLinux and Darwin.” Journal of the Brazilian Computer Society14, vol. 14, no. 1, Feb. 2008, pp. 45–55. This document has been made available through IUScholarWorks repository, a service of the Indiana University Libraries. Copyrights on documents in IUScholarWorks are held by their respective rights holder(s). Contact [email protected] for more information. Common Coupling as a Measure of Reuse Effort in Kernel-Based Software with Case Studies on the Creation of MkLinux and Darwin Liguo Yu Department of Informatics Computer and Information Sciences Department Indiana University South Bend South Bend, IN 46634, USA. Fax: 1-574-520-5589 E-mail: [email protected] The initial version of this paper appers in the 19th International Conference on Software Engineering and Knowledge Engineering. Abstract software components, which required less effort in order to be reused to produce Darwin. An obstacle to software reuse is the large number of major modifications that frequently have to be made Keywords: Reuse, common coupling, kernel-based software, as a consequence of dependencies within the reused MkLinux, Darwin software components. In this paper, common coupling is categorized and used as a measure of the dependencies 1. INTRODUCTION between software components. We compared common Software reuse has become a topic of interest within coupling in three operating systems, Linux, FreeBSD, the software community because of its potential and Mach, and related it to the reuse effort of these benefits. These include increased productivity and systems. The measure is evaluated by studying the quality, and decreased cost and time-to-market. creation of two operating systems, MkLinux which is Obviously the biggest savings are to be found in large- based on the reuse of Linux and Mach, and Darwin scale reuse, that is, the reuse of a large portion of an which is based on the reuse of FreeBSD and Mach. We existing software product. A considerable amount of conclude that the way that common coupling is research has been undertaken in this area [1, 2, 3]. implemented in Linux kernel induces large dependencies One problem with software reuse is that large between software components, which required more software components may be dependent on other effort in order to be reused to produce MkLinux, while components. On the one hand, suppose that the the common coupling implemented in the Mach and components of a software product are classes that FreeBSD kernels induces few dependencies between communicate exclusively by message passing. The Common Coupling as a Measure of Reuse Effort in Kernel-Based Liguo Yu Software with Case Studies on the Creation of MkLinux and Darwin dependency between the components is low, and it should and Mach, and Darwin is produced through the reuse of be possible to reuse one component in a new software FreeBSD and Mach. However, MkLinux and Darwin product with little difficulty. But if a software product have different fates. MkLinux is active for only several consists of components, all of which reference a large years (1996 to 2001) and the development is dormant number of global variables, it may be impossible to reuse now. In contrast, Darwin is considered a successfully any one component in a new product without first totally project and has continually being developed and used redesigning and reimplementing that component, thereby since 1998. In this paper, we use common coupling as a all but defeating the purpose of reuse. measure to study the reuse effort in the creation of the two operating systems. Many software products, including operating systems and database management systems, are kernel-based. The remainder of the paper is divided into six That is, each implementation consists of required kernel sections. Section 2 discusses component dependencies components, together with specific optional architecture- and reuse effort. In Section 3, we review the specific or hardware-specific non-kernel components. The categorization of common coupling and discuss its word kernel is overloaded. It can refer to a nucleus that relation to reuse effort. We introduce additional can execute certain instructions [4, 5], or to a set of terminology in Section 4. Section 5 describes MkLinux, modules that are included in every installation. In this Darwin, and other open-source operating systems. Section paper, we use “kernel” in the latter sense. 6 contains the results of our study of open-source operating systems. The conclusions are in Section 7. Coupling is a measure of the degree of interaction between two software components. It reflects the modifiability and the maintainability of a software 2. SOFTWARE DEPENDENCIES AND REUSE product [6]. There are many different categorizations of EFFORT coupling, all of which include common (global) Coupling is a measure of the degree of dependency coupling (two software components are common between two software components (classes, modules, coupled if they reference the same global variable). packages, or the like). A good software system should Certain types of coupling, especially common coupling, have high cohesion within each component and weak are considered to present risks for software development coupling between components. Coupling between and, in particular, for maintenance [7]. Common components strengthens the dependency of one coupling can also be used to measure the dependencies component on others and increases the probability that between software components [8]. To reuse a kernel changes in one component may affect other components. component in another software product, it is important There are several different coupling categorizations [6, that the kernel component should have minimal 9], all of which include common coupling. Common dependency on other components. Accordingly, it is coupling is considered to be a strong form of coupling, important that the kernel components have as little that is, it induces strong dependencies between software common coupling as possible. components, making software components difficult to In a previous study, Yu et al. [8] defined a new understand, maintain, and reuse [7]. categorization of common coupling within kernel-based If a software component has strong dependencies (such software, and used it to measure the maintenance effort as common coupling) on other components, it requires of kernel-based software. In this paper, we extend the more effort to be adapted to a new environment. Common categorization and use it to evaluate reuse effort in coupling makes a software component difficult to reuse for kernel-based software. Reuse and maintenance are two reasons. First, suppose that we wish to reuse different in many ways. For example, reuse is almost component C0, and that C0 is common coupled to n always optional, and often just one component or a few components C1, C2, … Cn. One alternative would be to related components are reused. In contrast, maintenance incorporate and reuse not just C0 but also components C1 is usually required, especially corrective maintenance, through Cn as well. However, this would result in and maintenance has to be performed on a software unnecessary reuse and make the resulting product hard to product as a whole (hence the need for regression comprehend. A second alternative is to reuse component testing). On the other hand, reuse and maintenance have C0 on its own, that is, without components C1 through Cn. at least one feature in common: Both are adversely In order to do this, we would need to make major affected by common coupling. modifications to C0. In fact, these modifications might well MkLinux and Darwin are the outcomes of Apple be so drastic that it would be cheaper and quicker to design Computer’s endeavor to create new operating systems and implement a new version of C0 from scratch, rather based on the reuse of existing operating systems, in than reuse the existing version. Therefore, it requires more which MkLinux is produced through the reuse of Linux effort to reuse a component with strong coupling, like common coupling. 46 Common Coupling as a Measure of Reuse Effort in Kernel-Based Liguo Yu Software with Case Studies on the Creation of MkLinux and Darwin The kernel is the common part of a kernel-based We consider two types of reuse. We refer to the software product. It is the most frequently reused reuse of one or more independent kernel components as component; reuse of kernel-based software usually kernel-component reuse and the reuse of all of the kernel consists of reusing all or most of the kernel, together as entire-kernel reuse. When we wish to refer to either with certain other non-kernel components. Therefore, kernel-component reuse or entire-kernel reuse, we use the effort involved in reusing the kernel reflects the the umbrella term kernel reuse. reuse effort of a kernel-based software product. Dependencies induced by common coupling affect Common coupling within a kernel-based product may the reuse effort; in general, more effort is needed to increase the dependency of the kernel on non-kernel reuse a component with a large number of global components and, therefore, it would require more effort variables. However, reuse effort is also affected by the to reuse the kernel or the software product as a whole. category into which each global variable falls. 3. COMMON COUPLING AND SOFTWARE A category-1 global variable is not used in a kernel component, so definitions of the global REUSE EFFORT variable in other components (kernel or non-kernel) Common coupling induces dependencies between cannot affect kernel components. All kernel software components.