You are on page 1of 37

Chapter 1: Introduction

What is an Operating System?


What are the components of an OS?
What does an OS do?
Short History of OSs
Different types of OSs

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction

Slide 1
What is an Operating System?

A program that acts as a bridge between a user of a


computer and the computer hardware.

Operating system goals:


 Execute user programs and make solving user problems
easier.
 Make the computer system convenient to use.

Use the computer hardware in an efficient manner.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 2


Computer System Components
1. Hardware – provides basic computing resources
(CPU, memory, I/O devices).
2. Operating system – controls and coordinates the
use of the hardware among the various application
programs for the various users.
3. Applications programs – define the ways in which
the system resources are used to solve the
computing problems of the users (compilers,
database systems, video games, business programs).
4. Users - (people, machines, other computers).

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 3


Abstract View of System Components

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 4


Structure of Operating System:
User

Application Programs

System Programs

HARDWARE

(Contd…)
Functions/Role of an OS
User Environment - OS layer transforms bare
hardware machine into higher level abstractions
 Execution environment - process management, file
manipulation, interrupt handling, I/O operations, language.
 Error detection and handling
 Protection and security
 Fault tolerance and failure recovery(Remove problems)
 Government(It makes the environment for all the devices
to work together)
 Resource Allocator(Specific request to Specific resource)
 Control Program

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 6


Functions of an OS
Resource Management
 Time management
 CPU and disk transfer scheduling
 Space management
 main and secondary storage allocation
 Synchronization and deadlock handling
 critical selection, coordination
 Accounting and status information
 resource usage tracking, usage of CPU

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 7


Mainframe Systems
First computers used to solve many commercial and
scientific applications
Reduce setup time by batching similar jobs
 serial card readers were initial input device then disks enabled job
scheduling by the operating system
Automatic job sequencing – automatically transfers control
from one job to another.
Early OS called resident monitor

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 8


Simple Batch System
multiple programs batched together and submitted by an
operator.
The user submit the job on cards or tapes to a program
operator, who batches the jobs together sequentially and
places the entire batch on an input device, for use by the
monitor (program).
Processor time was wasted.
Disk was introduced, which was faster then cards.
Job Scheduling

Slide 9
Example card deck of a Job

A. Frank - P. Weisberg
Uniprogramming (single tasking) Systems

I/O devices very slow


Batch Processing:
In Batch processing same type of jobs batch (BATCH- a
set of jobs with similar needs) together and execute at a
time.
The OS was simple, its major task was to transfer control
from one job to the next.
The job was submitted to the computer operator in form
of punch cards. At some later time the output appeared.
The OS was always resident in memory. (Ref. Fig. next
slide)
Common Input devices were card readers and tape
drives.
Batch Processing (Contd…):
Common output devices were line printers, tape drives,
and card punches.
Users did not interact directly with the computer
systems, but he prepared a job (comprising of the
program, the data, & some control information).
OS

User
progra
m area
Multiprogramming:
Multiprogramming is a technique to execute number of
programs simultaneously by a single processor.
In Multiprogramming, number of processes reside in
main memory at a time.
The OS picks and begins to executes one of the jobs in
the main memory.
If any I/O wait happened in a process, then CPU
switches from that job to another job.
Hence CPU in not idle at any time.
Multiprogramming (Contd…):
OS •Figure dipicts the layout of
multiprogramming system.
Job 1
• The main memory consists of 5
Job 2 jobs at a time, the CPU executes
one by one.
Job 3
Advantages:
Job 4 •Efficient memory utilization
•Throughput increases
Job 5
•CPU is never idle, so performance
increases.
Multiprogramming

A. Frank - P. Weisberg
Time Sharing Systems:
Time sharing, or multitasking, is a logical extension of
multiprogramming.
Multiple jobs are executed by switching the CPU between
them.
In this, the CPU time is shared by different processes, so
it is called as “Time sharing Systems”.
Time slice is defined by the OS, for sharing CPU time
between processes.
CPU scheduling is used
Examples: linex, Unix, etc.,
Desktop(Personal) Systems
Personal computers – computer system dedicated to a
single user.
I/O devices – keyboards, mouse, display screens, small
printers.
User convenience and responsiveness.
Can adopt technology developed for larger operating
systems. Often individuals have sole use of computer and do
not need advanced CPU utilization of protection features.
May run several different types of operating systems
(Windows, MacOS, UNIX, Linux)

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 18


Multi Processor/Parallel Systems
Multiprocessor systems with more than one CPU in close
communication which work on a single task simultaneously.
It is also called as Tightly coupled system .They share
common system clock and data structure.
Advantages of parallel system:
 Increased throughput with more processors
 Economical – share peripherals, mass storage, power etc. as
