Transcript File

Introduction To Operating System
1
What is Operating System?
 An operating system is a program that
controls the execution of application and
acts as an interface between the user of a
computer and the computer hardware.
2
 What is software?
 What is System Software?
 What is Application Software?
 What is memory? Types of Memory?
 What is processor?
3
 System software is computer software designed to operate the
computer hardware and to provide and maintain a platform for
running application software.
 Application software, also known as software application, application
or app, is computer software designed to help the user to perform a
singular or multiple related specific tasks. Typical examples are word
processors, spreadsheets, media players and database applications.
 Memory is the electronic holding place for instructions and data that
your computer's microprocessors can reach quickly.
 A processor is the logic circuitry that responds to and processes the
basic instruction that drive a computer. The term processor has
generally replaced the term central processing unit(CPU). The
processor in a personal computer or embedded in small devices is
often called a microprocessor.
4
 The speed is measured in Megahertz or MHz. A single
MHz is a calculation of 1 million cycles per second (or
computer instructions), so if you have a processor
running at 2000 MHz, then your computer is running at
2000,000,000 cycles per second, which in more basic
terms is the amount of instructions your computer can
carry out. Another important abbreviation is Gigahertz
or GHz. A single GHz or 1 GHz is the same as 1000 MHz
. Sounds a bit confusing, so here is a simple conversion
:
 1000
MHz (Megahertz) = 1GHz (Gigahertz) =
1000,000,000
Cycles per second
(or computer
instructions).
5
Introduction
 Amodern computerconsistsone ormoreprocessor,main
memory, disks, printers, a keyboard, a display, network
interface and various other input/output(I/O) devices.
Typically complex system.
 Managing all these components and using them optimally is
a very challenging job.
 For this reason, computers are equipped with a layer of
software called the operating system.
 Job of OS is to provide user programs with a better, simpler,
cleaner, model of the computer and to handle managing all
the resources .
6
 Most users will have had some experience with different
OS. Such as Windows, Linux( we will learn in current
semester), Mac.
 Appearance will be different of each OS but functionality
will remain almost same. Like accessing email, web
browser, read/ write docs.
 The program that users interact with, usually called Shell
when it is text based and the GUI(Graphical User Interface)
 Actually icon on desktop, it is not part of Operating system
but with help of icons to get its work done.
7
Web Browser
E-Mail Reader
Music Player
Software
User Mode
User Interface program
Kernel Mode
Operating System
Hardware
8
 In fig. we can see hardware at bottom, it consists of chips,
boards, disks, a keyboard, a monitor, and many more.
 On the top of hardware is software.
 Computers have two modes of operations: Kernel mode
and user mode.
 The OS is most fundamental piece of software and runs in
Kernel mode(Supervisor mode).
 In this mode, it has complete access to all the hardware and
can execute any instruction the machine is capable of
executing.
 Rest of software will run in User node.
9
 The user interface program, shell or GUI, is the lowest level
of user node software, and allows the user to start other
program, such as web browser, e-mail reader, or music
player.
 An important difference between the OS and normal
software(user node) is that if a user does not like a particular
e-mail reader, he or she is free to get a different one or write
his own.
 If he choose to write, he is not free to write his own clock
interrupt handler, which is part of OS and is protected by
hardware against attempts by users to modify. That means
user can not modify any code.
10
 In many system there are programs that run in user mode but
after all it is helping to OS or perform privileged functions.
 For example, you want to change your password of any
application. This application is not part of OS and also not run in
Kernel mode.
 But it carries out a sensitive function and has to be protected in a
special way.
 In some system, it is considered to be the OS(file system) and
run in user space.
 Some times it is very hard to draw a boundary because some
program run in Kernel mode and some in User mode.
11
 Operating System differ from user program in ways other than
where they reside. They are very large, huge, complex, and longlived.
 The source code of OS like Linux or Windows is about more
than five million lines of Code.
 They are very hard to write and having written on, the owner is
not happy to throw and start to again because it takes long time.
12
Operating System as a UI(User Interface)
 Every General purpose computer consists of the hardware,
OS, System program, application programs.
 The hardware consists of memory, CPU, ALU,I/O devices,
peripheral device and storage device.
 System program consists of compilers, loaders, editors. OS
etc.
 The application program consists of business program, data
base program.
13
Users
Editor
Loader
Operating System
Computer Hardware
14
Compiler
Application and Utilities
 Every computer must have an OS to run other programs.
