Nothing Special   »   [go: up one dir, main page]

Unit 1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 54

OPERATING SYSTEMS

By: Dr. Archana Saxena


What is an Operating System?
• A program that acts as an intermediary between a user of
a computer and the computer hardware.
• An operating System is a collection of system programs
that together control the operations of a computer
system.
• An operating system is a software that manages the
computer hardware. The hardware must provide
appropriate mechanisms to ensure the correct operation
of the computer system and to prevent user programs
from interfering with the proper operation of the system.
• Some examples of operating systems are UNIX, Mach,
MS-DOS, MS-Windows, Windows/NT, Chicago, OS/2,
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.
Functions of Operating System
Operating system performs three functions:
1. Convenience: An OS makes a computer more convenient
to use.
2. Efficiency: An OS allows the computer system resources
to
be used in an efficient manner.
3. Ability to Evolve: An OS should be constructed in such a
way as to permit the effective development, testing and
introduction of new system functions without at the same
time interfering with service.
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).
Abstract View of System Components
Operating System as User Interface

Conceptual view of a computer system


I/O SYSTEM MANAGEMENT
I/O System Management
• The module that keeps track of the status of devices is
called the I/O traffic controller. Each I/O device has a device
handler that resides in a separate process associated with
that device.
• The I/O subsystem consists of
1. A memory management component that includes
buffering, caching and spooling.
2. A general device driver interface.
Drivers for specific hardware devices.
ASSEMBLER
Input to an assembler is an assembly language
program.
Output is an object program plus information that
enables the loader to prepare the object program for
execution. At one time, the computer programmer
had at his disposal a basic machine that interpreted,
through hardware, certain fundamental instructions.
He would program this computer by writing a series
of ones and zeros(machine language), place them into
the memory of the machine.
COMPILER
A compilers is a program that accepts a source
program in a “high-level language” and produces
a corresponding object program. An interpreter
is a program that appears to execute a source
program as if it was machine language. The
same name (FORTRAN, COBOL etc) is often used
to designate both a compiler and its associated
language.
LOADER
A loader is a routine that loads an object program and
prepares it for execution. There are various loading schemes:
absolute, relocating and direct-linking. In general, the loader
must load, relocate, and link the object program. Loader is a
program that places programs into memory and prepares
them for execution. In a simple loading scheme, the assembler
outputs the machine language translation of a program on a
secondary device and a loader is placed in core. The loader
places into memory the machine language version of the
user’s program and transfers control to it. Since the loader
program is much smaller than the assembler, its makes more
core available to user’s program.
Operating System Definitions
• Resource allocator – manages and allocates
resources.
• Control program – controls the execution of
user programs and operations of I/O devices .
• Kernel – The one program running at all
times (all else being application programs).
Components of OS:
• OS has two parts. (1)Kernel.(2)Shell.
(1)Kernel is an active part of an OS i.e., it is the part
of OS running at all times. It is a programs which
can interact with the hardware. Ex: Device driver,
dll files, system files etc.
(2) Shell is called as the command interpreter. It is a
set of programs used to interact with the
application programs. It is responsible for
execution of instructions given to OS (called
commands).
Operating systems can be explored from
two viewpoints
• User View: From the user’s point view, the OS is
designed for one user to monopolize its
resources, to maximize the work that the user is
performing and for ease of use.
• System View: From the computer's point of view,
an operating system is a control program that
manages the execution of user programs to
prevent errors and improper use of the computer.
It is concerned with the operation and control of
I/O devices.
Functions of Operating System:
Process Management
• A process is a program in execution. A process needs certain
resources, including CPU time, memory, files, and I/O
devices, to accomplish its task.
• The operating system is responsible for the following
activities in connection with process management.
✦ Process creation and deletion.
✦ process suspension and resumption.
✦ Provision of mechanisms for:
• process synchronization
• process communication
Cont..
Main-Memory Management
• Memory is a large array of words or bytes, each with its own address.
It is a repository of quickly accessible data shared by the CPU and I/O
devices.
• Main memory is a volatile storage device. It loses its contents in the
case of system failure.
• The operating system is responsible for the following activities in
connections with memory management:
♦ Keep track of which parts of memory are currently being used and by
whom.
♦ Decide which processes to load when memory space becomes
available.
♦ Allocate and de-allocate memory space as needed.
cont..
File Management
• A file is a collection of related information defined by its
creator. Commonly, files represent programs (both source and
object forms) and data.
• The operating system is responsible for the following activities
in connections with file management:
✦ File creation and deletion.
✦ Directory creation and deletion.
✦ Support of primitives for manipulating files and directories.
✦ Mapping files onto secondary storage.
✦ File backup on stable (nonvolatile) storage media.
Cont..
I/O System Management
The I/O system consists of:
✦ A buffer-caching system
✦ A general device-driver interface
✦ Drivers for specific hardware devices
Cont..
Secondary-Storage Management
• Since main memory (primary storage) is volatile and too small
to accommodate all data and programs permanently, the
computer system must provide secondary storage to back up
main memory.
• Most modern computer systems use disks as the principle on-
line storage medium, for both programs and data.
• The operating system is responsible for the following activities
in connection with disk management:
✦ Free space management
✦ Storage allocation
✦ Disk scheduling
Cont..
Networking (Distributed Systems)
♦ A distributed system is a collection processors that do not share
memory or a clock. Each processor has its own local memory.
♦ The processors in the system are connected through a
communication network.
♦ Communication takes place using a protocol.
♦ A distributed system provides user access to various system
resources.
♦ Access to a shared resource allows:
✦ Computation speed-up
✦ Increased data availability
✦ Enhanced reliability
History of Operating System
Operating System Services