opposed to individual PCs
 Increased reliability
 graceful degradation / fault tolerant
 failure of one processor will slow down but not halt the system
 other processors pick up the slack

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 19


Types of Multi processors(Cont.)
Symmetric multiprocessing (SMP)
 A method in which multiple processors work together on
the same task is called SMP.
 Many processes can run at once without performance
deterioration.
 Most modern operating systems support SMP

Asymmetric multiprocessing(AMP)
 Each processor is assigned a specific task; controlling
processor schedules and allocates work to other
processors.
 More common in extremely large systems

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 20


Distributed Systems
Distribute the computation among several physical
processors.
Loosely coupled system – each processor has its own local
memory; processors communicate with one another
through various communications lines, such as high-speed
buses.
Advantages of distributed systems.
 Resource sharing
 Computation speed up – load sharing
 Reliability
 Communications between processors and processes

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 21


Clustered Systems

A clustered systems uses multiple CPU’s to


accomplish a task. It is different from parallel
system in that clustered systems consists of two or
more individual systems coupled together. They are
linked through LAN. They perform monitoring and
running. It has two types
Asymetric Clustering :(One monitors and other runs
application)
Symetric Clustering:(Both monitor and both runs)

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 22


Real-Time Systems
A real time system is a that system which ensures the exact time
of a job. If a real time system does not complete a task in a
certain time ,it may cause a break down of the entire system
running.e.g Industrial control system, airplane guidance etc.
Often used as a control device in a dedicated application such as
medical imaging systems, industrial control systems, and some
display systems.
Hard real-time:
It guaranties that a job will complete within a specified time
period. This system must ensure that all delays' on processing,
input and output are bounded. The system can not wait
indefinitely so the hard time systems are usually very limited.
Auto pilot system.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 23


Soft real-time

 Limited utility in industrial control of robotics


 It is much less real restrictive version of a hard real time
system. It does not guarantee that a job will complete in a
fix time. However it tries its best to complete the job on
time. It works on priority system.
 Useful in applications (multimedia, virtual reality)
requiring advanced operating-system features.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 24


Handheld Systems
Personal Digital Assistants (PDAs)
Cellular telephones
I pad
IPods'
Issues:
 Limited memory (512KB to 8MB) requires efficient
management
 Slow processors
 Small display screens.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 25


Interrupt : A change in execution caused by an
external event
Definition: an event external to the currently
executing process that causes a change in the normal
flow of instruction execution;
Usually generated by hardware devices external to the
CPU
Typically indicate that some device needs service

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 26


Interrupts

Program

time t

27
Interrupts

Interrupt

Program Program
Interrupt Service Routine

time t

28
Classes of Interrupts
Supervisor call interrupt
I/O call interrupt/External
Restart interrupt
Program Check interrupt
Machine check Interrupt.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 29


O.S MODE
A processor in a computer running Windows has two
different modes: user mode and kernel mode. The
processor switches between the two modes
depending on what type of code is running on the
processor. Applications run in user mode, and core
operating system components run in kernel mode.
Many drivers run in kernel mode, but some drivers
run in user mode. When you start a user-mode
application, Windows creates a process for the
application

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 30


OPERATING SYSTEM COMPONENTS
Process management: A program in execution is called
process. The following activities are connected with
process management.
1) Process Creation
2) Process deletion
3) Process Suspension
4) Process Resumption

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 31


Main Memory Management: It includes
1. Virtual memory
2. Paging(Swapping)
3. Thrashing( Wasting of time in swapping)
4. Keeping record of which memory is free and being
used.
5. De allocating memory space as needed.
 Secondary Storage Management:
1. Free space management
2. Storage Allocation
3. Disk Scheduling

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 32


I/O System management:
1. Buffering
2. General Device Driver
3. Specific Device Driver
 File management:
1) File Creation
2) File deletion
3) File Suspension
4) File Resumption

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 33


• Protection System:
If a computer has multiple users and allows
concurrent execution of multiple processes, the
processes must be protected from each other
activities. It must
a. Distinguish between authorized and unauthorized
usage.
b. Specify the controls that are to be imposed.
c. Provide a means of enforcement.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 34


KERNEL
The kernel's primary function is to
manage the computer's hardware and
resources and allow other programs to
run and use these resources.
In computing, the kernel is
a computer program that
manages input/output requests
from software and translates them
into data processinginstructions for
the central processing unit and
other electronic components of
a computer.
Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 35
The kernel is a fundamental part of a modern
computer's operating system
When a computer program (in this case called
a process) makes requests of the kernel, the request
is called a system call.

Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 36


Silberschatz / OS Concepts / 6e - Chapter 1 Introduction Slide 37

You might also like