Module Definition

A module is a self-contained component of a system (e.g., a product) which has a well-defined interface to other components of the system. There is typically some degree of substitutability among identical and/or non-identical modules within a system or between systems.

An interface is a shared boundary or connection between two dissimilar objects, devices or systems through which information is passed. The connection can be physical (e.g., mechanical, electrical, chemical, optical and/or electromagnetic) or logical.

Modularization is the design of a system so that it can be constructed using modules. It offers some important advantages over the use of a monolithic approach in the construction of systems. In particular, it facilitates their assembly (including large scale mass production), flexible arrangement, repair, upgrading and expansion. Monolithic refers to something that is created in a single piece rather than from a number of separate pieces, such as a sculpture that is carved from a single piece of marble or a human being.

Modularity (i.e., the existence of systems constructed from modules) can be found throughout the natural world. At one extreme are atoms and subatomic particles (e.g., electrons, protons and neutrons), at the other extreme are heavenly bodies (e.g., planets, stars and even galaxies). Human beings and other living organisms can likewise be viewed as modules; that is, they are components of an ecosystem with each species having standardized interfaces with other species, including specific patterns of sensual (e.g., sight, hearing, touch, taste and smell) and physical (e.g., hunting and gathering) interaction, and substitutability existing among members of a species.

Even words in human languages can be considered as modules. That is, each word is a self-contained component of a phrase, sentence, etc. that has well-defined interfaces with other words as determined by the syntax of the language (e.g., through word order and/or the use of suffixes) and which to some extent can be substituted for other words.

There are often multiple levels and/or types of modularity within a system. Such a hierarchy can clearly be seen in the case of matter, which is composed of molecules, which are, in turn, composed of, atoms, which, in turn, are composed of sub-atomic particles, etc.

As an example of a hierarchy of modularity in man-made products, printed books can be considered as modules in a library (or other book collection). Each book can be regarded as consisting of at least two types of modules: that is, each page is a module in a physical sense (at least until the book is bound) and each chapter is a module in a logical sense. Likewise, books make use of words, which are modules, and libraries can be modules within a library system.

A major trend in the history of industrial societies has been the increasingly greater use of modularity. Modularization has been fundamental to the development of assembly line mass production and modern economies. Some of the most important advances in the development of modularity for industrial products occurred in the armaments industry in New England in the nineteenth century with the development of sophisticated milling machines, lathes and other machine tools that allowed unskilled workers to produce complex parts with high uniformity and at high speed. Similar technology was subsequently employed to produce sewing machines and watches, and later bicycles and typewriters. The result was a large reduction in the cost of production, including assembly, for many types of industrial products, as compared to the former technique of producing them individually or in small batches.

Modularity was thereafter applied to the production of automobiles and electrical and electronic products. It has been extremely important to computers, both hardware and software, and to the Internet and other networks. A computer's hardware is basically just an assembly of various standardized electronic modules (i.e, electronic components). The Internet consists of hosts (i.e., computers connected to it), routers (which automatically determine the optimal routing for messages) and various other network devices, all of which use the TCP/IP (transmission control protocol/Internet protocol) protocols suite as their common interface. This modularity has been a major factor in the outstanding scalability (i.e., ease of expansion) and robustness (i.e., resistance to failure under adverse circumstances) of the Internet.

Modularity has likewise been very important for the development of efficient software. Computer programs are essentially modules that can plug into an operating system, and the improvement of program design so that these modules can also easily interact directly with each other as well represented a major advance in computer efficiency and usability. The development of object-oriented programming languages (such as C++ and Java) represented a major advance in computer programming, particularly with regard to programmer productivity, because of its use of objects, which are merely optimized logical modules.

Some computer experts feel that modular operating systems are superior to monolithic ones. A modular operating system is one that is composed of a relatively small kernel (i.e., the core of an operating system) together with a number of separate but connected programs, rather than a large, highly inclusive kernel. Linux, which is a highly modular operating system, also features a kernel whose size and complexity are restrained by the ability to load special kernel modules dynamically (i.e., as needed).

