1 Chapter 1

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 38

1

Operating
Systems
1.0
INTRODUCTION TO OPERATING SYSTEM
Introduction
The chapter contents

 Understand what is operating system.


List the Function of an operating system.
 discuss the history of operating system
 Discuss the services of operating system.

1.1
A computer is a system composed of two major
components: hardware and software. Computer
hardware is the physical equipment. Software is the
collection of programs that allows the hardware to do its
job. Computer software is divided into two broad
categories: the operating system and application
programs (Figure 1.1). Application programs use the
computer hardware to solve users’ problems. The
operating system, on the other hand, controls the access
to hardware by users.

1.2
What is an Operating System (1)?

• A modern computer consists of:


 One or more processors
 Main memory
 Disks
 Printer, keyboard,network interface
 Various input/output devices.
• Managing all these varied components
requires a layer of software – the
Operating System (OS).
4 Sultan S.
INTRODUCTION

An operating system is complex, so it is difficult to


give a simple universal definition. Instead, here are
some common definitions:

 An operating system is an interface between the hardware


of a computer and the user (programs or humans).
 An operating system is a program (or a set of programs)
that facilitates the execution of other programs.
 An operating system acts as a general manager supervising
the activity of each component in the computer system.

1.8
i
An operating system is an interface between the
hardware of a computer and the user
(programs or humans)
that facilitates the execution of other programs
and the access to hardware and software resources.

Two major design goals of an operating system are:


❑ Efficient use of hardware.
❑ Ease of use of resources.

7.6
Operating system goals:
 Simplify the execution of user programs and
make solving user problems easier.
 Make the computer hardware to use efficiently.
 Make application software portable and versatile.
 Provide isolation, security and protection among
user programs.
 Improve overall system reliability
 error confinement, fault tolerance, reconfiguration.

OS 7
Why should study Operating
Systems?
 Need to understand interaction between the hardware
and applications
 New applications, new hardware..
 Inherent aspect of society today
 Need to understand basic principles in the design of
computer systems
 efficient resource management, security, flexibility
 Increasing need for specialized operating systems
 e.g. embedded operating systems for devices - cell phones,
sensors and controllers
 real-time operating systems – vehicles, aircraft control,
multimedia services
OS 8
Computer System
Components
 Hardware
 Provides basic computing resources (CPU, memory, I/O devices).

 Operating System
 Controls and coordinates the use of hardware among application programs.

 Application Programs
 Solve computing problems of users (compilers, database systems, video games,
business programs such as banking software).

 Users
 People, machines, other computers

OS 9
What are the functions of the operating system?

 Memory Management
 Processor Management
 Device Management
 File Management
 Security
 Control over system performance
 Job accounting
 Error detecting aids
 Coordination between other software and users
OS 10
EVOLUTION/history of OS

Operating systems have gone through a long history of


evolution, which we summarize here.

Batch systems
Batch operating systems were designed in the 1950.
At that time, computers were large machines that used
punched cards for input, line printers for output and tape
drives for secondary storage media.
Each program to be executed was called a job. A
programmer who wished to execute a job sends a request to
the operating system.
7.11
Early Systems - Bare Machine
(1950s)
Hardware – expensive ; Human – cheap
 Structure
 Large machines run from console
 Single user system
• Programmer/User as operator
 Paper tape or punched cards
 Early software From John Ousterhout slides
 Assemblers, compilers, linkers, loaders, device drivers, libraries of
common subroutines.
 Secure execution
 Inefficient use of expensive resources
 Low CPU utilization, high setup time.

OS 12
Simple Batch Systems - Second Generation.

 Use an operator
 Add a card reader
 Reduce setup time by batching similar jobs
 Automatic job sequencing
 Resident monitor
 initial control in monitor
 control transfers to job
 when job completes control transfers back to monitor

OS 13
Problems:

 1. How does the monitor know about the nature


of the job or which program to execute?
2. How does the monitor distinguish
a) job from job?
b) data from program?
Solution: introduce control cards
 Special cards that tell the resident monitor which
programs to run.

Principles of Operating Systems -


Lecture 1 14
Parts of resident monitor

 Control card interpreter - responsible for reading and


carrying out instructions on the cards.
 Loader - loads systems programs and applications
programs into memory.
 Device drivers - know special characteristics and
properties for each of the system's I/O devices
 Problem: Slow Performance - since I/O and CPU could
not overlap, and card reader very slow.

Principles of Operating Systems -


Lecture 1 15
Solution:
 Off-line operation - speed up computation by loading
jobs into memory from tapes and card reading and line
printing done off-line using smaller machines.
 Advantage of off-line operation - main computer not
constrained by the speed of the card readers and line
printers, but only by the speed of faster magnetic tape
units.
• No changes need to be made to the application
programs
• Real gain - possibility of using multiple reader to-tape
and tape-to-printer systems
for one CPU.

Principles of Operating Systems -


Lecture 1 16
Spooling
 overlap the I/O of one job with the computation of
another job
 While executing one job, the operating system:
reads the next job from the card reader into a
storage area on the disk (job
queue).
 outputs the printout of previous job from disk to the
line printer.
• Job pool - data structure that allows the operating
system to select which job to
run next, in order to increase CPU utilization.

Principles of Operating Systems -


Lecture 1 17
Multiprogramming Third Generation

 Several jobs are kept in main memory at the same


time, and the CPU is shared
between them. Each job is called a process.
 Use interrupts to run multiple programs
