Transcript UNIX

Lecture 1: UNIX HISTORY
Prof. Guntis Bārzdiņš
Course homepage
 http://www.ltn.lv/~guntis/unix/





Course requirements
Lecture slides
Assignments, home works
Grades – in Moodle
Advanced video lectures:
http://students.mii.lu.lv/viesis/FilmetasLekcijas/OperetajsistemaUNIX/

by Kristaps Džonsons
 Contacts: [email protected], [email protected]
The uniqueness of UNIX
 “Before Multics there was chaos, and afterwards, too”


UNIX rose from the ashes of a multi-organizational (Bell Labs, MIT, GE)
effort in the early 1960s to develop a dependable timesharing operating
system Multics
The joint effort was not successful, but a few survivors from Bell Labs tried
again
 The features that made UNIX a hit from the start are:






Multitasking capability
Multiuser capability
Portability
Modular Structure
Library of application software
Work environment "of unusual simplicity, power, and elegance...."
Kenneth Thompson

















1943 -- Born in New Orleans, Louisiana
1943-1960 - Navy brat moving every few years
1965-66 -- Graduates with B.S and M.S. degrees in electrical engineering from the
University of California at Berkeley
1966 -- Joins Bell Labs Computing Research Department, working on the Multics
project
1969 -- Develops UNIX* operating system
1970 -- Writes B language, precursor to Dennis Ritchie's C language
1971 -- Moves UNIX from the PDP-7 to the PDP-11
1973 -- Rewrites UNIX in Dennis Ritchie's C language
1973 -- Rewrites portions of UNIX to include Doug McIlroy's concept of pipes
1975-6 -- Visiting professor at the University of California, Berkeley
1980 -- "Belle," a chess-playing computer he developed with Joe H. Condon, wins the U.S.
and World Computing Chess Championships
1980 -- Elected to the U.S. National Academy of Engineering
1983 -- Named Bell Labs Fellow
1983 -- Receives with Dennis Ritchie the ACM Turing Award
1988 -- Visiting professor at the University of Sydney, Australia
1998 -- Awarded with Dennis Ritchie the National Medal of Technology for the
development of the UNIX system
2000 -- Retires from Bell Labs
Dennis M. Ritchie













1941 -- Born in Bronxville, N.Y.
1963 -- Graduates from Harvard University with a B.S. in Physics
1968 -- Receives from Harvard University a Ph.D. in mathematics
1967 -- Joins Bell Labs, following his father, Alistair E. Ritchie, who had a long career there
1968 -- Joins the Bell Labs team working on Multics, a joint effort of Bell Labs, MIT
and GE to develop a general computer operating system
1972 -- Creates C language
1989 -- Receives with Ken Thompson the NEC C&C Prize for significant contributions to
computer technology
1983 -- Named Bell Labs Fellow
1988 -- Elected to the U.S. National Academy of Engineering
1990 -- Appointed head, System Software Research Department in the Computer
Sciences Research Center at Bell Labs, Murray Hill, N.J.
1995 -- Heads the effort to create the Plan 9 operating system
1996 -- Heads the effort to create the Inferno(TM) operating system
1998 -- Awarded with Kenneth Thompson the U.S. National Medal of Technology for the
development of the UNIX system
Unix
history
Unix versions
History of opensource UNIX
 BSD (Berkley Software Distribution)
 Minix (Andrew Tannenbaum)
 GNU, GPL (Richard Stallman)
 Linux (Linus Torvalds)
 Darwin (Apple)
 Posix, Single Unix Specification, ISO/IEC 9945

Allows multiple interoperable Unix implementations
The History of BSD
 1973 - Ken Thompson/Dennis Richie deliver a paper on
UNIX
 Dr. Bob Fabry from Berkeley attends and later obtains a
copy of UNIX
 UNIX is installed on several Berkeley PDP/11’s
 Ken Thompson takes a sabbatical at Berkeley, install
Version 6 on a PDP/11, and writes a Pascal compiler
The History of BSD
 1977 - Bill Joy puts together 1st Berkeley Software
Distribution (Version 1)
 mid-1978 - 2BSD released with improved Pascal,
termcap, vi (about 75 shipped)
 1978 - Berkeley obtains a VAX-11/780
 A copy of AT&T 32/V UNIX is installed - does not
