Upload
guruprasad-cse
View
216
Download
0
Embed Size (px)
Citation preview
7/27/2019 network chapter 1
1/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [1]
COS 231 Introduction to UNIX
Lecture 1
Chapter 1: Overview of the UNIX System
7/27/2019 network chapter 1
2/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [2]
What is an Operating System?
Organized group of programsinterface
between machines and users.
provides a set of tools to make easier to
designing, programming, debugging, testing
and maintaining programs
manage resources distribution to ensureeffectiveness of work of the computer
7/27/2019 network chapter 1
3/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [3]
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
7/27/2019 network chapter 1
4/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [4]
Types of Operating Systems
Batch OS - Sequential execution of the jobs. User are not allowed anyinterface during the program execution. The program used all computer'sresources during execution
Time sharing OS - Simultaneously stored several jobs in basicmemory. Provides for each of the jobs a "unit" of CPU's time (CPU time isshared among jobs) and distributed other computing resources. Allow user tointeract with his/her program during the execution.
Real time OS -Execute job immediately (in real time) when request
for execution occur.Multitasking/Time sharing - Simultaneous execution of several
jobs (tasks). To reach this effect some techniques are available:timesharing, swapping, paging, multiprocessors.
7/27/2019 network chapter 1
5/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [5]
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
7/27/2019 network chapter 1
6/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [6]
Network Operating Systems
7/27/2019 network chapter 1
7/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [7]
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 programsdeveloping, 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.
7/27/2019 network chapter 1
8/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [8]
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, usingcommunication protocol TCP/IP
one of the first full-screen editors - Vi (visual editors)
CShell command interpreter
7/27/2019 network chapter 1
9/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [9]
7/27/2019 network chapter 1
10/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [10]
7/27/2019 network chapter 1
11/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [11]
7/27/2019 network chapter 1
12/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [12]
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
7/27/2019 network chapter 1
13/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [13]
Major features of UNIX
Multiuser: UNIX is written in such a way that it is able torecognize 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. Notonly 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 jobrequests in a temporary storage area (queue) and deliver them in an
orderly fashion to limited hardware devices.
7/27/2019 network chapter 1
14/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [14]
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 storageallows endless potential for categorization and ongoing
manipulation of files and directories.
Open communication: UNIX allows wide variety
of communication: Email, communication betweenterminals, access to the worldwide network.
7/27/2019 network chapter 1
15/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [15]
Major features of UNIX Shell environment: user interaction with the UNIX OS is
accomplished through a program known as the shell. The shell servesas a command interpreter and translate commands (human languagecode) to machine language code. The shell also provides a rich and
powerful environment for programming known as shell script. Theshell provides opportunity to run program in the background (notvisible on the terminal) and to combine several commands to performone more complex task.
Security, accounting, auditing: because of sharing thesame disk among the users, the authorized access to directories andfiles in the UNIX was build up a comprehensive system for accountingand data security and also for auditing any actions performed on the
system.
UNIX utilities: there are more than 400 utilities or commandsavailable to the UNIX user.
Networking.
7/27/2019 network chapter 1
16/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [16]
7/27/2019 network chapter 1
17/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [17]
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 waitingprocesses one by one.
File management: manage the efficient storage and retrieval of all files.
It is responsible for establishing the organization structure known as filesystem.
multiplelogin
7/27/2019 network chapter 1
18/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [18]
The UNIX Kernel
Control the allocation of space in mainmemory (RAM)
Swapping Paging
Security, accounting, auditing (C2 security
level) Security is established for files, devices,
memory and processes.
7/27/2019 network chapter 1
19/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [19]
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 adevice 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-independentcan beredirected to or from any appropriate device (redirection).
7/27/2019 network chapter 1
20/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [20]
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.
7/27/2019 network chapter 1
21/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [21]
Networking
Network communication support was introducedin Berkeley Unix 4.2
TCP/IP is the predominant network protocol usedin 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
7/27/2019 network chapter 1
22/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [22]
Additional Features of the UNIX System
Job controlto run several jobs at once in background and
foreground
Screen-oriented editorvi
Shell functionsUNIX shell can be used as a
programming languageallow defining new commands
GUIX Window system created in 1984 at the MIT:
portable and flexible
Operates in a networked environmentuser can run a program on
a remote system and can send the results on a local display
7/27/2019 network chapter 1
23/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [23]
The OS Shell
7/27/2019 network chapter 1
24/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [24]
Different shells available within a UNIX
environment:
The Bourne shell (/bin/sh) was the original shell program forUNIX.
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 theBourne 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 Kornshells. Bash is the most popular shell with Linux and is the
default for most distributions.
7/27/2019 network chapter 1
25/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [25]
Text reading:
Chapter 1- Overview of the UNIX System
After reading it try to answer to all questions
from Review Exercises section
7/27/2019 network chapter 1
26/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [26]
Self-test:
Put the OS components in correct
place
7/27/2019 network chapter 1
27/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [27]
Before you start
How can I connect to Linux-system from my networked PC?Terminal emulator.
Start-Run
telnet linux.stud.aubg.bg
telnet linux
telnet 172.17.48.11 What is my login name? ( Your e-mail)
What is my password? (You should received your password fromOCC by e-mail)
CHANGE YOUR PASSWORD!!!$ passwd
Changing password for xxxxxx
Old password:
New password:
Re-enter new password:
Obsolete !
Use F-secure client or
PuTTy
7/27/2019 network chapter 1
28/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [28]
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 reverseorder
New password must differ from the previous oneat least by 3 characters
Keep password in mind
7/27/2019 network chapter 1
29/30
____________________________________________________________________________________COS 231 Introduction to UNIX, AUB, V. Karagiozov [29]
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*
DO
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 enteringyour password
7/27/2019 network chapter 1
30/30
COS 231 Introduction to UNIX AUB V Karagiozov [30]
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!