Vous êtes sur la page 1sur 30

COS 231 Introduction to UNIX

Lecture 1
Chapter 1: Overview of the UNIX System

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 1]

What is an Operating System?


Organized group of programs interface between machines and users. provides a set of tools to make easier to designing, programming, debugging, testing and maintaining programs manage resources distribution to ensure effectiveness of work of the computer
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 2]

OS Functions
To manage computer resources:
CPU, basic storage, disc storage, I/O devices, buses, channels, controllers, Process management, etc.

To manage jobs execution To provide tools for software engineering To provide tools for data security, priorities, authorized access Networking
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 3]

Types of Operating Systems


Batch OS - Sequential execution of the jobs. User are not allowed any
interface during the program execution. The program used all computer's resources during execution

Time sharing OS - Simultaneously stored several jobs in basic

memory. Provides for each of the jobs a "unit" of CPU's time (CPU time is shared among jobs) and distributed other computing resources. Allow user to interact with his/her program during the execution. for execution occur.

Real time OS - Execute job immediately (in real time) when request

Multitasking/Time sharing - Simultaneous execution of several


jobs (tasks). To reach this effect some techniques are available: timesharing, swapping, paging, multiprocessors.

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 4]

Network operating system capabilities


All versions of UNIX and most other modern network operating systems (NOS) support advanced features:
Multiuser capability Multitasking Distributed processing
High level of security

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 5]

Network Operating Systems

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 6]

Types of users
1. End-users - are not involved in programming, only using. 2. Applied software engineers - involved in applied
programs developing.

3. System software engineers - involved in system programs


developing, setting up OS for certain system hardware, organizing the upper level of computing environment.

4. System engineers - developing hardware, firmware,


organizing the low-level computing environment.

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 7]

History of developing UNIX OS


The original Bell Labs UNIX:
1969/70 Ken Thompson - UNiplexed Information and Computing Service (the spelling of UNICS was later changed to UNIX) 1973 Ken Thompson and Dennis Ritchie (the author of C language) rewrote the system in C

The Berkeley Standard Distribution (late 70s):


communication and networking functions, using communication protocol TCP/IP one of the first full-screen editors - Vi (visual editors) CShell command interpreter
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 8]

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [ 9]

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [10]

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [11]

Overview of the UNIX System


Well-thought-out family of utility programs Can support many users (multiuser OS) Can support many tasks (multitask OS) UNIX system kernel File structure Security The Shell Device-Independent Input and Output Interprocess Communications Networking utilities

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [12]

Major features of UNIX


Multiuser: UNIX is written in such a way that it is able to
recognize and handle many requests for services at the same time. Under UNIX every user is identified and has his own private part of the resources.

Multitasking: the logical extension of multiuser behavior. Not


only several users can be on the system at once, but also they may be running different programs at the same time.

Shared Peripherals: UNIX has abilities to place various job


requests in a temporary storage area (queue) and deliver them in an orderly fashion to limited hardware devices.

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [13]

Major features of UNIX


Hierarchical File & Directory structure:
The storage of data on the hard disk in an organized and hierarchical fashion. This logical structure of data storage allows endless potential for categorization and ongoing manipulation of files and directories.

Open communication: UNIX allows wide variety


of communication: Email, communication between terminals, access to the worldwide network.

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [14]

Major features of UNIX


Shell environment: user interaction with the UNIX OS is
accomplished through a program known as the shell. The shell serves as a command interpreter and translate commands (human language code) to machine language code. The shell also provides a rich and powerful environment for programming known as shell script. The shell provides opportunity to run program in the background (not visible on the terminal) and to combine several commands to perform one more complex task. same disk among the users, the authorized access to directories and files in the UNIX was build up a comprehensive system for accounting and data security and also for auditing any actions performed on the system. available to the UNIX user.

Security, accounting, auditing: because of sharing the

UNIX utilities: there are more than 400 utilities or commands Networking.
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [15]

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [16]

The UNIX Kernel