The Operating system control and co-ordinates the use of
the hardware among the various system programs and
application program for a various users. It simply provides
an environment which other program can do useful work.
 The Operating system is a set of special program that run on
a computer system that allows it to work properly. It
perform basic task such as recognizing input from the
keyboard, keeping track of files and directories on the disk,
sending output to the display screen and controlling devices.
15
Purpose of OS
 OS is designed to serve two basic purposes:
 (1). It control the allocation and use of the computing
system’s resources among the various users and disks.
 (2). It provides an interface between the computer hardware
and the programmer that simplifies and makes feasible for
coding, creation, debugging of application programs.
16
OS support tasks
1. Provides the facilities to create, modification of program
and data files using an editor.
2. Access to the compiler for translating the user program
from high level language to machine language.
3. Provide a loader program to move the compiled program
code to computer’s memory for execution.
4. Provide routings that handle the details of I/O
programming.
17
Operating System as Resource
Manager( GTU, 4 Marks)
 Acomputerisasetofresourcesforthemovement,storage
and processing of data and for the control of these function.
The OS is responsible for managing these resource.
 Main resources that are managed by the operating system. A
portion of the operating system is in main memory. This
includes the Kernel, which contains the most frequently used
functions in operating system and at a given time, other
portions of OS currently in use.
18
I/O devices, printers,
Keyboard etc
I/O Controller
Operating
System
Software
I/O Controller
I/O Controller
Processor
Processor
O/S
Programs
Data
19
 Main resource that are managed by the operating system. A
portion of the operating system is in main memory. This includes
the Kernel, which contains the most frequently used function in
the operating system and at a given time, other portion of the OS
currently in use.
 The remainder of main memory contains other user program
and data. The allocation of main memory is controlled by the OS
and memory management hardware in the processor.
 The operating system decides when I/O device can be used by a
program in execution and controls the access to and use of files.
20
Evolution Of Operating System
 An operating system may process its workload serially or
concurrently. That is resource of the computer system may be
dedicated to a single program until its completion or they may be
dynamically reassigned among a collection of active program in
different stages of execution.
21
History of Operating System
 The history of OS is inextricably linked with history and
development of various generation of computer system.
 (1) Zeroth Generation-Mechanical Parts
 (2) First Generation(1945-1955)-Vacuum Tubes
 (3) Second Generation(1955-1965)- Transistor
 (4) Third Generation(1965-1980)-Integrated Circuits
 (5) Fifth Generation(1980-Present)- Large Scale Integration
22
Zeroth Generation
 The first digital computer was designed by Charles
Babbage.
 It had a mechanical design where wheels, gears, cogs
etc.
 This computer was slow and unreliable, this design
could not really become very popular.
 There was no question of any OS of any kind of this
machine.
23
First Generation
 After few years, a solution evolved which was electronic rather
than mechanical.
 These machines were huge and their continued use generated a
great deal of heat.
 The vacuum tubes also used to get burnt very fast. For one
computer to run, at least 10,000 to 20,000 tubes could be
wasted.
 The programming was done only in machine language so that is
not easy for normal people at this time. And also, this was
neither an assembly language nor any higher level language.
 So it was not friendly to both the users and programmers.
24
Vacuum Tubes
25
26
Osaka University Vacuum tube computer
Second Generation: Transistor and Batch System
 The introduction of the transistor in the mid-1950s changed
picture.
 Computer become reliable and small in size.
 For first time, there was a clear separation between
designers, programmers, analyst, operators
and
maintenance personnel.
 These machines now called mainframes , it locked in air
conditioned rooms by staff or professional operator to run
them.
 Large companies, major government or universities can
afford the multimillion dollar computer.
27
 To run a Job(i.e. program or set of programs), a programmer will write a
program first( on paper or FORTAN[FormulaTranslating System] or
assembler), then punch it on cards.
 He/she would then bring the card deck down to input room and hand it to
one of the operators and wait until the output was ready.
 When the computer finished whatever job it was currently running, an
operator will go to the printer and tear off the o/p and carry to the output
room, so that programmer can collect output later.
 Programmer take one of the card decks that had been bought from the
input room and read it in.
 If the FORTRAN compiler was needed, the operator have to get it from a
file cabinet and read it in.
 Much computer time was wasted while operators were walking around the
machine room.
28
Spooling
 Acronym for simultaneous peripheral operation on line. Spooling
refers to putting jobs in a buffer, a special area in memory or on a
disk where device can access them when it is ready.
 Spooling is useful because device access data at different rates.
The buffer provides a waiting station where data can rest while
the slower device catches up.
 Computer can perform I/O in parallel with computation, it
