Вы находитесь на странице: 1из 29

Introduction to Operating System

Prof P.C.P. Bhatt

P.C.P Bhat OS/M1/V1/2004 1


OS Services Support Applications on
Computers
We often use computers for a variety of applications which
require some logistical system support. A few typical
applications are listed below:
¾ Document design
¾ Accounting
¾ E-mail
¾ Image Processing
¾ Games
OS support is application neutral and service- specific.

P.C.P Bhat OS/M1/V1/2004 2


Operating System : Definition

¾ It is the software layer, nearest to hardware which


facilitates launching of all the other software utilities and
applications.

¾ OS provides wide range of generic data services.

¾ Manages keyboard, display, processor, memory and


other devices.

¾ Schedules input, output and data processing.

P.C.P Bhat OS/M1/V1/2004 3


User and OS
¾ OS facilitates use of resources by hiding local details and
presenting an interface which is convenient to use.
¾ For instance : computer games, e-mail, browsing or
preparing documents are applications launched by simply
clicking on cue icons. How easy it is !

USER 1 USER 2 ……… USER n

SYSTEM AND APPLICATION PROGRAMS

OPERATING SYSTEM

COMPUTER HARDWARE
P.C.P Bhat OS/M1/V1/2004 4
User and System View of OS

¾ User perspective : ease of usage is the main consideration.

¾ System perspective : efficiency in usage of resources is the


main consideration.

As a provider of resources - OS must have a policy and a

control program to regulate the allocation of resources.

P.C.P Bhat OS/M1/V1/2004 5


Systems in Early 60s

¾ Main frames: Housed in Computer center.

¾ Users submitted “jobs” as deck of punched cards.

¾ Job batches of “Fortran Jobs, Cobol jobs”.

¾ Jobs executed sequentially – one job at a time.

¾ “Job header” control cards were used to define


users’ need of resources.

P.C.P Bhat OS/M1/V1/2004 6


Late 60s: Multiprogramming

¾ Sequential processing wasteful.


¾ Processor and Memory not fully utilized.
¾ Processor idles during Input output.
¾ Solution: Allow multiple programs to reside in the
main memory.
¾ When one program engages I/O the other can use
the processor.

P.C.P Bhat OS/M1/V1/2004 7


Still in Late 60s : Time Sharing

¾ Multiple users access the system.


¾ Each one gets a time-slice for his job.
¾ Users get an illusion as if he has the whole system
for himself.
¾ Time shared systems must inherently support
multiprogramming.

P.C.P Bhat OS/M1/V1/2004 8


OS : Design Considerations
¾ To achieve higher throughput : I/O could be
overlapped with processing.
¾ In 70s we witnessed emergence of high speed disks
as “secondary storage”.
¾ Address space enhanced to achieve access to “virtual
address space”.
¾ The Strategy: “swap out” what is not needed
immediately, “swap in” what is required for current
processing.

P.C.P Bhat OS/M1/V1/2004 9


Systems in Mid to Late 70s

¾ Systems supported multiple terminals.

¾ The metaphor: instead of “user going to compute” the

“computing should be brought” to the user.

¾ That metaphor led to remote terminal operations. It

also led to micro-computer revolution which set the

scene for launch of PCs.

P.C.P Bhat OS/M1/V1/2004 10


OS in 70s and 80s

¾ Major contribution by Bell Labs : Unix.


¾ Unix (1972) supported time-shared multi-user
operation.
¾ With Micro-computers on the scene small foot-print
OS like CP-M (1980).

P.C.P Bhat OS/M1/V1/2004 11


Client-Server Paradigm ( 80s)
¾ Project “Athena” at MIT developed the X-Clients.
¾ Also, a “window” as a virtual terminal gave a user a
capability to launch multiple applications from the
same terminal.
¾ A window “client” seeks a service from a “server”.
¾ A “compute server” could be sought for processing.
A “file server” could be accessed for “file access”.

P.C.P Bhat OS/M1/V1/2004 12


Early to Mid 80s : PC Arrives
¾ Need felt to distribute IO processing : led to the
development of BIOS.
¾ Also, led to graphic drivers like EGA, VGA cards.
¾ Networking support developed.
¾ Unix ( a command oriented OS ) also developed
Networking support.
¾ MAC developed “drag and drop” and icon based
“launch” for applications.

P.C.P Bhat OS/M1/V1/2004 13


Parallel Processing – Mid 80s
¾ Applications like weather prediction, medical image
processing require computing power in excess of what a
single processor can provide.
¾ Leads us to using “multi-processor” architectures.
¾ “Tightly coupled” and “loosely coupled” multi-processor
systems.
¾ One advantage one gets is fail-safe operation in addition to
the massive computing capability.
¾ Symmetric / asymmetric multi-processing refers to uniform
OS or heterogeneous OS on interconnected systems
P.C.P Bhat OS/M1/V1/2004 14
So what does an OS do?