Process management:
control the execution of the requests from programs that require responses from system hardware - ability to cover multiuser and multitasking requests; making decisions about scheduling of the processing competing for the CPU's and other peripheral devices time - time sharing. Rotate all waiting processes one by one.

File management:
manage the efficient storage and retrieval of all files. It is responsible for establishing the organization structure known as file system. multiple login

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [17]

The UNIX Kernel


Control the allocation of space in main memory (RAM) Swapping Paging Security, accounting, auditing (C2 security level) Security is established for files, devices, memory and processes.
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [18]

Device independence
Communications with the core of UNIX (the kernel) is accomplished through a standardized set of system calls. All device drivers (device managing programs) use this scheme of system calls. It is always possible to enter a device driver for new device into kernel. Devices (printer, terminal, etc.) and disk files all appear as files to UNIX programs. Input and output are device-independent can be redirected to or from any appropriate device (redirection).

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [19]

Interprocess Communications
(InterProcess Communication) - The exchange of data between one program and another either within the same computer or over a network. It implies a protocol that guarantees a response to a request. Unix uses pipes and filters A pipe sends the output of one program to another program as input A filter is a program designed to to process a stream of input data and yield a stream of output data.

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [20]

Networking
Network communication support was introduced in Berkeley Unix 4.2 TCP/IP is the predominant network protocol used in Unix Networking utilities:
check the status of remote computers and their users log-in on remote systems run commands on remote systems copy files from one system to another interact with users on remote systems

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [21]

Additional Features of the UNIX System


Job control to run several jobs at once in background and foreground Screen-oriented editor vi Shell functions UNIX shell can be used as a programming language allow defining new commands GUI X Window system created in 1984 at the MIT:
portable and flexible Operates in a networked environment user can run a program on a remote system and can send the results on a local display

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [22]

The OS Shell

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [23]

Different shells available within a UNIX


environment:
The Bourne shell (/bin/sh) was the original shell program for UNIX. The Korn shell (/bin/ksh) is a superset of the Bourne shell and was developed by David Korn at Bell Labs. It has many of the Bourne shell features, plus added features such as aliasing and history. The C shell (/bin/csh) is based on the C programming language. The Bourne-Again Shell (bash) has the feel of the Bourne and Korn shells and incorporates features from the C and Korn shells. Bash is the most popular shell with Linux and is the default for most distributions.

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [24]

Text reading:
Chapter 1- Overview of the UNIX System
After reading it try to answer to all questions from Review Exercises section

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [25]

Self-test: Put the OS components in correct place

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [26]

Before you start


How can I connect to Linux-system from my networked PC?
Terminal emulator. Start-Run Obsolete ! telnet linux.stud.aubg.bg Use F-secure telnet linux PuTTy telnet 172.17.48.11 What is my login name? ( Your e-mail)

client or

What is my password? (You should received your password from OCC by e-mail) CHANGE YOUR PASSWORD!!!
$ passwd Changing password for xxxxxx Old password: New password: Re-enter new password:

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [27]

How to pick a password?


At least six char long At least two letters and one number (special symbols, upper-, lower-case) DO NOT use easily guessed passwords: your login name, your names, your spouses name, mother, father, sister, pet, etc. names, your ID#, birthday, word from a dictionary, words in reverse order New password must differ from the previous one at least by 3 characters Keep password in mind
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [28]

More rules for choosing a good password


DO NOT:
use a word (or words) in any language use a proper name use information that can be found in your wallet use information commonly known about you (car license, pet name, etc) use control characters. Some systems can't handle them write your password anywhere ever give your password to *anybody* use a mixture of character types (alphabetic, numeric, special) use a mixture of upper case and lower case choose a password you can remember change your password often make sure nobody is looking over your shoulder when you are entering your password

DO

____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [29]

Logging Out
After changing the password log out and try logging back in using your new password When finish you work log out:
Ctrl+D, or logout, or exit

Always log out using one of these commands. Do not leave your terminal window opened!
____________________________________________________________________________________ COS 231 Introduction to UNIX, AUB, V. Karagiozov [30]

Vous aimerez peut-être aussi