Os Ch1 Operating System Overview PDF

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

CHAPTER 1:

OPERATING SYSTEM
OVERVIEW
TCS2073: OPERATING SYSTEM
INTRODUCTION
An operating system Software that
manages the computer hardware.
The hardware must provide appropriate
mechanisms:
to ensure the correct operation of the
computer system
to prevent user from interfering with the
proper operation of the system
Operating System Definition

Operating System
A program that manages a
computers hardware

A program that provides a


basis for application
programs

Acts as an intermediary
between the computer user
and the computer hardware
OPERATING SYSTEM GOALS

Efficient use
Ensure efficient use of a
computers resources.

User convenience
Provide convenient methods of
using a computer system.

Non-interference
Prevent interference in the
activities of its users.
OPERATING SYSTEM VIEW
The operating system provides the means for
proper use of the resources in the operation of
the computer system.
It similar to a government
performs no useful function by itself
provides an environment within which other
programs can do useful work.
Two viewpoints: user view and system view.
User View
According to the interface being used - a
monitor, keyboard, mouse, and system unit.
Such a system is designed to monopolize its
resources - to maximize the performed works.
System View

Resource allocator Control program

OS acts as the Manages the


manager of the execution of user
resources. programs to prevent
Decide how to errors and improper
allocate them to use of the computer.
specific programs Concerned with the
and users. operation and
control of I/O
devices.
HISTORICAL DEVELOPMENT OF
COMPUTER SYSTEMS
Early computer system (late 1940s to the mid-1950s)
Programmer interacted directly with the computer
hardware.
Run from a console consisting of display lights,
toggle switches, some form of input device, and a
printer.
Programs in machine code were loaded via the
input device.
If an error halted the program, the error condition
was indicated by the lights.
If the program proceeded to a normal completion,
the output appeared on the printer.
Known as serial processing
2 main problems in early computer system:

Scheduling

Most installations used a hardcopy sign-up sheet


to reserve computer time time consumption,
wasted computer processing time.
Other problems: the user might run into problems,
not finish in the allotted time, and be forced to
stop before resolving the problem.
Setup time

A single program (job) could involve:


loading the compiler with source program into
memory
saving the compiled program
loading and linking together the object
program and common functions.
Each of these steps could involve mounting or
dismounting tapes or setting up card decks.
If an error occurred go back to the beginning
of the setup sequence.
Over time, various system software tools were
developed:
Libraries of common functions
Linkers
Loaders
Debuggers
I/O driver routines
Computer System Types

Simple Batch

Multi-programmed batch

Time Sharing

Personal Computer

Distributed

Real- Time

Handheld
Simple Batch System
Idea : batch together jobs with similar needs.
Why?
To improve the weakness of serial programming
As a solution of serial programming, it will:
Hire machine or computer operator
Operator starts the next job after one job has
finished.
User/programmer provides cards or tape were
needed and also short description of the job.
Batch the similar needed job
Run through the computer as a group
Saving operator time.
2 main problems in simple batch system
When a scheduled job stopped the operator
should examined the cause of the problem or
why the program stopped - it will load
appropriate device with the next job and restart
the computer.
CPU at this time will sit idle. Solution:
Use of a software known as the resident monitor
- controls the sequence of events.
Programmers develop automatic jobs
sequencing for automatically transferring
control from one job to one.
The resident monitor always be in main
memory and available for execution.
Process flow of resident monitor:

The monitor reads in jobs one at a time from the input device

The current job is placed in the user program area, and


control is passed to this job.

Returns control to the monitor, which immediately reads in


the next job

The results of each job are sent to an output device for


delivery to the user
Processor time alternates between execution
of user programs and execution of the monitor.
2 sacrifices:
Some main memory is now given over to the
monitor
Some processor time is consumed by the
monitor.
Both of these are forms of overhead but it
improves utilization of the computer.
Multi-Programming Batch Systems
Problem still exist: the processor is often idle.
I/O devices are slow compared to the processor.
The processor spends a certain amount of time
executing, until it reaches an I/O instruction.
Solution: multiprogramming, or multitasking the
central theme of modern operating systems.
Multiprogramming increases CPU utilization by
organizing jobs so that the CPU always has one to
execute.
OS keeps several jobs in memory simultaneously.
To have several jobs ready to run, they must be
kept in main memory.
Since main memory is too small, the jobs are kept
on the disk in the job pool.
Job pool consists of all processes residing on disk
awaiting allocation of main memory.
OS picks and begins to execute one of the jobs in
memory.
OS switches to, and executes, another job.
When the job needs to wait, the CPU switches to
another job, and so on.
Eventually, the first job finishes waiting and gets the
CPU back.
CPU is never idle.
Multiprogramming System Simulation
End
Execution
Operating
System
Area
P1 P1 CPU
P3
P5
P8

