Sie sind auf Seite 1von 33

Unit 1

Introduction to Operating System

Computer People 2000 1


What is an Operating System?
• An OS is a program which act as an interface
between a user of computer and computer
hardware.
In
tege
r Contro l Ke
ybo
ard M
ouse
Un
it Un it
CD
F
loa
tin
gP oin
t
Un
it
Ca
che

Processor
SystemBus
HD
M
em
Bu
s

RAM/ROM Prin
ter Monitor
Computer People 2000 2
Layered View of a Computer System

Computer People 2000 3


What is an Operating System?
• An OS is a control program, which controls and
coordinate the use of Hardware among the
various application program for the various
users.
• The OS is similar to Government.
• The OS is a resource allocater.
– (CPU time, memory space, file storage space,
input/output devices).
• Primary Goal : convenience of the user.
• Secondary Goal: efficient operation of computer
system.
Computer People 2000 4
History of Operating System-
The First Generation(1945-1955)
• The computers were built with tens of thousands
of vacuum tubes, were very slow.
• A single group of people designed, programmed,
operated and maintained each machine.
• All programming was done in machine language
by wiring up plugboards to the control machine
basic functions.
• Programming language were unknown.
• Only numerical calculation were carried out.

Computer People 2000 5


History of Operating System-
The Second Generation(1955-1965)
• The introduction of transistors made possible to
build reliable system that can be sold to the
customers.
• This also made separation between program,
operator and other personals.
• These systems were used for scientific and
engineering calculations.

Computer People 2000 6


History of Operating System
The Second Generation(1955-1965)
• For example: If a programmer wants to run a
Fortran, he will follows following steps.
– Load Fortran Complier.
– Program read from card reader to magnetic
tape.
– Compiler produced assembly language code
to tape.
– Assembly to binary code to tape and then to
the user result.
Computer People 2000 7
History of Operating System-
The Second Generation(1955-1965)
• Setup time was main problem in pervious
operation.
• To solve this problem two fold solution were
developed.
– Professional computer operators hired to reduced
setup time.
– Jobs with similar needs were batched together and
run through the computer as group.
• There were still problems with this approach.
• When a job stopped, the operator has to take
notice which program has problem.
Computer People 2000 8
History of Operating System-
The Second Generation(1955-1965)
• Automatic job sequencing (first OS were
created).
• A small program called resident monitor was
created. Which always reside in memory.
• The resident monitor would automatically
sequence from one program to another.
• For this kind of operation, the user program has
sequences like $JOB, $FTN, $ASM, $RUN,
$END.

Computer People 2000 9


History of Operating System-
Simple Monitor

Loader

Monitor
Job sequencing

Control Card
Interpreter

User program
area

Computer People 2000 10


History of Operating System-
The Second Generation(1955-1965)

CPU

Card reader Line Printer

CPU

Card reader Tape Drivers Tape Drivers Line Printer


Computer People 2000 11
History of Operating System-
The Third Generation(1965-1980)
• ICs and Multiprogramming (Mini Computers)
• Previously 7094 were used for scientific
application.
• 1401 were used for commercial use.
• IBM introduced system 360 to cater both needs
in one system.
• For this a complicated OS were introduced to
handle all these computations.
• Multiprogramming were also introduced in this
generation.
Computer People 2000 12
History of Operating System-
Multiprogramming
• In multiprogramming the computer is asked to run
several programs at the same time.
• The processor could be kept busy for the most of time
by switching from one program to another in the rapid
succession.
• In a batch multiprogramming system, a series of jobs
are loaded into memory at the same time, while one
job is waiting for an I/O transfer another job is started.
• JOB A Running I/O Wait Running I/O Wait
• JOB B I/O Wait Running I/O Wait Running

Computer People 2000 13


History of Operating System-
Time Sharing
• A time sharing OS use CPU scheduling and
multiprogramming to provide each user wit a
small portion of a time shared computer.
• This system allows many users to
simultaneously share the computer.
• CPU switches rapidly from one user to next.
• Early computer was not interactive system.
• One programmer at a time.
• Batch system no interaction.
Computer People 2000 14
History of Operating System-
The Forth Generation(1980-1990)
• LSI made it possible to built PC for personal use.
• Two famous OS were introduced.
• MS-DOS and Unix
• Also introduced Network and distributed
operating systems.
• Networking OS, the users are aware of the
existence of multiple computer, and can log in to
remote machines and copy files from one
machine to another.
• Each machine runs its own local OS and has its
own user.
Computer People 2000 15
History of Operating System-
Distributed System
• Recent trend in computer system is to distribute
computation among several physical processes.
• Two such systems are available.
– Tightly Coupled System: the processors
shares memory and clock.
– Loosely Coupled System: the processors do
not share memory and clock, such processors
has its own local memory.

