Linux: the Free Unix Clone for IBM PCs


Author: Ed H. Chi (ehhchi@epx.cis.umn.edu)

Copyright 1994 The Regents of the University of Minnesota


Table of Contents


What is Unix?

Linux is a Unix operating system clone for the Intel 386/486/Pentinum machines. You might have just thought to yourself, "huh? what is he talking about?" However, don't be confused. First, let me explain what is "Unix".

Unix is an operating system designed at the Bell Laboratories of AT&T back in the 1970s. It started out in 1969 when the famous Dennis Ritchie and Ken Thompson decided to put the little-used old PDP-7 machine in the corner of the lab back to life. The name "UNIX", or at first "Unics," was intended as a pun on "Multics," which was an operating system developed at MIT. For the first 10 years, Unix development was essentially confined to Bell Labs at AT&T. The initial versions were for DEC's PDP-11 16-bit machine, and later it moved on to a VAX computers.

Unix was a landmark in operating system design and implementation. The C language was originally designed for the Unix operating system, and hence there is a strong synergy between C and Unix. After Unix was rewritten in C in 1973 (the year I was born), it could now be ported to a new hardware in months, and changes became easier. Many companies took the source code and modified it to create this own version of Unix. The development progressed at AT&T for many years, and now its version of Unix is called "System V." The Computer System Research Group of the University of California at Brekeley has their own flavor of Unix called the BSD, or the Brekeley System Distribution.

System V and BSD are the two main flavors of Unix. UNIX now comes in an incredible variety of flavors that are being shipped by various computer vendors. Unfortunately, most Unices (the plural form of Unix) are derived more or less directly from AT&T code (some code from the first C version is presumably still left in most Unices). Due to the incompatibility problems between Unices, the IEEE has begun to standardize Unix by specifying the usual features of Unix in the POSIX specification.

Since most Unices are derived from AT&T's proprietary code, a royalty fee must be paid for each copy of the operating system sold. Luckily, there are also Unix clones (i.e. Unix-compatible systems with no AT&T code).

So, what IS Linux?

Linux is an independant implementation of the POSIX operating system specification, with System V and BSD extensions, that has been written entirely from scratch. It contains no proprietary AT&T code. It only works on IBM PC compatibles with an ISA or EISA bus and a Intel 80386(1) or higher processor. The Linux kernel(2) is written by Linus B. Torvalds (torvalds@kruuna.helsinki.fi) from Finland, and by other volunteers. Most of the programs running under Linux are generic Unix freeware that can be obtained from many places around the world. Linux is freely distributable under the GNU(3) Public License, which means it is copyrighted but can be obtained free of cost. All source code is available, including the whole kernel and all drivers, the development tools and all user programs; also, all of it is freely distributable.

Because Linux is free and runs on one of the most popular platforms, the IBM PC compatibles, it had became one of the best known Unices available for the Intel 386/486 machines. Many popular Unix magazines have mentioned Linux, including UnixWorld, Unix Review, and even Computer Shopper.

The most amazing of it all is that Linux was started and mostly developed by a 22-year-old computer science student, Linus Torvalds, at University of Helsinki in Finland.

The History of Linux

Linus took a course on UNIX and C in the fall of 1990. One of the textbooks during the course was "Operating Systems, Design and Implementation" by Tanenbaum. Minix, another 386 Unix operating system, is written by Tanenbaum. He wanted a machine at home to be similar to the Sun Workstations at the university, and Minix seemed like a good idea.

When he had scrounged up enough money, he bought an 386 compatible machine to run Minix. However, Minix was not even available in Finland. So he played the popular game called "Prince of Persia" while he waited for the Minix disks to arrive in the mail. Getting Minix was not altogether a pleasant experience for him, because it did not exactly act like the Suns. It lacked various features, such as job control and fpu support. It's memory management was also lacking.

At first, Linus experimented with the protected mode of the 386 CPU in April of 1991. He wrote a protected mode program that printed "Hello world" to the screen. Then he created two seperate processes. One printed "aaaa", while the other printed "bbbb." Then, a terminal emulator was written in protected mode. Slowly, the pieces started to come together. The device driver for the hard disk was written. By October 5th, gcc (a C compiler) was running on version 0.02. When Linux Version 0.11 came out, the development was plain sailing from this point on. Just before Christmas 1991, the swapping code for a virtual memory system was in place.

The next version (0.12) came out one year after Linus bought the computer, and it was the version that finally got popular. By that time it was a very much a valid alternative to Minix. In fact, the name "Linux" stands for "Linus' Minix!"

Current Status of Linux

What can it do?

Most new versions of Linux are quite stable. At the time of publishing, the current Linux kernel is at version 0.99 patchlevel 14. One site has had a computer running version 0.97 patchlevel 1 for over 136 days without an error or crash. Rumor has it that it would have been longer if the backhoe operator had not mistaken a main power transformer for a dumpster.