take advantage of virtual memory
The History of BSD
 1979 - VAX/BSD distribution assembled includes:



virtual memory
std 32/V utilities
all BSD additions
 Bill Joy ships about 100 tapes of 3BSD
The History of BSD
 DARPA becomes interested in BSD



wants to have common platform (reduced porting
costs on different h/w and os’s)
desires distributed network
UNIX chosen to solidify DARPA user base
 1980 - DARPA grants Berkeley 18 month contract
to add DARPA contractors features
The History of BSD
 UNIX becomes a commercial AT&T product (System III
and later System V)
 AT&T/Berkeley work out BSD distribution license (user’s
must buy AT&T license)
 Oct. 1980 - 4BSD distribution includes:

Pascal, Franz Lisp system, enhanced mail
 June 1981 - 4.1BSD released includes:

tuned up kernel, auto config (~400 shipped)
The History of BSD
 DARPA happy with 4.1BSD, grants 2 yr contract with 5
times funding
 Roadmap for future versions created:



faster file system (Marshall McKusick)
interprocess communication (Joy/Leffler IPC)
networking support for ARPAnet (R.Gurwitz TCP/IP)
 June 1982 - fast file system, TCP/IP, IPC operational
 Bill Joy joins SUN Microsystems.
The History of BSD
 1983 - 4.2BSD is released

over 1000 shipped - Very popular
 1986 - 4.3BSD released w/ BSD TCP/IP stack
 AT&T did not have networking/fast file system.

These were later incorporated into System V using BSD code
(which turned out to be a good thing)
 1988 - 4.3BSD-Tahoe released (machine-independent)
The History of BSD
 Up through the release of 4.3BSD-Tahoe, users
were required to purchase an AT&T source
license.


AT&T continued to increase the license cost.
PC vendors wanted the TCP/IP stack code, so this
was split out.
 1989 - Networking Release 1

first freely distributed code form Berkeley (open
source)
The History of BSD
 early 1990 - 4.3BSD-Reno released


virtual memory system from the MACH kernel
SUN-compatible NFS
The History of BSD
 1990 - Keith Bostic proposes having BSD become freelydistributed with most source code included

Bostic pioneers the technique of mass net-based development
 All UNIX utilities re-written from scratch

Within 18 months, most lib’s/utilities rewritten
 Karels, Bostic, and McKusick go through kernel, file-byfile rewriting 32/V code and removing it from the release
 1991 - Networking Release 2 begins distribution
 Several open source groups form to continue the BSD
work
The History of BSD
 1992 - AT&T files suit against Berkeley Software Design
Inc. (BSDi)


BSDi heavily discounts source/binary products over System V
AT&T suit alleges BSDi products contain USL code/trade
secrets
 Counter suit is filed in California

Berkeley and AT&T end up settling after it turned out AT&T
had removed UC-Berkeley copyright notices out of the BSD
code (TCP/IP and fast file system) it had incorporated years
earlier
The History of BSD
 BSD groups are formed to work together to maintain
and enhance BSD



NetBSD is focused on supporting as many platforms as
possible
FreeBSD was formed a few months later and focuses on
PC’s.
OpenBSD is focused on improving the security of BSD
 Today work continues on BSD through the NetBSD,
FreeBSD and OpenBSD distributions.

These are available via downloading over the internet
The History of BSD
 Why BSD was so important



allowed research environment to grow UNIX
pioneered internet based open source development
released programs with code or as code
 Open source has attracted a lot of attention.


Linux is probably the most well know
about half of the utilities come from the BSD
distribution
GNU Project
 Richard Stallman goal 1985: a free Unix-like OS
 GNU GPL (General Public Licence)


freedom to run the program, for any purpose.
freedom to modify the program to suit your needs.



To make this freedom effective in practice, you must have access to the
source code, since making changes in a program without having the source
code is exceedingly difficult.
freedom to redistribute copies, either gratis or for a fee.
freedom to distribute modified versions of the program, so that the community
can benefit from your improvements.
 GNU/Linux ready by 1991


GNU – GPL utilities and Hurd kernel (Richard Stallman)
Linux – GPL efficient Linux kernel (Linus Torvalds)

developed based on opensource mini-kernel architecture Minix
(copyright Andrew Tannenbaum)
GPL vs BSD license
 GNU GPL (General Public License)