simultaneously.
 Requires secure memory, I/O for each program.
 Requires intervention if program loops indefinitely.
 Requires CPU scheduling to choose the next job to
run.

OS 18
OS Features Needed for Multiprogramming

 I/O routine supplied by the system.


• Memory management - the system must
allocate the memory to several jobs.
• CPU scheduling - the system must choose
among several jobs ready to run
 Allocation of devices

Principles of Operating Systems -


Lecture 1 19
Time-sharing systems
Multiprogramming brought the idea of time sharing:
resources could be shared between different jobs, with each
job being allocated a portion of time to use a resource.
Because a computer is much faster than a human, time
sharing is hidden from the user—each user has the
impression that the whole system is serving them
exclusively.
On-line file system must be available for users to
access data and code

7.20
Personal systems Fourth Generation
Personal computers; single user
I/O devices
User convenience and responsiveness
Can adopt technology developed for larger operating
systems
Parallel systems
The need for more speed and efficiency led to the design of
parallel systems: multiple CPUs on the same machine. Each
CPU can be used to serve one program or a part of a
program, which means that many tasks can be accomplished
in parallel instead of serially. The operating systems required
for this are more complex than those that support single
CPUs.
7.21
Parallel

 Tightly coupled system - processors share


memory and a clock; communication usually
takes place through the shared memory.
 Advantages of parallel systems:
o Increased throughput
o Economical
o Increased reliability

7.22
Symmetric multiprocessing
 Each processor runs an identical copy of the
operating system.
 Many processes can run at once without
performance deterioration
 Asymmetric multiprocessing
 Each processor is assigned a specific task;
master processor schedules and
allocates work to slave processors.
 More common in extremely large systems

7.23
Parallel Computing Systems
ILLIAC 2 (UIllinois)
Climate modeling,
earthquake
simulations, genome
analysis, protein
folding, nuclear fusion
research, ….. K-computer(Japan)

Tianhe-1(China)

IBM Blue Gene

Connection Machine (MIT)


Principles of Operating Systems -
Lecture 1 24
Distributed systems
A job that was previously done on one computer can now be
shared between computers that may be thousands of miles
apart.
Distributed systems combine features of the previous
generation with new duties such as controlling security.

Real-time systems
A real-time system is expected to do a task within a specific
time constraint. They are used with real-time applications,
which monitor, respond to or control external processes or
environments.

7.25
Distributed Systems
Hardware – very cheap ; Human – very expensive
 Distribute computation among many processors.
 Loosely coupled -
• no shared memory, various communication lines
 client/server architectures
 Advantages:
• resource sharing
• computation speed-up
• reliability
• communication - e.g. email
 Applications - digital libraries, digital multimedia

Principles of Operating Systems -


Lecture 1 26
Distributed Computing Systems
Globus Grid Computing Toolkit Cloud Computing Offerings

PlanetLab Gnutella
Principles of Operating Systems - P2P Network
Lecture 1 27
Real-time systems
 Correct system function depends on timeliness
 • Well-defined fixed-time constraints.
• OS must be able to respond very quickly.
 Soft real-time systems -
 Less accurate if response time is too long.
 Useful in applications such as multimedia, virtual reality.

Principles of Operating Systems -


Lecture 1 28
Operating System Services

 An Operating System provides services to both


the users and to the programs.
 It provides programs, an environment to
execute.
 It provides users, services to execute the
programs in a convenient manner

Principles of Operating Systems -


Lecture 1 29
The following are few common services
provided by operating systems

  Program execution
 I/O operations
 File System manipulation
 Communication
 Error Detection
 Resource Allocation
 Protection

Principles of Operating Systems -


Lecture 1 30
Operating System Properties

 Batch processing: is a technique in which


Operating System collects one programs and
data together in a batch before processing starts

Principles of Operating Systems -


Lecture 1 31
Advantages
 Batch processing takes much of the work of the
operator to the computer.
  Increased performance as a new job gets started
as soon as the previous job finished
without any manual intervention.
Disadvantages
 Difficult to debug program.
 A job could enter an infinite loop.
 Due to lack of protection scheme, one batch job
can affect pending jobs.

Principles of Operating Systems -


Lecture 1 32
Multitasking

 Multi-tasking refers to term where multiple jobs


are executed by the CPU simultaneously by
switching between them

Principles of Operating Systems -


Lecture 1 33
Advantages
 High and efficient CPU utilization.
 User feels that many programs are allotted CPU
almost simultaneously
Disadvantages
 CPU scheduling is required.
 To accommodate many jobs in memory, memory
management is required.

Principles of Operating Systems -


Lecture 1 34
Interactivity
 Interactivity refers that a User is capable to interact
with computer system
 OS provides user an interface to interact with
system.
 OS managers input devices to take inputs from
the user. For example, keyboard.
 OS manages output devices to show outputs to
the user. For example, Monitor.
 OS Response time needs to be short since the
user submits and waits for the result
Principles of Operating Systems -
Lecture 1 35
Real Time System
 Real time systems represents are usually dedicated
embedded systems
 In such systems, Operating Systems typically
read from and react to sensor data.
 The Operating system must guarantee
response to events within fixed periods of time
to ensure correct performance

Principles of Operating Systems -


Lecture 1 36
Distributed Environment

 Distributed environment refers to multiple


independent CPUs or processors in a computer
system
 The processors do not share memory or a clock.
 Instead, each processor has its own local memory.
 OS manages the communications between the
processors. They communicate with each other
through various communication lines.

OS 37
Thank you
End of chapter1

OS 38

You might also like