Most of the common Unix tools and programs have been ported to Linux. Actually, ported is often too strong a word, since many programs compile out of the box without modifications, or only small modifications, because Linux tracks POSIX quite closely. The programs include all of the basic unix commands, GNU C and C++ compilers and GDB debugger, GNU emacs, most unix command shells, news and mail programs, TeX typesetting processing system, X window environment, and games. All of these programs are freely available. There is even a MS-DOS emulator currently in testing that will allow you to run DOS programs.

An Intel 486DX 33MHz machine will run faster than a Sun SparcStation 2, and a 486DX/2 66 MHz machine will run almost four times faster than the same SparcStation 2 according to the BYTE Unix benchmark. The same 486DX/2 66 MHz machine is only about a quarter times slower than the Sun Sparc 10 according to the Dhrystone 2.1 benchmarks. In fact, what is even more mind boggling is that an Intel Pentium machine will surely surpass the Sparc 10's. An Intel Pentium machine can be obtained for just under three thousand dollars now. What a enormous amount of computing power on a inexpensive Unix machine!

For those of you computer junkies out there, here is a list of Linux' features:

* multiprograming: several programs running at once.

* multiuser: several users on the same machine at once.

* has memory protection between processes, so that one program can't bring the whole system down.

* demand loads executables: Linux only reads from disk those parts of a program that are actually used.

* shared copy-on-write pages among executables. This means that multiple process can use the same memory to run in. When one tries to write to that memory, that page (4KB piece of memory) is copied somewhere else. Copy-on-write has two benefits: increasing speed and decreasing memory use.

* virtual memory using paging

* a unified memory pool for user programs and disk cache (so that all free memory can be used for caching, and the cache can be reduced when running large programs).