Computer memory consists of two layers of modules. The smallest is the RAM (random access memory) chips (i.e., pieces of highly processed silicon), each of which is housed in a tiny, high precision plastic package). A number of these chips are then mounted on small circuit boards, each of which forms a memory module. A number of these memory modules are, in turn, plugged into a socket on the motherboard (i.e., the main circuit board in a computer).

The Internet is likewise modular not only in a physical sense but also in several logical senses. It is modular with regard to the way in which data is transmitted over it, that is, in the form of self-contained, replaceable packets, a number of which comprise a message. Moreover, the various services that the Internet offers, including e-mail, FTP (file transfer protocol), VoIP (voice over Internet protocol) and the web, can also be considered modules in the sense that they have standardized interfaces that make them parts of the array of protocols that comprise the Internet, i.e., TCP/IP. Likewise, each web site can be considered a module of the web, and each page on any particular web site is a module of that site.

Very often there are optimal sizes (or ranges of sizes) for modules, whether they be naturally occurring modules or man-made ones. Size can be looked at both in terms of absolute measurements and in terms of the extent to which a system is broken down into a hierarchy of modules. The optimal size, in both senses, depends on the type of module and system, and it is determined by economy, that is, by the minimum cost in terms of the consumption of resources required to attain a certain functionality.

For example, the size of each RAM chip is determined by the maximum yield, which is the number of usable chips that can be obtained from a wafer (i.e., a thin circular section) of silicon on which a large number of identical chips are formed and then diced into individual chips. If the size of each chip is too large, then the number of defects per chip tends to be so high that many of the chips have to be discarded. If the size is too small, fewer chips need to be discarded, but there will be a higher cost per computer because more chips will need to be tested, packaged and mounted to attain a given amount of memory1.

The optimal sizes of modules and the number of levels in a hierarchy of modules can change over time due to various factors, such as the development of new production techniques and changes in the relative costs of various resources. In the case of RAMs, for example, the development of processes for producing finer circuit line widths has made it possible to make smaller sized chips with the same, or larger, memory capacity, thereby reducing costs by obtaining more chips from each wafer. Conversely, the development of a technique that reduces the number of defects per chip would make it more economical to produce larger chips with more memory elements per chip or to integrate logic and memory elements on to a single chip, thereby reducing the number of chips required per computer.

If the Unix philosophy, which is fundamental to the Linux philosophy, had to be summarized in a single word (instead of the usual multiple paragraphs), that word would probably be modularity. That is, the original UNIX was developed to be highly modular in order to be more flexible and user-friendly than the monolithic, complex and awkward operating systems that were in use at the time. This modularity has endured and has been refined through the more than 35 years of experience of Unix-like operating systems; and it has been a major factor in their outstanding durability and continued popularity2 despite their age (which is ancient by computer standards).

1There are also optimal sizes in the natural world, such as that for each living species in a given environment (e.g., temperature range, food availability and existence of predators). Thus, most adult human beings range in height between five and six feet; there are extremely few adults less than three feet or greater than eight feet, as the former could not support the large brain required for human survival and the latter would place an excessive burden on the joints and circulatory system because of the level of gravity that exists on earth.

Different environments can result in different optimal species sizes. For example, it is well known that some species evolve into a smaller size after living on an isolated island for many generations due to a less plentiful supply of foodstuffs and the consequent survival advantage for smaller individuals. This was the case with so-called pygmy elephants and pygmy mammoths, whose fossils have been found on islands in various parts of the world.

2A major factor in the soaring popularity of Linux has been its modularity and the great benefits that result from it. This contrasts with the relatively monolithic nature of the Microsoft Windows operating systems. Although other Unix-like operating systems are also highly modular, Linux has the additional important advantage that it is free software (i.e., free both regard to price and use), in contrast to commercial Unix-like operating systems such as Solaris, AIX and HP-UX.

Created March 1, 2006.
Copyright © 2006 The Linux Information Project. All Rights Reserved.