0% found this document useful (0 votes)
30 views22 pages

Introduction To Operating Systems: System?

This document provides an introduction to operating systems. It outlines the objectives of an operating systems course which are to understand OS functions, modules, design concepts, and UNIX system programming. An OS manages resources and provides a virtual interface for users. Key points are made about OS types, examples, design approaches, and the layered model. The document discusses where an OS fits, why we need one, resource and virtual machine management functions, and common design techniques like policy/mechanism separation and the kernel approach.

Uploaded by

Gaurav Mahajan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views22 pages

Introduction To Operating Systems: System?

This document provides an introduction to operating systems. It outlines the objectives of an operating systems course which are to understand OS functions, modules, design concepts, and UNIX system programming. An OS manages resources and provides a virtual interface for users. Key points are made about OS types, examples, design approaches, and the layered model. The document discusses where an OS fits, why we need one, resource and virtual machine management functions, and common design techniques like policy/mechanism separation and the kernel approach.

Uploaded by

Gaurav Mahajan
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 22

Introduction To

Operating Systems
• Outline of the lecture
• Objective of the course
• Prerequisite for OS Course
• What is an Operating
System?
• Do we need an OS?
• Where does it fit in?
• Types of Operating Systems
• Example Operating Systems
• OS Design Approaches

1
Objective of the
Course:
• The objectives of the course are:
• To provide an understanding of
the functions of an OS.
• To provide an insight into the
functional modules of an OS.
• To study the concepts
underlying the design and
implementations of a
multitasking OS.
• To study the design of UNIX OS.
• To provide exposure to System
programming in UNIX.

2
Prerequisite for OS
course:
• The way OS is an integral part of
any computer system, a course
in OS is an integral part of any
Computer Science Education.
• However, to learn the OS Course,
you need to know the following:
– Computer Organization
– Higher level Programming
Language, such as C
– Exposure to Assembly language for
some CPU
– Familiarity of specific processors
having certain features, for
example, Intel 386.
3
What is an Operating
System?
• An operating system is a
layer of software on a bare
hardware machine that
performs two basic
functions:
– Resource management,
and
– Virtual machine
management (User
friendliness).

4
Resource management:

• A user process accesses several


hardware and software resources
during its execution. Example of
resources are CPU, Main Memory,
input output devices, and various
types of software resources such as
compiler, linker, loader, files, etc. it is
the OS that manages the resources
and allocates them to users in an
efficient and fair manner.
• Resource management encompasses
the following:
– Time management (CPU, DISK
Scheduling)
– Space Management (main Memory &
Secondary Memory)
– Process Synchronization and Deadlock
Handling Accounting and Status
Information

5
Virtual Machine
Management:
• An operating System hides the unpleasant, low-
level details and idiosyncrasies of a bare hardware
machine and provides users with a much friendlier
interface to the machine. To Load, manipulate print
and execute programs, high level commands
command can be can be used without the
inconvenience of worrying about low-level details.

• The layer of operating system transforms a
bare hardware machine into a virtual machine with
added functionality (such as automatic resource
management). Moreover, users of the virtual
machine have the illusion that each one of them is
the sole user of the machine, even though the
machine may be operating in a multi user
environment.

• Virtual machine management
encompasses the following tasks:
– Execution Environment (Process management-
creation, control, and termination, file manipulation,
interrupt handling, support for I/O operations,
language support).
– Error Detection and Handling.
– Protection and Security.

6
What is an OS?

• So, an OS is a
• Resource manager, and a
• Virtual Machine Manager.

7
Do we need an OS?
• It is not essential to have an OS to use a
computer.
• Some special purpose computer do not have
and OS.
• Exp: Almost all microwave ovens have a small
computer ship inside to control the oven. But
few of the computer chips in microwave ovens
have OS.
• The OS implements many necessary features
that are used by almost every program. It is a
good investment to implement them once in
OS rather than in each application program.
• An OS is useful because it contains a library
of reusable services.
• A general-purpose computer must be able to
run a wide range of programs. For such a
system, an OS is the most natural way to go.
Otherwise, each application would have to
program its own operating system services.
• So, for a general-purpose Computer system, it
is essential to have an OS.

8
Where does it fit in?
User Programs and other System programs

Operating System Interface

Operating System

Hardware Interface

Hardware