* dynamically linked shared libraries (DLL's)

* does core dumps for post-mortem analysis.

* POSIX job control.

* pseudoterminals (pty's).

* 80387 math coprocessor emulation in the kernel so that programs don't need to do their own math emulation.

* support for many national or customized keyboards

* multiple virtual consoles: several independent login sessions through the console

* Supports several common filesystems, including Minix-1 and Xenix, and has an advanced filesystem of its own, which offers filesystems of up to 4 terabytes, and file names up to 255 characters long.

* transparent access to MS-DOS filesystems and OS/2 partitions. You don't need any special commands to use the MS-DOS filesystem, it looks just like a Unix filesystem.

* CD-ROM support: can read all standard formats of CD-ROM filesystems

* TCP/IP networking over Ethernet and SLIP, including ftp, telnet, NFS, etc.

How is it being developed?

Linux is now being developed jointly by a group of people, with Linus as the main kernel developer. In fact, anyone with C programming expertise can joint in the project. This group of people and the Linux users communicate through the USENET newsgroups on the Internet. The five newsgroups include:

-- comp.os.linux.announce is a moderated newsgroup for announcements about Linux (new programs, bug fixes, etc).

-- comp.os.linux.admin is an unmoderated newsgroup for discussion of administration of Linux systems.

-- comp.os.linux.development is an unmoderated newsgroup specifically for discussion of Linux kernel development. The only application development questions that should be discussed here are those that are intimately associated with the kernel.

-- comp.os.linux.help is an unmoderated newsgroup for any general questions a Linux user might have.

-- comp.os.linux.misc is meant for any discussion that doesn't belong elsewhere.

Linux is being developed using an open and distributed model, instead of a closed and centralized model like much other software. This means that the current development version is always public (with up to a week or two's delay) so that anybody can use it. The result is that whenever a version with new functionality is released, it almost always contains bugs. However, it also results in a very rapid development, because the bugs are generally discovered within hours of a kernel release, and corrected quickly, especially those which might endanger a user's data, so it is easy for an end-user to avoid these bugs.

Who uses Linux?

Anyone with a Intel 386SX/16 with more than 2 megabytes of RAM can run Linux with about 60 megabytes of harddisk storage space. Since no one is required to register their copies with any central authority, it is difficult to know how many people use Linux.

Evidences show that the Linux user base is quite large. Several businesses exist now that solely depend on selling and supporting Linux, such as SoftLanding Software, InfoMagic, Trans-Ameritech, and Clark Internet Services. Moreover, the Linux newsgroups are some of the most heavily read and posted on the Internet.

However, one brave soul, Harald T. Alvestrand, has decided to try to get an idea of what the Internet Linux user base looks like. According to his registration program, as of Janurary 4th, 1994, there are 4495 Internet users in his counting program. 74 percent of these users uses Linux at home, and 25 percent of these users actually uses Linux at work! There are Linux users in countries such as Iceland, Norway, Denmark, Slovenia, Estonia, Hong Kong, Taiwan, Isreal, Brazil, and South Africa. Since many of the users actually get their copy of Linux through BBS'es (Bulletin Board Systems), the number of Linux users could be well over 40,000 users(4) and the number is growing fast.

Interestingly enough, Linux is already being used in critical missions. The Australian Surveying and Land Information Group in Canberra have decided to go with Linux based systems. These systems are being installed in Antarctica! Andrew Tridgell, the designer of these Linux systems, told about his project recently in comp.os.linux.misc:

There are now 3 Linux boxes in a cargo container on their way to Antarctica with 14 more on the way for other sites in and around Australia. The application is a data gathering one. The Linux boxes are attached via serial ports to a "TurboRogue" satelllite receiver system which monitors the 32 satellite Global Positioning System. Data is downloaded from the satellites and stored in a 4 megabyte flashcard in the back of the TurboRogue, and from there it is downloaded to the PCs. The PCs store the data and forward it to a base system in Canberra.

Where to get Linux?

There are many BBS's that carry Linux distributions(5). A list of them is occasionally posted to comp.os.linux.announce. A local Minneapolis BBS that carries Linux is Part-Time BBS at (612) 544-5552. A list of these BBS'es is contained in the Linux distribution HOWTO, which is available by anonymous Internet ftp as sunsite.unc.edu:/pub/Linux/docs/HOWTO/distribution-HOWTO, and it is also posted regularly to the comp.os.linux.announce newsgroup.

You can ask friends and user groups for a copy of Linux, or order one of the commmercial distributions. For the Internet users, there are several distributions that are available at SunSite.unc.edu:/pub/Linux/distributions/.

There is a 150 page guide on getting, installing, and setting up Linux, which is available at tsx-11.mit.edu:/pub/linux/docs/LDP/install-guide-1.ps.gz. In addition, the Linux Documentation Project has put out several other books in various states of completion, and these are available at sunsite.unc.edu:/pub/Linux/docs/LDP/. Over 600 pages of documentation in book form have been released by the LDP alone, plus a large group of manual pages.

What is in the future?

There has been some work being done in porting Linux to other platforms. However, any port is likely to be difficult, as the kernel makes extensive use of 80386's memory management and task primitives. However, this is becoming easier as the kernel becomes more general, and there is a port in progress for multiple Motorola 680x0 platforms, and ports are being considered to other platforms as well.

Documentation is not yet completed, but is being actively worked on by those on the ``Linux Documentation Project.'' There is a MS-Windows binary emulator called WINE being developed by a group of people. Once it is completed, the user will be able to run MS-Window programs directly under Linux and X Windows.

Work is underway on Linux version 1.0, which will close some of the gaps in the present implementation. The consensus is that once the networking code has been stablized, version 1.0 will be released.

All of this development work was done in two years! So watch out Microsoft! Linux could become the perfered operating system on the PC platform, and challange the wave of the future!

Work Cited

Aburto, Al (aburto@marlin.nosc.mil), The Dhrystone 2.1 and 1.1 MIPS Results, Oct. 1993.
Alvestrand, Harald T., Results of the Linux Counter (Posting to comp.os.linux.misc), Jan. 4th,
1993.
Binns, Roger and Winstead, Jim Jr., A standard for Linux packages and version numbering, Aug.
1993.
Drinovsky, Steven (stevend2@cs.utexas.edu), Benchmarks of Linux with 486, Jul. 1993.
GNU General Public License, Free Software Foundation, Inc., 1991.
Kappe, Dietrich, comp.os.linux.misc news article, Nov. 15, 1993.
Johnson, Michael K., Linux Meta-FAQ, 1993.
Johnson, Michael K., Linux Information Sheet,1993.
Linksvayer, Mike, The Choice of a GNU Generation, Meta Magazine, Volume 1,Number 1, Nov.
1993.
Timar, Ted M.A. (tmatimar@empress.com), Unix - Frequently Asked Questions Digest, Dec. 27,
1993.
Torvalds, Linus (torvalds@klaava.Helsinki.FI), Linux's Birthday, July 31, 1992.
Torvalds, Linus (torvalds@klaava.Helsinki.FI), LINUX CPU Scheduling, June 1993.
Tridgell, Andrew (tridge@nimbus.anu.edu.au), Linux in Antarctica, Nov. 1993.
Tree, Denise, Linux News, issue #9, Dec.18, 1992.
Tree, Denise, Linux News, issue #10, Jan.1, 1993.
Tree, Denise, Linux News, issue #11, Jan.10, 1993.
Tree, Denise, Linux News, issue #12, Jan.25, 1993.
Tree, Denise, Linux News, issue #13, Feb.16, 1993.
Tree, Denise, Linux News, issue #14, Jun.13, 1993.
Wirzenius, Lars, Linux News, issue #1, Oct. 5, 1992.
Wirzenius, Lars, Linux News, issue #2, Oct.10, 1992.
Wirzenius, Lars, Linux News, issue #3, Oct.18, 1992.
Wirzenius, Lars, Linux News, issue #4, Oct.26, 1992.
Wirzenius, Lars, Linux News, issue #5, Nov.6, 1992.
Wirzenius, Lars, Linux News, issue #6, Nov.16, 1992.
Wirzenius, Lars, Linux News, issue #7, Nov.22, 1992.
Wirzenius, Lars, Linux News, issue #8, Nov.28, 1992.

Footnotes

(1)
sometimes abbreviated as "386".
(2)
The kernel is the heart of the operating system.
(3)
GNU is a project of the Free Software Foundation. Its goal is to produce a freely distributable Unix software system.
(4)
My own estimate(tm).
(5)
A distribution is a complete software system with compilers, utilities, and games.