I/O
Memory Operation
management
End
Execution
Operating
System
Area
P1 P3 CPU
P3
P5
P8
P1

I/O
Memory Operation
management
End
Execution
Operating
System P3
Area
P1 P8 CPU
P3
P5
P8
P1
I/O
Memory On Operation
management completion
End
Execution
Operating
System P8
Area
P1 P1 CPU
P3
P5
P8

I/O
Memory On Operation
management completion
End
Execution
Operating
System P1
Area
P1 CPU
P3
P5
P8

I/O
Memory On Operation
management completion
Time Sharing System

Time sharing a logical extension of


multiprogramming.
CPU executes multiple jobs by switching among
them, but the switches occur so frequently that the
users can interact with each program while it is
running.
Time sharing requires an interactive computer
system, which provides direct communication
between the user and the system.
The user gives instructions to OS directly, using an
input device and waits for immediate results on an
output device.
The response time should be short.
A time-shared OS allows many users to share the
computer simultaneously.
A time-shared operating system uses CPU
scheduling and multiprogramming to provide each
user with a small portion of a time-shared
computer.
A program loaded into memory and executing is
called a process. When a process executes, it
typically executes for only a short time before it
either finishes or needs to perform I/O.
Problem:
If multiple jobs are in memory, then they must be
protected from interfering with each other by
modifying others data.
With multiple interactive users, the file system
must be protected - only authorized users have
access.
Personal Computer System

Personal computer (PC) a small, relatively


inexpensive computer designed to a single or
individual user.
All are based on the microprocessor technology -
put an entire CPU on one chip.
Personal computers first appeared as
microcomputer - produced in smaller size and less
expensive.
1977 - Apple II introduced by Apple Computer.
1981 - IBM PC introduced by IBM.
Common desktop OS: Microsoft Windows, OS X,
Linux, Solaris and FreeBSD.
Distributed System

Definition:
A collection of processors that do not share memory
or a clock.
Each node has its own local memory and each
nodes communicate with one another through
various networks.
4 major reasons or advantages for building
distributed systems: resource sharing, computation
speedup, reliability, and communication.

Resource Sharing

If a number of different are connected to one


another, then a user at one site may be able
to use the resources available at another.
It provides mechanisms for sharing files at
remote sites, processing information in a
distributed database, printing files at remote
sites, using remote specialized hardware
devices.
Computation Speedup

If a particular site is currently overloaded with


jobs, some of them can be moved to other,
lightly loaded sites.
This movement of jobs is called load sharing or
job migration.

Reliability

If one site fails, the remaining sites can continue


operating, giving the system better reliability.
The failure of a site must be detected by the
system, appropriate action may be needed to
recover from the failure.
Communication

When several sites are connected to one another


by a communication network, users at the
various sites have the opportunity to exchange
information.

Advantage:
The functions can be carried out over great
distances.
Users minimize the limitations inherent in long
distance work.
Better functionality for the cost, more flexibility in
locating resources and expanding facilities, better
user interfaces, and easier maintenance.
Real Time System
Used when rigid time requirements have been
placed on the operation of a processor or the flow
of data.
Often used as a control device in a dedicated
application.
Sensors bring data to the computer.
The computer must analyze the data.
Examples of real-time system:
Control scientific experiments system
Medical imaging systems
Industrial control systems
Automobile-engine fuel-injection systems
Home-appliance controllers
Weapon systems
A real-time system has well-defined, fixed time
constraints.
Processing must be done within the defined
constraints, or the system will fail.
Tt returns the correct result within its time constraints
- respond quickly
Type of real-time system: soft real-time systems and
hard real-time systems.
Soft real-time system
Less restrictive type of real- time system
It doesnt support for deadline scheduling
A critical real- time task gets priority over other
tasks and retains that priority until it completes.
It able to mixed with other types of systems such
as time sharing systems.
Hard real-time system
It has stricter requirements
A task must be completed by its deadline and it
supports deadline scheduling
All the process must be completed within
defined constraints or the system will be
considered fail.
Handheld System

Small, portable devices


Offer users the same features and capabilities as
desktop computers at a fraction of the size.
Size: ranges from credit card to small notebook
computer
Utilize a liquid crystal display (LCD) - acts as an
input and an output device.
Designed to work closely with a desktop computer
or network - synchronizing data to maintain up-to-
date information in both places
Software: Android, iOS, Windows Phone, BlackBerry,
Symbian, Windows Mobile and Palm OS

You might also like