becomes possible to have the computer read a deck of cards to a
tape, drum or disk and to write out to a tape printer while it was
computing, this process is called spooling.
29
 The most common spooling application is print spooling. In print
spooling, documents are loaded into a buffer and then printer
pulls them off the buffer at its own rate.
 Spooling is also used for processing data at remote sites. The
CPU sends the data via communication path to a remote printer.
Spooling overlaps the I/O of one job with the computation of
other jobs.
 one difficulty with simple batch system is that the computer still
needs to read the deck of cards before it can begin to execute
job. This means that the CPU is idle during these relatively slow
operations.
30
Advantages of Spooling
 The spooling operation uses a disk as a very large buffer.
 Spooling is however capable of overlapping I/O operation of one
job with processor operations for another job
31
OS Services
 An operating system provides services to programs
and to the users of those programs. It provide an
environment for the execution of programs.
 The services provided by one operating system is
different than other operating system.
 Operating system makes the programming tasks
easier. The common services provided by the
operating system is listed.
32
OS Services
 Types of services that an operating system provides for reading
and writing records.These services fall in the category.
 Information Management(IM). From systems programmer’s
point of view, the operating system can be considered to be a
collection of many such callable programs or services categorized
under three major heads
 Information Management(IM).
 Process Management(PM).
 Memory Management(MM).
33
Types of OS
 (1) Mainframe Operating System
 Mainframe computers differ from personal
computers in terms of their I/O capacity.
A mainframe with
1000 disks and millions of
gigabytes of data.
 Mainframe are also making something of a comeback
as high-end web servers, servers for large-scale
electronic commerce sites and servers for business
to business transaction.
40
 The operating system for mainframes are heavily oriented
toward processing many jobs at once, most of which need
huge amount of I/O.
 They typically offer three kind of service
 Batch processing
 Transaction processing
 Timesharing processing
41
 A batch system is one that processes routing jobs without any
interactive user present.
 Claim processing in an insurance company or sales reporting for
chain of store is typically done in batch mode.
 Transaction processing system handle large numbers of small
requests, for example, check processing at a bank or airline
reservation.
 Each unit of work is small, but the system must handle hundred
or thousands per second.
 Timesharing systems allow multiple remote users to run jobs on
computer at once, such as querying a big database.
42
Server Operating Systems
 Server operating system runs on servers, which are either very
large personal computers, workstation or mainframes.
 They serve multiple users at once over a network and allow the
user to share hardware and software resources.
 Servers can provide print service, file service or web service.
 Internet providers run many server machines to support their
customers and websites use servers to store the WebPages and
handle the incoming requests.
 Example of server OS are Solaris, Linux,Windows server 200x.
43
Multiprocessor OS
 To connect multiple CPU into a single system depending on
how they are connected and what is shared, these systems are
called parallel computers, multicomputer, or multiprocessors.
 They need special operating system with special features for
communication, connectivity and consistency.
 In recent time, multicore chips for personal computers, even
conventional desktop and notebook operating system are starting
to deal with at least small scale multiprocessors and the number
cores is likely to day by day.
44
Personal computer OS
 Personal computer OS job is to provide a good interface to single
user.
 Modern operating system support multiprogramming support
dozens of programs started up at boot time.
 They are widely used for word processing, spreadsheet and
internet access.
 Examples of Personal computer OS are Window 98, Window
2000, Linux etc.
 Little bit training or introduction require for using personal
computer operating system.
45
Real time OS
 Real time OS characterized by having time as a key
parameter.
 For example, in industrial process control system, real time
computer have to collect data about the production process
and use it to control machine in factory.
46
Embedded OS
 Continuing on down to smaller and smaller systems, we come to
palmtop computers and embedded systems.
 A palmtop or PDA(personal Digital Assistant) is a small
computer that fits in pocket and perform little function such as
accessing electronic access site and memo pad
 Embedded systems run on the computers that control devices
that are not generally thought of as computers, such as TV sets,
microwave ovens, and mobile telephones.
 These often have some characteristics of real-time systems but
also have size, memory, and power restrictions that make them
special. Examples of such operating systems are PalmOS and
Windows CE (Consumer Electronics).
47
Smart Card OS
 The smallest operating systems run on smart cards, which
are credit card-sized devices containing a CPU chip.
 They have very severe processing power and memory
constraints. Some of them can handle only a single function,
such as electronic payments, but others can handle multiple
functions on the same smart card. Often these are
proprietary systems.
48