Chapter 1: Welcome to Linux An intro to UNIX-related operating systems... In this chapter …• History of Unix • GNU-Linux • Why Linux?... Enter Unix, pride of Bell Labs• Originally writt
Trang 1Chapter 1:
Welcome to Linux
An intro to UNIX-related
operating systems
Trang 2In this chapter …
• History of Unix
• GNU-Linux
• Why Linux?
Trang 3Long ago, in a galaxy far away …
• Computing power was costly
– UNIVAC cost $1 million
• CPU time was a premium
– Most mainframes had less computing power than
a calculator on the shelf at Wal-Mart
• Jobs were submitted into a queue
– Only one process at a time – scheduling
Trang 4What was needed
• Allow multiple users to access the same data and resources simultaneously
• Service many users more cheaply than
buying each their own machine
• The ability to run multiple processes at once
• And do so while maintaining user
Trang 5Enter Unix, pride of Bell Labs
• Originally written in PDP-7 assembly
language by Ken Thompson
• To make it work on multiple architectures (portable), Thompson rewrote Unix in B
• Dennis Ritchie developed C, and with
Thompson, rewrote Unix in C
Trang 6What was so great about it?
• Multiuser
• Multiprocess
• Non-proprietary
• Economical for business
• Initially given for free to colleges and
universities (great tactic!)
Trang 7Descendents and bastards …
• Started at Bell Labs
• Picked up and continued by AT&T (SVR4)
• UC Berkeley derives BSD
• Sun Solaris
• IRIX
• Minix, XINU
• Linux
Trang 8What happened?
• UNIX became commercialized
• Proprietary code, specialized distributions
• Costs started to become a hindrance
• So … let’s make our own Unix …
Trang 9• Richard Stallman decides that there should
be a free version of Unix available
• Forms the GNU project – GNU’s Not Unix
• Writes all of the system programs and
utilities to mimic Unix variants
• Everything but a kernel (Hurd)
Trang 10Final piece
• Universities trying to teach Unix and OS
design can’t afford Unix
• Andrew Tanenbaum writes Minix
• Linus Torvalds, dissatisfied with Minix, writes his own – Linux
Trang 11• Torvalds has a perfectly functioning kernel – but no system programs
• Finds a perfect candidate in GNU
• Together, the operating system world was
changed dramatically
Trang 12Free you say?
• GNU-Linux is free …
• Free as in speech, not free as in beer
• Free to view, copy, modify, and release
• Profit still to be had from packaging, support, and additional original code
Trang 13Why Linux?
• Software
• Hardware
• Portability
• Standards
• $$$
Trang 14• An almost limitless library of programs
• Applications, services, utilities
• Many free, some commercial
• Source code often available along with pre-built binaries
Trang 15• Supports thousands of peripherals and pieces of hardware
• Multi-platform: x86, PPC, Alpha, SPARC, MIPS, 64-bit, SMP (multiproc systems)
• Emulation of hardware for testing and
development
Trang 16• Entire operating system written in C
• Shared system libraries available for all
supported architectures
• Code written on one platform can be
compiled on any system with minimal, if any, tweaks
Trang 17• Much of GNU-Linux already meets POSIX
(Portable Operating System Interface for
Computer Environments) and Unix System V Interface Definition (SVID)
• Standardized for commercial and
government use
Trang 18And don’t forget …
• It’s free! (or at least really cheap!)
• That’s why Linux is often the operating
system of choice to teach OS design and Unix courses
• We’ll be using RedHat Enterprise Linux 4 – not free but a fraction of the cost of Unix
Trang 19Features Overview
• Multiuser
• Multiprocess / Multitasking
• Hierarchical Filesystem
• BASH Shell command line interface / programming language
• Many useful utilities built-in
• Rich networking support