Computer People 2000 16


Operating System Concepts
• OS has four major concepts.
• Process
• Files
• System Call
• The Shell

Computer People 2000 17


Operating System Concepts
Process:
• Process is the program in execution.
• It consisted of the executable program, the
program’s data, and Stack, program counter,
stack pointer and other registers.
• All these information are stored in the process
table.

Computer People 2000 18


Operating System Concepts
Files:
• Files consists of sequence of bit, byte, lines or
records whose meanings are defined by its
creator.
• Files are mapped by the OS on to the physical
devices.
• The OS provides a uniform logical view of
information storage.

Computer People 2000 19


Operating System Concepts
• Following major tasks are performed by OS.
– The creation and deletion of files.
– The creation and deletion of files.
– The support of primitives for manipulating files
and dir.
– Mapping files onto secondary storage.
– The backup of files on stable storage media.

Computer People 2000 20


Operating System Concepts
System Calls:
• User programs communicate with the OS and
request services from it by making System Calls.
• Corresponding to each System Call is a Library
Procedure.
• This procedure puts the parameter of the System
Call in a register and then issues a TRAP
Instruction.
 The TRAP Instruction is executed to change
mode from user to kernel.
 Control goes to Operating System.
Computer People 2000 21
Operating System Concepts
 OS determines which system call is to be carried
and examines the parameters.
 Kernel indexes the dispatch table, which
contains pointers to service routines for system
calls.
• If the parameters are valid, OS performs tasks.
Otherwise it return error.
• For example:
• Count = read (file, buffer, nbytes);

Computer People 2000 22


System Call
Process

System Call

Library Call

trap
Dispatch Table
Service
Code
Kernel
Code

Dispatch Table
Computer People 2000 23
Operating System Concepts
The Shell:
• Editors, compilers, assemblers, linkers and
command interpreters are not the part of OS.
• UNIX command interpreter is called The Shell.
• Shell make heavy use of many OS features.
• It is interface between a user and the OS.
• When any user log in, a shell is started up.
• The Shell has terminal as standard input and
standard output.
Computer People 2000 24
Operating System Structure
• Monolithic Systems:
• The structure is that there is on structure.
• The OS is written as a collection of procedures.
• Each procedure can call other procedure
whenever it needs.
• In this approach all the individual procedures are
complied together into single object file with the
linker.

Computer People 2000 25


Operating System Structure
• Basic structure for the OS:
– A main program invokes the requested
service procedure.
– A set of service procedures that carry out the
system call.
– A set of utility procedure that helps the service
procedures.

Computer People 2000 26


Operating System Structure
Layered System
• The OS is broken up into a number of layers.
• Bottom layer is hardware and the topmost layer
is the user interface.
• A typical layer consists of data structures and a
set of routines to service the layer above it.
• The major difficulty with layered approach is
careful definition of layers, because a layer can
only use the layers below it.
• Less efficient than other approaches.

Computer People 2000 27


Operating System Structure
Layered System
5 The Operator

4 User Programs

3 Input/Output Management

2 Operator-process communication

1 Memory and Drum Management

0 Processor Allocation and Multiprogramming

Computer People 2000 28


Operating System Structure
Virtual Machines
• The timesharing OS provides:
– 1. Multiprogramming
– 2. An extended machine with a convenient interface
than the bare hardware.
• The heart of the system runs on bare hardware
and does multiprogramming with several virtual
machines to the next layer up.
• Each Virtual machine is identical to the true
hardware.
• Each can run any OS that run directly to the
hardware.

Computer People 2000 29


Operating System Structure
Virtual Machines
• For time sharing, this machine can run
interactive system call called CMS
(Conversational Monitoring system).

System Calls

I/O Instructions CMS CMS CMS Trap

Trap Vm/370
370 Bare Hardware

Computer People 2000 30


Operating System Structure
Client Server Model
• In this module Kernel handle the communication
between clients and servers.
• By splitting the OS up into parts, each of which
handles one facet of the system. Such as file
service, process service or memory services.
• Advantage of this OS is its adaptability to use in
distributed system.

Computer People 2000 31


Operating System Structure
Client Server Model
User Mode

Client Client Process Terminal …… File Memory


Process Process Server Server Server Server

Kernel

Client Obtain service Kernel Mode


By sending message
To server processes

Computer People 2000 32


Windows NT Client-Server
Structure

Computer People 2000 33

Das könnte Ihnen auch gefallen