“You are free to make modifications and use them privately, without ever
releasing them.”
“If you release the modified version to the public in some way, the GPL
requires you to make the modified source code available to the program's
users, under the GPL.”
 GNU LGPL (Lesser General Public License)

Less restrictive
 GNU licenses are long

GPL v2 license – 14 000 characters
GPL vs BSD license
 BSD license

“Redistribution and use in source and binary forms, with or without modification, are permitted
provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and
the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions
and the following disclaimer in the documentation and/or other materials provided with the
distribution.
Neither the name of the <ORGANIZATION> nor the names of its contributors may be used to
endorse or promote products derived from this software without specific prior written
permission.”
 BSD license is short and simple

Total ~1400 characters
From: [email protected] (Linus Benedict Torvalds)
Newsgroups: comp.os.minix
Subject: Free minix-like kernel sources for 386-AT
Message-ID: <[email protected]>
Date: 5 Oct 91 05:41:06 GMT
Organization: University of Helsinki
Do you pine for the nice days of minix-1.1, when men were men and wrote
their own device drivers? Are you without a nice project and just dying
to cut your teeth on a OS you can try to modify for your needs? Are you
finding it frustrating when everything works on minix? No more allnighters to get a nifty program working? Then this post might be just
for you :-)
As I mentioned a month(?) ago, I'm working on a free version of a
minix-lookalike for AT-386 computers. It has finally reached the stage
where it's even usable (though may not be depending on what you want),
and I am willing to put out the sources for wider distribution. It is
just version 0.02 (+1 (very small) patch already), but I've successfully
run bash/gcc/gnu-make/gnu-sed/compress etc under it.
Sources for this pet project of mine can be found at nic.funet.fi
(128.214.6.100) in the directory /pub/OS/Linux. The directory also
contains some README-file and a couple of binaries to work under linux
(bash, update and gcc, what more can you ask for :-). Full kernel
source is provided, as no minix code has been used. Library sources are
only partially free, so that cannot be distributed currently. The
system is able to compile "as-is" and has been known to work. Heh.
Sources to the binaries (bash and gcc) can be found at the same place in
/pub/gnu.
ALERT! WARNING! NOTE! These sources still need minix-386 to be compiled
(and gcc-1.40, possibly 1.37.1, haven't tested), and you need minix to
set it up if you want to run it, so it is not yet a standalone system
for those of you without minix. I'm working on it. You also need to be
something of a hacker to set it up (?), so for those hoping for an
alternative to minix-386, please ignore me. It is currently meant for
hackers interested in operating systems and 386's with access to minix.
The system needs an AT-compatible harddisk (IDE is fine) and EGA/VGA. If
you are still interested, please ftp the README/RELNOTES, and/or mail me
for additional info.
I can (well, almost) hear you asking yourselves "why?". Hurd will be
out in a year (or two, or next month, who knows), and I've already got
minix. This is a program for hackers by a hacker. I've enjouyed doing
it, and somebody might enjoy looking at it and even modifying it for
their own needs. It is still small enough to understand, use and
modify, and I'm looking forward to any comments you might have.
I'm also interested in hearing from anybody who has written any of the
utilities/library functions for minix. If your efforts are freely
distributable (under copyright or even public domain), I'd like to hear
from you, so I can add them to the system. I'm using Earl Chews estdio
right now (thanks for a nice and working system Earl), and similar works
will be very wellcome. Your (C)'s will of course be left intact. Drop me
a line if you are willing to let me use your code.
Linus
PS. to PHIL NELSON! I'm unable to get through to you, and keep getting
"forward error - strawberry unknown domain" or something.
Linux
 Linux is a clone of the operating
system Unix, written from scratch by
Linus Torvalds with assistance from
a loosely-knit team of hackers across
the Net.


It aims towards POSIX and Single
UNIX Specification compliance
It has all the features you would
expect in a modern fully-fledged
Unix, including true multitasking,
virtual memory, shared libraries,
demand loading, shared copy-onwrite executables, proper memory
management, and TCP/IP
networking
Based on Minix from
Andrew S. Tannenbaum
Thus, of course, Linus didn't sit down in a vacuum and suddenly type in
the Linux source code. He had my book, was running MINIX, and undoubtedly
knew the history (since it is in my book). But the code was his. The
proof of this is that he messed the design up. MINIX is a nice, modular
microkernel system, with the memory manager and file system running as
user-space processes. This makes the system cleaner and more reliable
than a big monolithic kernel and easier to debug and maintain, at a small
price in performance, although even on a 4.77 MHz 8088 it booted in maybe
5 seconds (vs. a minute for Windows on hardware 500 times faster).
Instead of writing a new file system and a new memory manager, which
would have been easy, he rewrote the whole thing as a big monolithic
kernel, complete with inline assembly code :-( . The first version of
Linux was like a time machine. It went back to a system worse than what
he already had on his desk. Of course, he was just a kid and didn't know
better (although if he had paid better attention in class he should
have), but producing a system that was fundamentally different from the
base he started with seems pretty good proof that it was a redesign. I
don't think he could have copied UNIX because he didn't have access to
the UNIX source code, except maybe John Lions' book, which is about an
earlier version of UNIX that does not resemble Linux so much.
Tannenbaum’s
comments
about Linux
From: [email protected] (Linus Benedict Torvalds)
Subject: Re: LINUX is obsolete
Date: 29 Jan 92 23:14:26 GMT
Organization: University of Helsinki
Well, with a subject like this, I'm afraid I'll have to reply.
Apologies to minix-users who have heard enough about linux anyway.
like to be able to just "ignore the bait", but ... Time for some
serious flamefesting!
I'd
In article <[email protected]> [email protected] (Andy Tanenbaum) writes:
>As most of you know, for me MINIX is a hobby, something that I do in the
>evening when I get bored writing books and there are no major wars,
>revolutions, or senate hearings being televised live on CNN. My real
>job is a professor and researcher in the area of operating systems.
You use this as an excuse for the limitations of minix? Sorry, but you
loose: I've got more excuses than you have, and linux still beats the
pants of minix in almost all areas. Not to mention the fact that most
of the good code for PC minix seems to have been written by Bruce Evans.
Popular GNU/Linux
distributions








Debian (Ubuntu,...)
RedHat / Fedora
Suse
Gentoo
Knopix (loads from CD)
Yellow Dog (PowerPC)
Slackware
etc.
RedHat / Fedora
 RedHat Enterprise

commercial, supported by RedHat, Inc.
 Fedora (CentOS)





free, open source, supported only by community
Easy installation, easy administration
Package system RPM (RPM Package Manager)
Good for beginners
Customization may not be as easy
Gentoo
 “The Gentoo philosophy is to allow this user to do what he or she
wants to do, without getting in the way.”
 Heart of a Gentoo system – package manager Portage


Choose what features of a package you need
Optimized for your processor type
 Source packages called ebuilds


Describes where to fetch source, how to compile, where to install
Contains USE flags, which can be set to choose what features to compile in
 Hard installation for beginners (everything done “by hand”)
SCO Lawsuits
against Linux users
 1979: SCO founded as The Santa Cruz Operation
 1983: SCO delivers the first packaged UNIX System (called SCO® XENIX® System V) for
Intel® 8086 and 8088 processor-based PCs.
 1995: SCO acquires UNIX System source technology business from Novell Corporation
(which had acquired it from AT&T's UNIX System Laboratories).
 2001: Caldera Systems completes the acquisition of SCO's Server Software and
Professional Services Divisions, becoming Caldera International (Caldera)
 2002: Caldera changes its name to The SCO Group (SCO), returning to the SCO brand
 2003: SCO Files Lawsuit Against IBM (use of Linux)
 2003: SCO Suspends Distribution of Linux Pending Intellectual Property Clarification
 2003: The SCO Group Sends Open Letter to the Open Source Community
 2003: SCO Ranked Number 75 Fastest Growing, North American Technology Company In
Deloitte Technology Fast 500
 2003: SCO Announces New Initiatives to Enforce Intellectual Property Rights
 2004: SCO Announces Worldwide Availability of SCO Intellectual Property License ($1300)
Popular *BSD distributions
 NetBSD

focused on supporting as many platforms as possible
 FreeBSD

focuses on PC’s.
 OpenBSD

focused on improving the security of BSD
Popular Commercial
Unix versions
 Solaris (Sun Microsystems)
 MacOS X (Apple)
 AIX (IBM)
 HP-UX (Hewlett Packard)