From Unix to Linux

Download Report

Transcript From Unix to Linux

The Unix System
 Unix is a Multi-user and Multi-tasking operating
system
 History
 MULTICS (MULTIplexed Information and Computing
Service) (1965)
 Ken Thompson (Bell Laboratories -1969)
Space Wars, PDP-7, written in ASSEMBLER
UNICS (UNiplexed Information and Computing Service)
 Ken Thompson, Dennis Ritchie (1970-1974)
UNIX, PDP-11
Ritchie develops C language (starting from B language)
The third version of UNIX is written in C
A paper on UNIX is published in 1974 (ACM Turing
Award 1984)
1.1
The Unix System
 History, Bell Labs and AT&T UNIX
 PDP-11 is the computer of many departments of computer
science and so UNIX becomes the OS of the Universities
 Bell Labs and AT&T UNIX development groups develop several
version of UNIX:
 first edition (1969), …,seventh edition (1978,on PDP-11/70)
 a version for Interdata 8/2 and VAX
 UNIX for a network of computers
 System III (1982 - first commercial version)
 System V based on System III(1983)
 System V release 2, 3, 4 (1984 - 1989)
 SVR4 (System V release 4; 1989 AT&T and Sun Micro
systems)
 1993: AT&T becomes a phone company and sells UNIX to
Novell
1.2
The Unix System
 History University of California at Berkeley
 The most influential of the non-Bell Labs and non-AT&T
UNIX development groups:.
Thompson and some students develop 1BSD (Berkeley
Software Distributions) starting from sixth edition (the first one
out of Bell Labs) (1978).
3BSD - 4BSD UNIX resulted from DARPA funding to develop
a standard UNIX system for government use.
This series contains 4.1BSD, 4.2BSD, 4.3BSD and 4.4BSD
(1980-93) and has some important new tools: virtual memory,
paging, multiuser, network connection by means of TCP/IP.
4.2BSD contains the text editor vi, the shell csh, Pascal and
Lisp compilers, …
 Sun Microsystem, DEC and
some other companies
decides to develop their UNIX version starting from BSD
versions instead of System V.
1.3
History of
UNIX Versions
1.4
The Standardization Projects
 History
 Several standardization projects seek to consolidate the
