cst334 unix & x window system overview of unix purpose of an operating system (os) history unix...

48
CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive for compatability (POSIX standards)

Upload: beverley-lester

Post on 25-Dec-2015

220 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

CST334 Unix & X Window System

Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive for compatability (POSIX

standards)

Page 2: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Attention For additional reading, consult Appendix B and Chapter 1 of

Forouzan and Gilberg, Unix and Shell Programming

your textbook

Page 3: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Definition of an Operating System (OS)

An operating system is a control program for a computer that performs the following operations: allocates computer resources schedules routine tasks provides a platform to run application

software for users to accomplish tasks provides an interface between the

user & the computer

Page 4: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

History of Unix OS Prior to Unix, many operating systems

ran collections or “batches” of operations one at a time.

This single-user “batch-processing” approach did not take advantage of the potential processing power and speed of computers

Enter data infiles to be later

processed

ProcessCollection or

“Batch” of files

Receiveinformation of processed data

Note: batch processing lacks the advantage of immediate feedback as opposed to online processing

Page 5: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

History of Unix OS The Unix OS was developed (based on

Multics & CTSS operating systems) by Ken Thompson at the AT&T Bell Laboratories in 1969. He wanted to create an multi-user operating system to run “space travel” game.

Ken’s philosophy was to create an operating system with commands or “utilities” that would do one thing well (i.e. UNIX). Pipes could be used combine commands...

Page 6: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

History of Unix OS The first versions of UNIX were written

in “machine-dependent” program (such as PDP-7).

Ken Thompson approach Dennis Ritchie developer of C program), and in 1973 they compiled UNIX in C programming language to make operating system “portable” to other computers systems.

Page 7: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

History of Unix

Ken Thompson (recently retired from Bell Labs) is on left, and Dennis Ritchie is in the middle. What`s his name is on the right…

Page 8: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

UNIX Features The Unix OS is a multi-user OS allowing

more that more person to directly communicate with the computer.

Although the OS can only work on one task at a time, a small piece of time (time slice) is dedicated to each task or user - this is referred to as “time-sharing”.

Time sharing gives the illusion that the CPU is giving all the users its full attention

Page 9: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Illustration of Time-Sharing

TIME

User 1

User 2

User 3

User 4User 5

User 6

User 7

User 8

Page 10: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Development of Unix OS Unix became a popular OS among

institutions such as colleges & universities through a 4-year “try before you buy” deal.

Efficient and inexpensive way of networking promotes Internet use and file-sharing Open system allows for source code to be

shared among many programmers - allows for better coordination among programmers

Page 11: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Development of Unix OS Students at University of California

(in Berkley) further developed the UNIX operating system and introduced the BDS version of Unix

Unix

Bell LabsUNIX System V (5)Proprietary

Berkley Software Distribution (BSD)Free

Page 12: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Development of Unix OS There were versions of UNIX for

the Personal Computer (PC), such as XENIX, etc., but they didn’t catch on in popularity until Linux was developed in the early 90’s.

Page 13: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

History of Linux Linux operating

system developed by programming student Linus Torvalds

Linus wanted to develop Unix-like OS just to experiment with new 386 computer at the time...

Page 14: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Why Has Linux Become soPopular?

Linus decided to make Linux OSsource-code for Linux Kernal open to all:

Unlike traditional Operating Systems, anyone can modify and distribute Linux OS (as long as they distribute source code of Linux Kernel)

“Competition among Hackers” allow code to be improved and distributed often

Many users can spot bugs in the operating system or application if source code is “open”

Page 15: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Why Has Linux Become soPopular?

Other Factors: PC’s have increased processing power and a

there has been a noted shift from mainframes and minicomputers to PCs.

Since Linux is a “Unix Work-alike”, this OS has a reputation to be a very stable platform for networking (creating at-home servers) and running / maintaining applications.

Agencies such as Free Software Foundation created GNU project to provide free software.

Page 16: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Concerns Some people claim that “there are as

many version of Linux as there are users…”

POSIX (Portable Operating System Interface for Computer Environments) is a government standard to ensure consistency among different UNIX and Linux versions.

Many versions of Linux are approaching POSIX standard.

Page 17: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Concerns Freedom of allowing Linux users to create

“servers” connected up to Internet can lead to attacks from experienced hackers.

Linux commands may be considered “user-unfriendly” although GUIs are now used.

Prior reputation for difficult install process including the loss of data on other hard disk partitions.

Page 18: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Attention The following material is taken

from chapter one of your textbook ,

Unix and Shell Programming

Page 19: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Advantages of Unix Portable Multi user Multitasking Networking – log into the any site Organized file system Device independence – i/o vs files Utilities – > 100 utilities,

productivity Services – administrative tools built in

Page 20: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-1

Computer System

Page 21: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

A computer system Hardware

Input , output, CPU, auxiliary/secondary storage

Software Systems software

Primary purpose to support computer Applications software

Programs written to solve users problems

Page 22: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-2

Components of Computer Hardware

Page 23: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Operating system A special category of systems

software that manages all operating facets of the computer

Heart and character of a computer: DOS, Windows , Mac, UNIX

Performs resource allocation, scheduling, data management (file I/O), system security

Page 24: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Unix environments Personal environment

Linux, Apple’s System X (Unix kernel)

Timesharing environment Many users connected to one computer

Client/server environment Computing split between a central computer

(server) and users’ computers (clients)

Page 25: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-4

The Time-Sharing Environment

Page 26: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-5

The Client/Server Environment

Page 27: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-6Components of UNIX

Page 28: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Components of the Unix OS, cont

The kernel: contains most basic parts including process control and resource

management The shell: receives & interprets the

commands entered by the user Interpreter and script programming

language Three standard shells: Bourne (sh/bash) , C

(csh/tcsh), Korn (used in text)

Page 29: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Components of the Unix OS, cont Utilities: hundreds ! Primarily

Text editors, search programs, sort programs ls, cp, mv, vi, emacs, grep, chmod, sort, cal,

date, plus countless options the real heart of the class

Applications: written by systems administrators, professional programmers, or users Extended capability , sometimes made into

future utilities

Page 30: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Accessing Unix User ID Passwords Interactive session

Page 31: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-8

Interactive Session

Page 32: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Common commands date date -u cal cal 1 2005 cal 2005 who passwd man

Page 33: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-9

Command Source and Destination

Page 34: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-10

General Command Format

Page 35: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-11

The date Command

Page 36: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-12

The calendar Command

Page 37: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-13

The who Command

Page 38: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-14

The passwd Command

Page 39: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Passwords

a) must be >=6 characters long, b) must contain 2 out of 3 of

upper-case letters, lower-case letters, non-letters (digits, punct)

c) may not be a dictionary word or too similar to your name

Page 40: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Exit—to Log Out Type exit if it says "there are stopped jobs"

type exit again

Page 41: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-15

The echo Command

Page 42: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-16

The man Command

Page 43: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-17

The lpr Command

Page 44: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-18

The tty Command

Page 45: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-19

The clear Command

Page 46: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-20

The stty Command

Page 47: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-21

The script Command

Page 48: CST334 Unix & X Window System Overview of UNIX Purpose of an Operating System (OS) History Unix OS Characteristics of Unix OS History of Linux OS The Drive

Figure 1-22

The uname Command