27
UNIX/Linux System Programming Jordan University of Science and Technology History

UNIX/Linux System Programming

  • Upload
    grazia

  • View
    152

  • Download
    0

Embed Size (px)

DESCRIPTION

UNIX/Linux System Programming. History. Jordan University of Science and Technology. UNIX History. First UNIX implementation in 1969 by Ken Thompson at Bell Laboratories, a division of the telephone corporation , AT&T. 1969 is the same year that Linus Torvalds was born. - PowerPoint PPT Presentation

Citation preview

Page 1: UNIX/Linux System Programming

UNIX/Linux System Programming

Jordan University of Science and Technology

History

Page 2: UNIX/Linux System Programming

UNIX History• First UNIX implementation in 1969 by Ken Thompson at Bell

Laboratories, a division of the telephone corporation, AT&T.

• 1969 is the same year that Linus Torvalds was born.• It was written in assembler for a Digital PDP-7 minicomputer.• The name UNIX came from MULTICS (Multiplexed Information

and• Computing Service), the name of an earlier operating system

project in which AT&T• collaborated with MIT and GE.

Jordan University of Science and Technology

Page 3: UNIX/Linux System Programming

C programming language

• B programming language was initially implemented by Thompson and drew many of its ideas from an earlier programming language named BCPL.

• A short time later, Dennis Ritchie, one of Thompson’s colleagues at Bell Laboratories and an early collaborator on UNIX, designed and implemented the C programming language.

• This was an evolutionary process. • By 1973, C had matured to a point where the UNIX

kernel could be almost entirely rewritten in the new language.

Page 4: UNIX/Linux System Programming

Six edition of UNIX (1969-1979)• First Edition, November 1971: By this time, UNIX was running on the PDP-

11 and already had a FORTRAN compiler and versions of many programs still used today, including ar, cat, chmod, chown, cp, dc, ed, find, ln, ls, mail, mkdir, mv, rm, sh, su, and who.

• Second Edition, June 1972: By this time, UNIX was installed on ten machines within AT&T.

• Third Edition, February 1973: This edition included a C compiler and the first implementation of pipes.

• Fourth Edition, November 1973: This was the first version to be almost totally written in C.

• Fifth Edition, June 1974: By this time, UNIX was installed on more than 50 systems.

• Sixth Edition, May 1975: This was the first edition to be widely used outside AT&T.

Page 5: UNIX/Linux System Programming

BSD at Berkeley

• Thompson went to the University of California at Berkeley. He worked with graduate students

• One of them was Bill Joy, subsequently went on to cofound Sun Microsystems.

• C shell, the vi editor, the Berkeley Fast File System, sendmail, etc.

• Under the name Berkeley Software Distribution (BSD), a version of UNIX, including its source code, came to be widely distributed.

Page 6: UNIX/Linux System Programming

The GNU project

Page 7: UNIX/Linux System Programming

The GNU project• 1982 AT&T was permitted to market UNIX--- System III,

System V, SVR4• In 1984, Richard Stallman, an exceptionally talented

programmer working at MIT, set to work on creating a “free” UNIX implementation. Stallman’s outlook was a moral one.

• Emacs text editor, GCC (originally the GNU C compiler, GNU compiler collection, comprising compilers for C, C++, and other languages), the bash shell, and glibc (the GNU C

• 1990s, the GNU project had produced a system that was virtually complete, except for one important component: a working UNIX kernel library.

Page 8: UNIX/Linux System Programming

Richard Stallman

Page 9: UNIX/Linux System Programming

The Linux Kernel

• In 1991, Linus Torvalds, a student at the University of Helsinki, was inspired to write an operating system for his Intel 80386 PC.

• Torvalds developed a basic kernel that allowed him to compile and run various GNU programs

• October 5, 1991, Torvalds requested the help of other programmers

• Other programmers joined Torvalds in the development of Linux

• Linux is used to refer to the entire UNIX-like operating systems of which the Linux kernel forms a part

Page 10: UNIX/Linux System Programming

Linus Torvalds

Page 11: UNIX/Linux System Programming

Operating System

User 1

User 2

Page 12: UNIX/Linux System Programming

Linux OS

Page 13: UNIX/Linux System Programming

Gnome

Page 14: UNIX/Linux System Programming

The Terminal (Shell)

Page 15: UNIX/Linux System Programming

Linux Distributions

• Debian

Page 16: UNIX/Linux System Programming

Linux Distributions

Page 17: UNIX/Linux System Programming

Linux Distributions

Page 18: UNIX/Linux System Programming

Standardization

• The portability problems: Many variations in UNIX and C implementations

• Strong pressure for standardization• The C language was standardized in 1989

(C89), and a revised standard was produced in 1999 (C99).

• The first attempt to standardize the operating system interface (API) yielded (Portable Operating System Interfac) POSIX.1

Page 19: UNIX/Linux System Programming

Flavors of UNIX Proprietary: (redistribution and modification prohibited or restricted; not free)– Solaris – IRIX – Mac OS X

Open Source: (source code is available and free to modify)– FreeBSD – RedHat – Mandrake – Debian-Ubuntu – SuSE – Slackware

GUIs:– Gnome – K Desktop Environment (KDE)

Page 20: UNIX/Linux System Programming

Unix Overview

Directory Structure

Page 21: UNIX/Linux System Programming

Programming Tools and Utilities Available under Linux

• Text Editors– Xemacs – Emacs – Pico – vi

• Compilers– C compiler - gcc – C++ compiler - g++ – Java compiler & Java Virtual

Machine - javac & java– Others

• Debuggers– C / C++ debugger - gdb

• Interpreters– Perl - perl – Tcl/Tk - tcl & wish

• Miscellaneous– Web Browsers - Mozilla,

Netscape, Firefox– Instant Messengers - Gaim – Email - Thunderbird

Page 22: UNIX/Linux System Programming

UNIX/Linux directories➲ / : Root of the tree. Where it starts.

➲ bin, sbin, usr/bin: software for the shells and most common Unix commands.

➲ dev: short for devices, holds the files necessary to operate peripherals such as printers and terminals.

➲ home: contains the home directories of users (/export/home on sun computers).

Page 23: UNIX/Linux System Programming

UNIX/Linux directories• tmp: holds temporary files.• var: contains files that vary in size; (Mail

irectories, printer spool files, logs, etc.) • etc: administrative files such as lists of user names

and passwords. • usr: Contains application programs• lib: Contains libraries for programs• proc: a pseudo-filesystem used as an interface to

kernel data structures.

Page 24: UNIX/Linux System Programming

• Windows : administrator

• UNIX/Linux : root

Page 25: UNIX/Linux System Programming

Project # 1• Install Linux (Ubuntu). – You can use Virtual Machine• Vmplayer.

– http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0

• VirtualBox.– http://www.virtualbox.org/wiki/Downloads

– Download Ubuntu ISO • http://www.ubuntu.com/download/ubuntu/download

Page 26: UNIX/Linux System Programming

Project # 1• Get familiar with Ubuntu.– A lot of recourses in WWW– How to use Shell

• Run commands on the shell as you can• Create and run “Hello Word” program in C

under Linux• Submit snapshots of your work (E-Learning)

before next class

Page 27: UNIX/Linux System Programming

Project # 1

Send Me for any thing any time.

[email protected]