variant flavors of UNIX leading to one programming
interface to UNIX. The most important are:
POSIX (Portable Operating System): merge of System V
and BSD (1984)
IBM, DEC, Hewlett-Packard create OSF (Open Software
Foundation) and their UNIX system is OSF/1 (1988)
X/OPEN defines the Single UNIX specification (1993) and
the systems satisfying this specification have the trademark
UNIX 95
Open group (merge of Open Software Foundation and
X/OPEN; http://www.opengroup.com 1996)
Definition of the second version of the Single UNIX
specification (1997) with the trademark UNIX 98
1.5
A variant of the UNIX System
 Although there are many version of UNIX, the
most important companies provide version
based on UNIX System V Release 4 (SVR4) and
the last the Single UNIX specification
 ex. Solaris 2.x is the most widely used and most
successful commercial UNIX implementation.
 These
systems are very big and very
complicated (the contrary of the Thompson’s
basic idea) and in same case expensive.
 So, Tanenbaum develops MINIX (1987) a small
free UNIX system (11800 rows of C code and
800 rows of Assembler code) satisfying POSIX.
 MINIX is a free educational system based on micro-
kernel model (www.cs.vu.nl/~ast/minix.html)
1.6
Common System Components of an OS
 Process Management
 Main Memory Management
 File Management
 Secondary Memory Management
 I/O System Management
 Networking
 Protection System
 Command-Interpreter System (Shell)
1.7
System Structure
 System structure: defines the connections
and manages the System Components
 Some system structures
a. Monolithic
b. Client-Server model (micro-kernel)
1.8
Monolithic Operating System Structure
 A monolithic system has not a well defined structure. It
includes virtually all of the operating-system functionality
in one large block of code that runs as a single process
with a single address space. All the functional components
of the kernel have access to all of its internal data
structures and routines.
1.9
The Client-Server Model
 Moves as much from the kernel into “user”
space. In this way it remains only a micro-kernel.
 Communication
takes place between
modules using message passing.
1.10
user
The Client-Server Model
 Advantages
 easier to extend a micro-kernel
 easier to port the operating system to new architectures
 more reliable (less code is running in kernel mode)
 more secure
 Disadvantages
 Deterioration of the performances
 MINIX has the I/O drivers into the kernel (this is for
technical reasons connected to 8088 architecture), while
the Main Memory Management, and the File
Management are two different user processes.
1.11
The Linux System
 There is not a free BSD system at the end of the
eighties, and so many members of MINIX
newsgroup ask to Tanenbaum to introduce many
modifications for improving the performances of
MINIX. Some of these modifications could
change the original educational project of
Tanenbaum, and so often he said “NO” to these
requests.
 So, Linus Torvalds using a pc 386 with MINIX
develops a small but self-contained kernel in
1991 (Linux 0.01), with the major design goal of
UNIX compatibility (i.e., satisfying POSIX).
1.12
Linux 0.01
 The first version of Linux (Linux 0.01) has some of
features of MINIX (ex. File system), but the main
differences between Linux and MINIX are:
 The Linux kernel uses a monolithic model, and it has
many more functions than the micro-kernel of MINIX.
 From a theoretical point of view MINIX is better than
Linux, but from a practical point of view the
performances of Linux are better than that one of
MINIX.
 However, for a description of the point of view of
Torvalds on the advantages-disadvantages of LinuxMINIX see the “flame war” between Torvalds and
Tanenbaum in:
Rivoluzionario per caso: come ho creato Linux (solo per
divertirmi), Linus Torvalds, Garzanti
1.13
The Linux Kernel
 Linux 0.01 (May 1991) had no networking, ran only on
80386-compatible Intel processors and on PC hardware,
had extremely limited device-drive support, and supported
only the Minix file system.
 Linux 1.0 (March 1994) included these new features:
Support for UNIX’s standard TCP/IP networking protocols
BSD-compatible socket interface for networking programming
Device-driver support for running IP over an Ethernet
Enhanced file system
Support for a range of SCSI controllers for high-performance disk
access
 Extra hardware support





 This version is sufficient compatible with UNIX and many
people are interested in developing Linux under Torvald
supervision.
 Linux 1.2 (March 1995) was the final PC-only Linux kernel.
1.14
Linux 2.0
 Released in June 1996,
2.0 added two major new
capabilities:
 Support for multiple architectures
 Support for multiprocessor architectures
 Other new features included:
 Improved memory-management code
 Improved TCP/IP performance
 Support for internal kernel threads, for handling dependencies
between loadable modules, and for automatic loading of modules on
demand.
 Standardized configuration interface
 Available for Motorola 68000-series processors, Sun Sparc
systems, and for PC and PowerMac systems.
 Linux 2.2 January 1999 improves some aspects of Linux 2.0
 The last release is Linux 2.4.20 (production) Linux 2.5.64
(development)
1.15
The Moral of the Story
 Linux is a modern, free operating system based on UNIX




standards.
First developed as a small but self-contained kernel in
1991 by Linus Torvalds, with the major design goal of
UNIX compatibility.
Its history has been one of collaboration by many users
from all around the world, corresponding almost
exclusively over the Internet (software open source).
It has been designed to run efficiently and reliably on
common PC hardware, but also runs on a variety of other
platforms.
The core Linux operating system kernel is entirely
original, but it can run much existing free UNIX software,
resulting in an entire UNIX-compatible operating system
free from proprietary code.
1.16
The Linux System
 Linux uses many tools developed as part of Berkeley’s BSD
operating system, System V, MIT’s X Window System, and
the Free Software Foundation's GNU project.
 The main system libraries were started by the GNU (GNU’s
Not Unix) project (ex. gcc (GNU C compiler)), with
improvements provided by the Linux community.
 Linux networking-administration tools were derived from 4.3
BSD code; recent BSD derivatives such as FreeBSD have
borrowed code from Linux in return.
 The Linux system is maintained by a network of developers
collaborating on Internet (see /usr/src/linux/CREDITS), with
a small number of public ftp sites acting as de facto
standard repositories.
1.17
Linux Distributions
 Standard, precompiled sets of packages, or distributions,
include the basic Linux system, system installation and
management utilities, and ready-to-install packages of
common UNIX tools.
 The first distributions managed these packages by simply
providing a means of unpacking all the files into the
appropriate places; modern distributions include advanced
package management.
 Red Hat, Debian, SuSE, Mandrake are popular
distributions from commercial and noncommercial sources,
respectively (see www.linux.org).
 The RPM Package file format permits compatibility among
the various Linux distributions (see www.linuxbase.org).
1.18
Which distribution to use ?
 RedHat (www.redhat.com)
 Big, professional, very widely used
 Debian (www.debian.org/)
 Open development model, excellent packaging
system
 Mandrake (www.mandrakesoft.com)
 Aims to be very easy to install and use
 SuSE (www.suse.com/)
 Compromise between Red Hat and Mandrake
 Slackware (www.slackware.com/)
 Most traditional; little extra help
1.19
Mandrake Distribution
 Mandrake
provides a simple and friendly
distribution. Maybe, it is the best distribution for the
desktop (www.mandrakesoft.com).
 The last release of Mandrake distribution is
Mandrake 9.0 “Dolphin” and it is contained in three
CDs. It contains the Linux kernel 2.4.19.
 The minimum installation requires only the first
CD and takes only 60MB. The other two CD
contain many packages.
 There are two different GUI (Graphical User
Interface):
 KDE (release 3.0.3) and GNOME (2.0.1)
1.20
Mandrake Installation
 The installation of Mandrake 9.0 “Dolphin” is very easy.
 You can select Italian language
 The first time you should choose
the installation for
“principiante”
 The more difficult step is the “partition” of the hard disk. A
partition correspond to a “logic disk”. If you want to install
some operating systems on your hard disk, you have to define
a partition for each OS. A disk has at most 4 primary
partitions. You can make these partitions by means of the
command fdisk.The Mandrake installation provides a
simple graphical tool for making the Linux partitions.
 We wish to point out that from DOS/Windows you cannot see
the other partitions. On the contrary, Linux see DOS/Windows
partition (/mnt/windows).
 However, all the steps of the installation will be
illustrated during the lecture.
1.21
The Moral of the Installation
 Varies from distribution to distribution
 Most modern distributions make it easy:
 Buy CD / download and burn CD image
 Boot
 Follow instructions
 Need to think about partitioning.
 Install a boot loader (probably LILO (LInux
LOader), maybe something else). This needs to
be configured to boot whatever other operating
systems you have installed.
1.22
Users
 Linux is an intrinsically multi-user system
 Every user on the system has its own username
and password
 The root user has ultimate power to run the
system. You should not log in as root unless
you really need to.
 During installation, you should have been
prompted for a root password and also a
username and password for an ordinary user
account.
 The command passwd allows to change the
password.
 Careful: you have to perform the program
shutdown –h now before to switch off the PC
1.23
Linux Licensing
 The Linux kernel is distributed under the GNU
General Public License (GPL), the terms of which
are set out by the Free Software Foundation.
 See /usr/src/linux/COPYING
 The main consequence of GPL is that anyone
using Linux, or creating their own derivative of
Linux, may not make the derived product
proprietary; software released under the GPL may
not be redistributed as a binary-only product.
 For a deeper examination of this subject see
www.gnu.org/home.it.html
1.24