• An OS does what software does. It


implements some desired
functionalities by building on the
functionalities available in lower
level.

9
A layer of the virtual
machine:
Problem Oriented Language Level

Assembly Language Level

Assembler

OS Machine Level

Partial Interpretation

Conventional Machine Level

Interpretation

Micro Programming Level

Digital logic Level

Note: OS is like H/W in the sense that only one


copy of the OS runs at any particular time.

10
Types of Operating
Systems:
• Mono programming OS: Exp-
DOS.
• Batch Operating System
• Time sharing OS
• Multiprogramming OS: Exp-
Windows 95/98
• Multi user OS: Exp – UNIX
• Other Operating Systems are
either Architecture Driven or
application Driven.

11
Architecture Driven

• Architecture Driven:
• Multiprocessor OS (Mach)
• Distributed OS (Amoeba)
• Application Driven:
– Data base OS
– Real time OS

12
Example Operating
Systems:
• Dos
• Windows (95/98/2000, NT,
XP)
• UNIX (SCO, Sun Solaris, HP,
IBM)
• Mach
• Amoeba

13
Design Approaches:
• Monolithic Design:
– An OS could be designed as a huge, jumbled
collection of processed without any
structure.
– Any process could call any other process to
request a service form it.
– The execution of a user command usually
involve the activation of a series of
processes.
– The implementation of this kind could be
acceptable for small operating system. It
would not be suitable for large operating
system as the lack of a operating system as
the lack of a proper structure would make it
extremely hard to specify code, test, and
debug such a large operating system.
– The design of OS has matured over the last
three decades.
– To days Operating Systems are enormous
and complex.
– Design, implementation and testing of an OS
is a large software project.

14
Policy Vs Mechanism:
• Policy refers to what should be done.
• Mechanism refers to how it should be
done.
• Exp: CPU Scheduling
• Policy: decides which scheduling algo
such as FCFS, SJF etc will be used.
• Mechanism: How to implement it.
• A good OS design must
separate policies form mechanisms.
Since policies make use of the
underlying mechanisms, the
separation of policies form
mechanisms greatly contributes to
flexibility, as policy decision can be
made at a higher level.

15
Layered approach:
• Dijkstra advocated the layered
approach to lessen the design
and implementation complexities
of an OS.
• Composed of several layers.
• The functionalities are assigned
into these layers.
• Each layer has well-defined
input-output interfaces with the
two adjacent layers.

The bottom layer interfaces with
the machine hardware.
• The top layer interfaces with the
user.

16
Advantages:

• It has all the advantages of


modular design.
• A new layer can replace a
layer as long as the
interfaces to the adjacent
layers remain unchanged.
• It’s a well-studied design

17
Disadvantages:

• Functionalities must be
carefully distributed to
different layers, because a
layer can make use of only
of the functionalities
provided by the layer
beneath it.

18
Example:

• The “THE” OS has six layers.


• MULTICS system is
structured as several
concentric layers (rings).

19
THE” OS

Operator (Console Key Board)

User Programs

Buffers of I/O Data Streams

Console Message handler

Memory Handler

Processor Allocation and process Synchronization

Hardware

20
The Kernel Based
Approach:
• Suggested by Brianch Hansen.
• Kernel (Nucleus) is a collection of
primitive facilities over which the rest
of the OS is built using the
functionalities provided by the kernel.
• Kernel Supports only mechanisms.
• The policies and optimization are left
to the designer.
• According to Hansen, Kernel contains:
Dynamic creation and control of
processes and communications
among them.
• Example : Hydra, Kernel of an OS for
C.mmp, a Multiprocessor system
developed at CMU.

21
The Virtual Machine
approach:
• In this approach, a virtual machine software
layer on the bare hardware of the machine
gives the illusion that all machine hardware
(i.e. processor, main memory, secondary
storage) is at the sole disposal of each user.
• A user can execute the entire instruction set
including the privileged instruction.
• The VM software creates this illusion by
appropriately time-multiplexing the system
resources among all the users of the machine.
• A user can also run a single-user OS n this
virtual machine.
• Different OS can run on different virtual
machines.
• Exp: VM/370 on IBM 370.
• In the IBM 370 system, users traditionally run
the CMS (Conversational Monitor System)
OS , which is a single-user, interactive OS.

22

You might also like