File - Amplify PGD(Telecom Managment)
Download
Report
Transcript File - Amplify PGD(Telecom Managment)
Lesson 1:
Operating System Basics
DATA BASE MANAGEMENT system
Page:1
Copyrights© 2008
BVU Amplify DITM
What is an Operating System?
OS = Operating System
A program that controls the
of application programs.
execution
An interface between applications and
hardware.
Makes the computer more convenient to
use
DATA BASE MANAGEMENT system
Page:2
Copyrights© 2008
BVU Amplify DITM
What is an Operating system?
Manages the resources of a computer
and controls the way they are used.
Allows resources to be used in an
efficient manner.
Examples of OS’s?
DATA BASE MANAGEMENT system
Page:3
Copyrights© 2008
BVU Amplify DITM
Where are OS’s used?
In more and more places!
Desktop and Server Computers
DOS + Windows 95/98/ME
Windows NT/2000/XP
Free Unix variants: Linux, FreeBSD,
NetBSD, etc.
Commercial Unix variants: Solaris, HPUX, AIX, etc.
DATA BASE MANAGEMENT system
Page:4
Copyrights© 2008
BVU Amplify DITM
Where are OS’s used?
MacOS
Some Game Consoles
Xbox: Cut-down Windows 2000
Personal Digital Assistants (PDAs)
PalmOS
Windows CE Windows Mobile
DATA BASE MANAGEMENT system
Page:5
Copyrights© 2008
BVU Amplify DITM
Where are OS’s used?
Embedded Linux
Mobile Phones
Symbian OS
Windows Mobile
Cars (fancy ones)
DATA BASE MANAGEMENT system
Page:6
Copyrights© 2008
BVU Amplify DITM
Where are OS’s used?
In the future also:
Digital Cameras (fancy ones)
MP3 Players (iPods, etc.)
Refrigerators!
Others?
DATA BASE MANAGEMENT system
Page:7
Copyrights© 2008
BVU Amplify DITM
Layers of a Computer System
DATA BASE MANAGEMENT system
Page:8
Copyrights© 2008
BVU Amplify DITM
Services And System Calls
User Program
(requests service) from
kernel
Type,
Data details
Are sent
Service,data
and
Status returned
UNIX system kernel
(provides
services) to
The user
Services offered and system calls
DATA BASE MANAGEMENT system
Page:9
Copyrights© 2008
BVU Amplify DITM
Services Provided by the OS
Program execution
Access to Input/Output (I/O)
devices
Disks, screens, keyboards, mice
Printers, cameras, speakers, etc.
DATA BASE MANAGEMENT system
Page:10
Copyrights© 2008
BVU Amplify DITM
Services Provided by the OS
Controlled access to files
System access
Sometimes: Program development
Compilers, editors and debuggers
Error detection and response
Internal and external hardware errors
Memory errors
DATA BASE MANAGEMENT system
Page:11
Copyrights© 2008
BVU Amplify DITM
Services Provided by the OS
Device failures
Software errors
Arithmetic overflow
Division by zero
Access to forbidden memory locations
(why?)
Operating system cannot grant request
of application
DATA BASE MANAGEMENT system
Page:12
Copyrights© 2008
BVU Amplify DITM
Operating System as Software
The OS functions the same way as
ordinary computer software
It is a program that is executed …
… but it has special privileges
The OS relinquishes control of the
processor to execute other
programs
DATA BASE MANAGEMENT system
Page:13
Copyrights© 2008
BVU Amplify DITM
Functions of Operating Systems
Provide a user interface
Run programs
Manage hardware devices
Organized file storage
DATA BASE MANAGEMENT system
Page:14
Copyrights© 2008
BVU Amplify DITM
Types of Operating Systems
Real-time operating system
Very fast small OS
Built into a device
Respond quickly to user input
MP3 players, Medical devices
DATA BASE MANAGEMENT system
Page:15
Copyrights© 2008
BVU Amplify DITM
Types of Operating Systems
Single user/Single tasking OS
One user works on the system
Performs one task at a time
MS-DOS and Palm OS
Take up little space on disk
Run on inexpensive computers
DATA BASE MANAGEMENT system
Page:16
Copyrights© 2008
BVU Amplify DITM
Types of Operating Systems
Single user/Multitasking OS
User performs many tasks at
once
Most common form of OS
Windows XP and OS X
Require expensive computers
Tend to be complex
DATA BASE MANAGEMENT system
Page:17
Copyrights© 2008
BVU Amplify DITM
Multi user/Multi tasking OS
DATA BASE MANAGEMENT system
Page:18
Copyrights© 2008
BVU Amplify DITM
Providing a User Interface
User interface
How a user interacts with a
computer
Require different skill sets
DATA BASE MANAGEMENT system
Page:19
Copyrights© 2008
BVU Amplify DITM
Providing a User Interface
Graphical user interface (GUI)
Most common interface
Windows, OS X, Gnome, KDE
Uses a mouse to control objects
Uses a desktop metaphor
DATA BASE MANAGEMENT system
Page:20
Copyrights© 2008
BVU Amplify DITM
Contd:
Shortcuts open programs or
documents
Open documents have
additional objects
Task switching
Dialog boxes allow directed
input
DATA BASE MANAGEMENT system
Page:21
Copyrights© 2008
BVU Amplify DITM
Graphical User Interface
DATA BASE MANAGEMENT system
Page:22
Copyrights© 2008
BVU Amplify DITM
Running Programs
Many different applications supported
System call
Provides consistent access to OS
features
Share information between programs
Copy and paste
Object Linking and Embedding
DATA BASE MANAGEMENT system
Page:23
Copyrights© 2008
BVU Amplify DITM
Managing Hardware
Programs need to access
hardware
Interrupts
CPU is stopped
Hardware device is accessed
Device drivers control the
hardware
DATA BASE MANAGEMENT system
Page:24
Copyrights© 2008
BVU Amplify DITM
Organizing Files and Folders
Organized storage
Long file names
Folders can be created and
nested
All storage devices work
consistently
DATA BASE MANAGEMENT system
Page:25
Copyrights© 2008
BVU Amplify DITM
Enhancing an OS
Utilities
Provide services not included
with OS
Goes beyond the four functions
Firewall, anti-virus and
compression
Prices vary
DATA BASE MANAGEMENT system
Page:26
Copyrights© 2008
BVU Amplify DITM
Enhancing an OS
Backup software
Archives files onto removable
media
Ensures data integrity
Most OS include a backup
package
Many third party packages exist
DATA BASE MANAGEMENT system
Page:27
Copyrights© 2008
BVU Amplify DITM
Backup Software
DATA BASE MANAGEMENT system
Page:28
Copyrights© 2008
BVU Amplify DITM
Enhancing an OS
Anti-virus software
Crucial utility
Finds, blocks and removes
viruses
Must be updated regularly
McAfee and Norton Anti-Virus
DATA BASE MANAGEMENT system
Page:29
Copyrights© 2008
BVU Amplify DITM
Enhancing an OS
Firewall
Crucial utility
Protects your computer from
intruders
Makes computer invisible to
hackers
Zone Labs is a home firewall
Cisco sells hardware firewalls
DATA BASE MANAGEMENT system
Page:30
Copyrights© 2008
BVU Amplify DITM
UNIX
Unix is a multi-user, multi-tasking
operating system.
You can have many users logged
into a system simultaneously, each
running many programs.
It's the kernel's job to keep each
process and user separate and to
regulate
access
to
system
hardware, including cpu, memory,
disk and other I/O devices.
DATA BASE MANAGEMENT system
Page:31
Copyrights© 2008
BVU Amplify DITM
History of UNIX
First Version was created in Bell
Labs in 1969.
Some
of
the
Bell
Labs
programmers who had worked on
this project, Ken Thompson, Dennis
Ritchie, Rudd Canaday, and Doug
McIlroy designed and implemented
DATA BASE MANAGEMENT system
Page:32
Copyrights© 2008
BVU Amplify DITM
History of UNIX
the first version of the Unix File
System on a PDP-7 along with a
few utilities. It was given the name
UNIX by Brian Kernighan.
00:00:00 Hours, Jan 1, 1970 is
time zero for UNIX. It is also called
as epoch.
DATA BASE MANAGEMENT system
Page:33
Copyrights© 2008
BVU Amplify DITM
History of UNIX
1973 Unix is re-written mostly
in
C,
a
new
language
developed by Dennis Ritchie.
Being written in this high-level
language greatly decreased the
effort needed to port it to new
machines.
DATA BASE MANAGEMENT system
Page:34
Copyrights© 2008
BVU Amplify DITM
History of UNIX
1977 There were about 500
Unix sites world-wide.
1980
BSD
4.1
(Berkeley
Software Development)
1983 SunOS, BSD 4.2, System
V
DATA BASE MANAGEMENT system
Page:35
Copyrights© 2008
BVU Amplify DITM
History of UNIX
1988
AT&T
and
Sun
Microsystems jointly develop
System V Release 4 (SVR4).
This
later
developed
into
UnixWare and Solaris 2.
1991 Linux was originated.
DATA BASE MANAGEMENT system
Page:36
Copyrights© 2008
BVU Amplify DITM
What is LINUX
Linux is a free Unix-type operating
system originally created by Linus
Torvalds with the assistance of
developers around the world.
It originated in 1991 as a personal
project of Linus Torvalds, a Finnish
graduate student.
DATA BASE MANAGEMENT system
Page:37
Copyrights© 2008
BVU Amplify DITM
What is LINUX
The Kernel version 1.0 was
released in 1994 and today the
most recent stable version is 2.6.9
Developed under the GNU General
Public License , the source code for
Linux
is
freely
available
to
everyone.
DATA BASE MANAGEMENT system
Page:38
Copyrights© 2008
BVU Amplify DITM
LINUX Distributions
Mandrake:
http://www.mandrakesoft.com/
RedHat: http://www.redhat.com/
Fedora: http://fedora.redhat.com/
SuSE/Novell: http://www.suse.com/
Debian: http://www.debian.org/
DATA BASE MANAGEMENT system
Page:39
Copyrights© 2008
BVU Amplify DITM
Red Hat
Red Hat Enterprise Linux is a
Enterprise
targeted
Operating
System. It based on mature Open
Source technology and available at
a cost with one year Red Hat
Network subscription for upgrade
and support contract.
DATA BASE MANAGEMENT system
Page:40
Copyrights© 2008
BVU Amplify DITM
UNIX Structure
DATA BASE MANAGEMENT system
Page:41
Copyrights© 2008
BVU Amplify DITM
Components of a Linux System
Like most UNIX implementations,
Linux is composed of three main
bodies of code; the most important
distinction between the kernel and
all other components
DATA BASE MANAGEMENT system
Page:42
Copyrights© 2008
BVU Amplify DITM
Kernel
Portion of operating system that is
always in main memory
Contains most-frequently used
functions
Also called the nucleus
Good performance of the kernel is
very important
DATA BASE MANAGEMENT system
Page:43
Copyrights© 2008
BVU Amplify DITM
Components of a Linux System (Cont.)
The kernel is responsible for
maintaining the important
abstractions of the operating
system.
DATA BASE MANAGEMENT system
Page:44
Copyrights© 2008
BVU Amplify DITM
Components of a Linux System (Cont.)
Kernel code executes in kernel
mode with full access to all the
physical resources of the
computer.
All kernel code and data
structures are kept in the same
single address space.
DATA BASE MANAGEMENT system
Page:45
Copyrights© 2008
BVU Amplify DITM
Components of a Linux System (Cont.)
The system libraries define a
standard set of functions through
which applications interact with the
kernel, and which implement much
of the operating-system
functionality that does not need the
full privileges of kernel code.
DATA BASE MANAGEMENT system
Page:46
Copyrights© 2008
BVU Amplify DITM
Shell
Shell is the command interpreter.
It is a interface between a user and
the system.
The kernel activates an interactive
program called shell for each user
logged into the system.
DATA BASE MANAGEMENT system
Page:47
Copyrights© 2008
BVU Amplify DITM
Shell
Shells provide a way to separate
users or tasks from each other.
Kernel maintains a unified overall
control.
Shell provides a prompt like $ or %.
This is called the command line
interface of the shell.
DATA BASE MANAGEMENT system
Page:48
Copyrights© 2008
BVU Amplify DITM
Shell
The user can type any valid
UNIX/Linux command.
Can run a shell script and press
enter to intimate the shell about
the task to perform.
The shell interprets the typed
command and searches a
predefined path for the executable
file by the name of the command
typed.
DATA BASE MANAGEMENT system
Page:49
Copyrights© 2008
BVU Amplify DITM
Shell
It checks the syntax of the
commands and if all is fine, starts
the corresponding executable
running and goes into waiting mode.
After the command finishes
executing, it exits and control is
returned to the shell.
DATA BASE MANAGEMENT system
Page:50
Copyrights© 2008
BVU Amplify DITM
Shell
A shell prompt is returned to the
user.
Actual fetching and returning of
data at the request of the shell is
done by the kernel.
DATA BASE MANAGEMENT system
Page:51
Copyrights© 2008
BVU Amplify DITM
Before Operating Systems…
Serial Processing
No operating system
Machines run from a console with
display lights and toggle switches,
input device, and printer.
Schedule time
DATA BASE MANAGEMENT system
Page:52
Copyrights© 2008
BVU Amplify DITM
Before Operating Systems…
Setup included loading the
compiler, source program, saving
compiled program, and loading and
linking.
DATA BASE MANAGEMENT system
Page:53
Copyrights© 2008
BVU Amplify DITM
Uniprogramming
Uniprogramming
Processor must wait for I/O
instruction to complete before
preceding.
DATA BASE MANAGEMENT system
Page:54
Copyrights© 2008
BVU Amplify DITM
Uniprogramming
But! Processors are much faster
than I/O devices… inefficient use
of CPU
DATA BASE MANAGEMENT system
Page:55
Copyrights© 2008
BVU Amplify DITM
Multiprogramming
When one job needs to wait for
I/O, the processor can switch to
the other job.
DATA BASE MANAGEMENT system
Page:56
Copyrights© 2008
BVU Amplify DITM
Multiprogramming
DATA BASE MANAGEMENT system
Page:57
Copyrights© 2008
BVU Amplify DITM
Example Effects
Uniprogramming
Processor use
22%
Memory use
30%
Disk use
33%
Printer use
33%
Elapsed time
30 min.
Throughput rate
6 jobs/hr
Mean response time 18 min.
DATA BASE MANAGEMENT system
Page:58
Copyrights© 2008
BVU Amplify DITM
Multiprogramming
43%
67%
67%
67%
15 min.
12 jobs/hr
10 min.
Achievements in OS Research
Processes
Memory management
Information protection and
security
Scheduling and resource
management
System structure
DATA BASE MANAGEMENT system
Page:59
Copyrights© 2008
BVU Amplify DITM
Processes
A program in execution
An instance of a program running on a
computer
The entity that can be assigned to and
executed on a processor
A unit of activity characterized by a
single sequential thread of execution
a current state
an associated set of system resources
DATA BASE MANAGEMENT system
Page:60
Copyrights© 2008
BVU Amplify DITM
Processes
Consists of three components
An executable program, i.e., some
code
Associated data needed by the
program
Execution context of the program
DATA BASE MANAGEMENT system
Page:61
Copyrights© 2008
BVU Amplify DITM
Processes
All information the operating
system needs to manage the
process.
e.g., who owns the process, which
priority does it have, what
resources does it currently ‘own’.
DATA BASE MANAGEMENT system
Page:62
Copyrights© 2008
BVU Amplify DITM
OS Support for Processes
Creating, destroying, starting,
stopping,setting priorities, …
Process synchronisation
Semaphores (wait/signal)
Monitors
Deadlock detection
Inter-process communication
Shared memory
DATA BASE MANAGEMENT system
Page:63
Copyrights© 2008
BVU Amplify DITM
Processes in Linux
DATA BASE MANAGEMENT system
Page:64
Copyrights© 2008
BVU Amplify DITM
Modern Operating Systems
Multithreading
• Each process is divided into threads that can
run simultaneously.
Thread
•
•
Dispatchable unit of work
Executes sequentially and is interruptible.
A process is a collection of one or
more threads
DATA BASE MANAGEMENT system
Page:65
Copyrights© 2008
BVU Amplify DITM
Modern Operating Systems
Symmetric multiprocessing.
There are multiple processors.
These processors share same main
memory and I/O facilities.
All processors can perform the
same functions.
DATA BASE MANAGEMENT system
Page:66
Copyrights© 2008
BVU Amplify DITM
Modern Operating Systems
Distributed operating systems
• Provides the illusion of a single main
memory and single secondary
memory space.
• Distributed shared memory
• Distributed file systems
DATA BASE MANAGEMENT system
Page:67
Copyrights© 2008
BVU Amplify DITM
Example OS: PalmOS
•Used for PalmPilot PDAs
and successors.
• Multitasking since
PalmOS 5.
• CPUs: Intel XScale,
Texas Instruments
OMAP, Motorola
Dragonball MX
• Wireless: 802.11b,
Bluetooth, GSM, CDMA
• 320×320+ displays
Good battery utilisation
DATA BASE MANAGEMENT system
Page:68
Copyrights© 2008
BVU Amplify DITM
Example OS: SymbianOS
•Designed for mobile phones
• Gives access to
graphics, multimedia,
networking, telephony,
crypto,
PC connectivity, etc.
DATA BASE MANAGEMENT system
Page:69
Copyrights© 2008
BVU Amplify DITM
The OS Wars
Why is the OS such a big deal?
• Windows vs Linux vs Mac
• Symbian vs PalmOS vs Windows Mobile
Incompatibilities
• OS’s have different interfaces.
• programs must be written differently.
• applications for one OS don’t run on
another.
Tendency to bloatware
•
•
Applications tend to move into the OS
Internet Explorer, Media Player, Search?
DATA BASE MANAGEMENT system
Page:70
Copyrights© 2008
BVU Amplify DITM
Security: Windows vs Linux
Windows Family
Developed from DOS
Originally single-user machines
No network few threats
Linux
Developed from Unix
Originally multi-user networked servers
Designed to withstand with security threats
from the beginning
DATA BASE MANAGEMENT system
Page:71
Copyrights© 2008
BVU Amplify DITM
THANK YOU
DATA BASE MANAGEMENT system
Page:72
Copyrights© 2008
BVU Amplify DITM
DATA BASE MANAGEMENT system
Page:73
Copyrights© 2008
BVU Amplify DITM