An operating system provides services to


programs and to the users of those programs.
It provided by one environment for the
execution of programs. The services provided
by one operating system is difficult than other
operating system. Operating system makes the
programming task easier.
Cont..

1. Program execution
2. I/O operation
3. File system manipulation
4. Communications
5. Error detection
Cont..

1. Program execution: Operating system loads a


program into memory and executes the
program. The program must be able to end its
execution, either normally or abnormally.
2. I/O Operation : I/O means any file or any
specific I/O device. Program may require any
I/O device while running. So operating system
must provide the required I/O.
Cont..

3. File system manipulation : Program needs to read a file or


write a file. The operating system gives the permission to
the program for operation on file.
4. Communication : Data transfer between two processes is
required for some time. The both processes are on the
one computer or on different computer but connected
through computer network. Communication may be
implemented by two methods:
a. Shared memory
b. Message passing.
Cont..

5. Error detection : error may occur in CPU, in


I/O devices or in the memory hardware. The
operating system constantly needs to be
aware of possible errors. It should take the
appropriate action to ensure correct and
consistent computing.
Evolution of OS:
Mainframe Systems
Reduce setup time by batching similar jobs
Automatic job sequencing – automatically
transfers control from one job to another. First
rudimentary operating system. Resident monitor
• initial control in monitor
• control transfers to job
• when job completes control transfers pack to
monitor
Batch System

• Some computer systems only did one thing at a time.


They had a list of the computer system may be
dedicated to a single program until its completion, or
they may be dynamically reassigned among a collection
of active programs in different stages of execution.
• Batch operating system is one where programs and
data are collected together in a batch before processing
starts. A job is predefined sequence of commands,
programs and data that are combined in to a single unit
called job.
Cont..

Memory
management in
batch system is
very simple.
Memory is usually
divided into two
areas : Operating
system and user
program area.
Cont..

• Scheduling is also simple in batch system. Jobs are processed in


the order of submission i.e first come first served fashion.
• When job completed execution, its memory is releases and the
output for the job gets copied into an output spool for later
printing.
• Batch system often provides simple forms of file management.
Access to file is serial. Batch systems do not require any time
critical device management.
• Batch systems are inconvenient for users because users can not
interact with their jobs to fix problems. There may also be long
turn around times. Example of this system id generating
monthly bank statement.
Advantages of Batch System