¾ Power On Self Test (POST).

¾ Resource management.

¾ Support for multi-user.

¾ Error Handling.

¾ Communication support over Network.

¾ (Optional) Deadline support so that safety critical


application run and fail gracefully.

P.C.P Bhat OS/M1/V1/2004 15


Operating System Facilities

¾ User access to the system


¾ Storage and management of information
¾ Protection of information against accidental and
intentional misuse
¾ Support for data processing activities
¾ Communication with I/O devices
¾ Management of all activities in a transparent manner.

P.C.P Bhat OS/M1/V1/2004 16


Operative Environment for RTOS

The Key Factors Typical Operating Sequence


¾ Sensor 1. Sense an event
¾ Control Settings 2. Process the data
¾ System 3. Decide on an action
¾ Environment 4. Take corrective action
¾ Interface

P.C.P Bhat OS/M1/V1/2004 17


An Example of Real Time Control
Application
¾ Scenario : A temperature monitoring chemical process.

¾ What we need : A supervisory program to raise an alarm

when temperature goes beyond a certain band.

¾ The desired sequence of operational events : Measure

input temperature, process the most recent measurement,

perform an output task.

P.C.P Bhat OS/M1/V1/2004 18


Initialize the hardware

Monitoring Activate hardware to read temperature

Read the temperature


Input Store it in a register : temp register

No
Is temp register within the band?
Decision
Yes
Output: Within band
Output

Ring alarm!!!

P.C.P Bhat OS/M1/V1/2004 19


The Example Continues….

¾ Monitoring – this phase initializes and activates the


hardware.

¾ Input – reads the values from sensors and stores it in


register.

¾ Decision – checks whether the readings are within the


range.

¾ Output – responds to the situation.

P.C.P Bhat OS/M1/V1/2004 20


The Von Neumann Operational View

Fetch
Program
Instructions

Decode Memory Modules

Data Partition
Execute

P.C.P Bhat OS/M1/V1/2004 21


Operational Overview
¾ Processor – executes programs, schedules and allocate
processor time.
¾ Memory – stores programs, and supports mechanisms to
access data
¾ Input output devices – supports all input and output operations
¾ Communication mechanisms - with devices external to the
system
¾ Mutual exclusion – schedule the usage of shared device and
fair access
¾ Shell of an OS
¾ Human computer interface (HCI/CHI)
P.C.P Bhat OS/M1/V1/2004 22
A Physical Overview of a Computer System
C P U

Secondary Storage Primary Storage


Disc Controller Do

Terminals

Modem Input/Output
Dk
Controller
Remote Access
D1
Di Dj .… Dn
A Modern
Computer System D1 to Dn are I/O devices
P.C.P Bhat OS/M1/V1/2004 23
Input Output Devices
The normal instruction cycle

Fetch

Decode

Execute
No
Interrupt?

Interrupt service

Servicing an Interrupt
P.C.P Bhat OS/M1/V1/2004 24
Processes and Tools

¾ Program in execution is called a process.

¾ Interprocess communication forms the basis of distributed


computing.

¾ The machine seeking the service is client and the machine


offering the service is server.

¾ OS provide many general purpose utilities as a set of


packaged tools.

P.C.P Bhat OS/M1/V1/2004 25


Impact of Networking

¾ Computers communication NW required OS to be NW


aware enabling remote resource sharing.
¾ Programs, files or data could be moved around and
accessed.
¾ Lead to protocols like FTP, telnet, RPC.
¾ Internet required HTTP and browser support.

P.C.P Bhat OS/M1/V1/2004 26


Network Topologies
¾ Some NW topologies

P.C.P Bhat OS/M1/V1/2004 27


Other Trends in Computing
¾ Web based computing. Essentially web based services
made available.
¾ Systems like Web sphere, web logic provide such
services.
¾ Makes the prophetic statement by Scott McNealy, CEO
of SUN, “Network is the computer” appear true.

P.C.P Bhat OS/M1/V1/2004 28


Some Notable Contributions

¾ University of Manchester: One level store and


Manchester encoding.
¾ Dartmouth College: Time sharing systems
¾ MIT: Multics and Proj. Athena, Client server arch.
¾ Bell Laboratories and UC Berkeley : Unix and
Networking Software.
¾ Apple and Microsoft: Icon based HCI

P.C.P Bhat OS/M1/V1/2004 29

Вам также может понравиться