• Move much of the work of the operator to the


computer.
• Increased performance since it was possible
for job to start as soon as the previous job
finished.
Disadvantages of Batch System

• Turn around time can be large from user


standpoint.
• Difficult to debug program.
• A job could enter an infinite loop.
• A job could corrupt the monitor, thus affecting
pending jobs.
• Due to lack of protection scheme, one batch job
can affect pending jobs.
Multiprogramming

• When two or more programs are in memory


at the same time, sharing the processor is
referred to the multiprogramming operating
system. Multiprogramming assumes a single
processor that is being shared. It increases
CPU utilization by organizing jobs so that the
CPU always has one to execute.
Cont..
Cont..

• The operating system keeps several jobs in memory


at a time. This set of jobs is a subset of the jobs kept
in the job pool. The operating system picks and
begins to execute one of the job in the memory.
• Multiprogrammed system provide an environment
in which the various system resources are utilized
effectively, but they do not provide for user
interaction with the computer system.
Cont..

• Jobs entering into the system are kept into the


memory. Operating system picks the job and begins
to execute one of the job in the memory. Having
several programs in memory at the same time
requires some form of memory management.
• Multiprogramming operating system monitors the
state of all active programs and system resources.
This ensures that the CPU is never idle unless there
are no jobs.
Cont..
• Advantages
1. High CPU utilization.
2. It appears that many programs are allotted CPU
almost simultaneously.

• Disadvantages
1. CPU scheduling is requires.
2. To accommodate many jobs in memory, memory
management is required.
Time Sharing Systems

• Multi-programmed batched systems provide an


environment where the various system resources
(for example, CPU, memory, peripheral devices) are
utilized effectively.
• Time sharing, or multitasking, is a logical extension
of multiprogramming. Multiple jobs are executed by
the CPU switching between them, but the switches
occur so frequently that the users may interact with
each program while it is running.
Cont..

• An interactive, or hands-on, computer system


provides on-line communication between the
user and the system. The user gives instructions
to the operating system or to a program directly,
and receives an immediate response. Usually, a
keyboard is used to provide input, and a display
screen (such as a cathode-ray tube (CRT) or
monitor) is used to provide output.
Cont..

• A time-shared operating system allows the many users to share


the computer simultaneously. Since each action or command in
a time-shared system tends to be short, only a little CPU time is
needed for each user. As the system switches rapidly from one
user to the next, each user is given the impression that she has
her own computer, whereas actually one computer is being
shared among many users.
• Time-sharing operating systems are even more complex than are
multi-programmed operating systems. As in multiprogramming,
several jobs must be kept simultaneously in memory, which
requires some form of memory management and protection.
Cont..
Advantages of Timesharing operating systems are following
• Provide advantage of quick response.
• Avoids duplication of software.
• Reduces CPU idle time.
Disadvantages of Timesharing operating systems are
following.
• Problem of reliability.
• Question of security and integrity of user programs and
data.
• Problem of data communication.
Distributed operating System
• Distributed systems use multiple central processors to
serve multiple real time application and multiple users.
Data processing jobs are distributed among the
processors accordingly to which one can perform each job
most efficiently.
• The processors communicate with one another through
various communication lines (such as high-speed buses or
telephone lines). These are referred as loosely coupled
systems or distributed systems. Processors in a distributed
system may vary in size and function. These processors
are referred as sites, nodes, and computers and so on.
Cont..
The advantages of distributed systems are following.
• With resource sharing facility user at one site may be
able to use the resources available at another.
• Speedup the exchange of data with one another via
electronic mail.
• If one site fails in a distributed system, the remaining
sites can potentially continue operating.
• Better service to the customers.
• Reduction of the load on the host computer.
• Reduction of delays in data processing.
Cont..
• It can be classified into two categories:
• 1. Client-Server systems
• 2. Peer-to-Peer systems
Network operating System
• Network Operating System runs on a server and and
provides server the capability to manage data, users,
groups, security, applications, and other networking
functions. The primary purpose of the network
operating system is to allow shared file and printer
access among multiple computers in a network,
typically a local area network (LAN), a private network
or to other networks. Examples of network operating
systems are Microsoft Windows Server 2003, Microsoft
Windows Server 2008, UNIX, Linux, Mac OS X, Novell
NetWare, and BSD.
Cont..
The advantages of network operating systems are following.
• Centralized servers are highly stable.
• Security is server managed.
• Upgrades to new technologies and hardware can be easily
integrated into the system.
• Remote access to servers is possible from different locations
and types of systems.
The disadvantages of network operating systems are following.
• High cost of buying and running a server.
• Dependency on a central location for most operations.
• Regular maintenance and updates are required.
Real Time operating System
• Real time system is defines as a data processing system in which the
time interval required to process and respond to inputs is so small
that it controls the environment. Real time processing is always on
line whereas on line system need not be real time. The time taken
by the system to respond to an input and display of required
updated information is termed as response time. So in this method
response time is very less as compared to the online processing.
• Real-time systems are used when there are rigid time requirements
on the operation of a processor or the flow of data and real-time
systems can be used as a control device in a dedicated application.
Real-time operating system has well-defined, fixed time constraints
otherwise system will fail. For example Scientific experiments,
medical imaging systems, industrial control systems, weapon
systems, robots, and home-appliance controllers, Air traffic control
system etc.
Cont..
• There are two types of real-time operating systems.
Hard real-time systems
• Hard real-time systems guarantee that critical tasks
complete on time. In hard real-time systems secondary
storage is limited or missing with data stored in ROM. In
these systems virtual memory is almost never found.
Soft real-time systems
• Soft real time systems are less restrictive. Critical real-time
task gets priority over other tasks and retains the priority
until it completes. Soft real-time systems have limited utility
than hard real-time systems. For example, Multimedia,
virtual reality, Advanced Scientific Projects like undersea
exploration and planetary rovers etc.
Multiprocessor Operating Systems
• Multiprocessor operating systems are also
known as parallel OS or tightly coupled OS.
Such operating systems have more than one
processor in close communication that sharing
the computer bus, the clock and sometimes
memory and peripheral devices.
• It executes multiple jobs at same time and
makes the processing faster.
Multiprocessor systems have three main advantages:

• Increased throughput: By increasing the number of


processors, the system performs more work in less time.
The speed-up ratio with N processors is less than N.
• Economy of scale: Multiprocessor systems can save more
money than multiple single-processor systems, because
they can share peripherals, mass storage, and power
supplies.
• Increased reliability: If one processor fails to done its
task, then each of the remaining processors must pick up
a share of the work of the failed processor. The failure of
one processor will not halt the system, only slow it down
Cont..
The multiprocessor operating systems are classified into two
categories:
1. Symmetric multiprocessing system
2. Asymmetric multiprocessing system
• In symmetric multiprocessing system, each processor runs an
identical copy of the operating system, and these copies
communicate with one another as needed.
• In asymmetric multiprocessing system, a processor is called
master processor that controls other processors called slave
processor. Thus, it establishes master-slave relationship. The
master processor schedules the jobs and manages the memory
for entire system.
Desktop Systems/Personal Computer
Systems
• The PC operating system is designed for maximizing user
convenience and responsiveness. This system is neither
multi-user nor multitasking.
• These systems include PCs running Microsoft Windows
and the Apple Macintosh. The MS-DOS operating system
from Microsoft has been superseded by multiple flavors of
Microsoft Windows and IBM has upgraded MS-DOS to the
OS/2 multitasking system.
• The Apple Macintosh operating system has been ported to
more advanced hardware, and now includes new features
such as virtual memory and multitasking.
References
• 1.
https://en.wikipedia.org/wiki/Operating_syste
m
• 2.
https://www.webopedia.com/TERM/O/opera
ting_system.html
• 3. Book Abraham Silberschatz, Galvin
Thank You

You might also like