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

10/10/2022

Operating System
• A program that controls the execution of
application programs
Operating System • An interface between applications and hardware
• An interface between applications and hardware

1 2

Operating System Objectives Layers of Computer System


• Convenience
– Makes the computer more convenient to use
– Execute user programs and make solving user problem
easier
• Using graphics user interface like mouse click
• Efficiency
– Allows computer system resources to be used in an
efficient manner
• Printer
• Ability to evolve
– Permit effective development, testing, and introduction of
new system functions without interfering with service

3 4

Computer system structure Components of computer system


• Computer system can be divided into four main
components
– Hardware- provides basic computing resources
• CPU, Memory, I/O devices
– Operating System
• Controls and Coordinates use of hardware among various
applications and users
– Application Programs
• Define the ways in which the system resources are used to solve the
computing problems of the users
– Word processor, compilers, web browsers, data base system, video games
– Users
• People , machines other computers

5 6

1
10/10/2022

What Operating System do What operating system do


• Responsible for managing resources
– Operating system control the hardware and coordinates its • To understand more fully the operating
use among the various applications programs for various
users system’s role, we explore operating systems
– We can also view as a computer system consisting of
hardware, software and data from two viewpoints:
– Operating system provides the means for proper use of – The User
these resources in the operation of computer system
• Functions same way as ordinary computer software – The System
– It is program that is executed
• Operating system relinquishes control of the processor
• Work as a govt.
– Like government it perform no useful function by itself. It
provide an environment in which other task execute
7 8

What operating system do What operating system do


• The User
– Handheld computers
– Single user computer
• Like pc work station such systems are designed for single • like smart phones and tablets, the user interface for
user to utilized its resources mobile computers generally features a touch screen.
• The goal is to maximize the to work that the user is • These systems are resource poor, optimized for usability
performing and battery life.
• The operating system is designed mostly for easy to use and
good performing – Embedded Computers
– Multiuser computer • Like computers in home devices and automobiles
• Like mainframes, computing servers users share resources • The user interface may have some numeric keypads and
and may exchange information may turn indicators light on or off to show status.
• The operating system in such cases designed to maximize the • The operating system designed primarily to run without
resource utilization
– To assure that all CPU time, memory and I/O are used efficiently
user intervention.
and no individual user can take more than their air share
9 10

What operating system do


• The System : from the system viewpoint the
operating system is the program most intimately
involved with the hardware. There are two
different view:
– The operating system is resource allocator
• Manage all resources
• Decides between conflicting requests for efficient and fair
resource use
– The operating system is a control program
• Control execution of programs to prevent errors and
improper use of the computer
11 12

2
10/10/2022

Services Provided by the Operating System Services Provided by the Operating System
• Program execution : The major activities of • Access to I/O devices : An I/O subsystem
an operating system with respect to program comprises of I/O devices and their
management − corresponding driver software. An Operating
– Loads a program into memory. System manages the communication between
– Executes the program. user and device drivers.
– Handles program's execution. – I/O operation means read or write operation with
– Provides a mechanism for process synchronization. any file or any specific I/O device.
– Provides a mechanism for process communication. – Operating system provides the access to the
required I/O device when required.
– Provides a mechanism for deadlock handling.

13 14

Services Provided by the Operating System Services Provided by the Operating System
• Controlled access to files : A file represents a – Permission varies from read-only, read-write, denied
collection of related information. Computers can and so on.
store files on the disk (secondary storage), for long- – Operating System provides an interface to the user to
term storage purpose. A file system is normally create/delete files.
organized into directories for easy navigation and – Operating System provides an interface to the user to
usage. These directories may contain files and other create/delete directories.
directions. Following are the major activities of an – Operating System provides an interface to create the
operating system with respect to file management − backup of file system.
– Program needs to read a file or write a file.
– The operating system gives the permission to the program
for operation on file.
15 16

Services Provided by the Operating System Services Provided by the Operating System
• Communication: In case of distributed systems • Error handling : Errors can occur anytime and
which are a collection of processors that do not share anywhere. An error may occur in CPU, in I/O
memory, peripheral devices, or a clock, the operating
system manages communications between all the devices or in the memory hardware. Following
processes. Multiple processes communicate with one are the major activities of an operating system
another through communication lines in the network. with respect to error handling −
– Two processes often require data to be transferred – The OS constantly checks for possible errors.
between them
– The OS takes an appropriate action to ensure correct
– Both the processes can be on one computer or on different
computers, but are connected through a computer
and consistent computing.
network.
– Communication may be implemented by two methods,
either by Shared Memory or by Message Passing.
17 18

3
10/10/2022

Services Provided by the Operating System Services Provided by the Operating System
• Resource Management : In case of multi-user or • Protection : Considering a computer system having
multiple users and concurrent execution of multiple
multi-tasking environment, resources such as processes, the various processes must be protected
main memory, CPU cycles and files storage are from each other's activities.
to be allocated to each user or job. Protection refers to a mechanism or a way to control
– The OS manages all kinds of resources using
the access of programs, processes, or users to the
resources defined by a computer system. The OS
schedulers. ensures that all access to system resources is
– CPU scheduling algorithms are used for better controlled.
utilization of CPU. – The OS ensures that external I/O devices are protected
from invalid access attempts.
– The OS provides authentication features for each user by
means of passwords.
19 20

Services Provided by the


Operating System As nouns the difference between function and service
is that function is what something does or is used for
• Accounting while service is an event in which an entity takes the
– Collect usage statistics responsibility that something desirable happens on the behalf of
another entity or service can be service tree.
– Monitor performance As verbs the difference between function and service
is that function is to have a function while service is to serve.

21 22

Kernel Evolution of an Operating System


• Portion of operating system that is in • Hardware upgrades plus new types of
main memory hardware
• Contains most frequently used functions • New services
• Also called the nucleus • Fixes

23 24

4
10/10/2022

Evolution of Operating Systems Evolution of Operating Systems


• Simple Batch Systems
• Serial Processing – allows a job or task to be done in a series and then
– No operating system completed sequentially
– Machines run from a console with display lights, – On cards and tapes, jobs were scheduled and
toggle switches, input device, and printer submitted
– Schedule time – Then, using Job Control Language, they were
– Setup included loading the compiler, source successively executed on the monitors.
program, saving compiled program, and loading – Monitors
and linking • Software that controls the sequence of events
• Batch jobs together
• Program branches back to monitor when finished
25 26

Job Control Language (JCL) Hardware Features


• Special type of programming language • Memory protection
• Provides instruction to the monitor – Do not allow the memory area containing the
– What compiler to use monitor to be altered
– What data to use • Timer
– Prevents a job from monopolizing the system

27 28

Hardware Features Memory Protection


• Privileged instructions • User program executes in user mode
– Certain machine level instructions can only be – Certain instructions may not be executed
executed by the monitor • Monitor executes in system mode
• Interrupts – Kernel mode
– Early computer models did not have this – Privileged instructions are executed
capability – Protected areas of memory may be accessed

29 30

5
10/10/2022

I/O Devices Slow Uniprogramming


• Processor must wait for I/O instruction to
complete before preceding

31 32

Multiprogramming Multiprogramming
• The operating system was designed to serve numerous
users at the same time
• When one job needs to wait for I/O, the processor can
switch to the other job

33 34

Time Sharing Real Time System


• Using multiprogramming to handle multiple A system is said to be Real Time if it is required to
complete it’s work & deliver it’s services on time.
interactive jobs • Example – Flight Control System
• Processor’s time is shared among multiple • All tasks in that system must execute on time.
Hard and Soft Real Time Systems:
users •Hard Real Time System
–Failure to meet deadlines is fatal
• Multiple users simultaneously access the –example : Flight Control System
system through terminals •Soft Real Time System
–Late completion of jobs is undesirable but not fatal
–System performance degrades as more & more jobs
miss deadlines
–Online Databases

35 36

6
10/10/2022

Multiprocessing: Asymmetric Multiprocessing:


Multiprocessing is a system that has more than one or two Asymmetric Multiprocessing system is a multiprocessor computer
processors. In Multiprocessing, CPUs are added for increasing system where not all of the multiple interconnected central
computing speed of the system. Because of Multiprocessing, processing units (CPUs) are treated equally. In asymmetric
There are many processes are executed simultaneously. multiprocessing, only a master processor runs the tasks of the
Multiprocessing are classified into two categories: operating system.
1. Symmetric Multiprocessing For example, AMP can be used in assigning specific tasks to the
2. Asymmetric Multiprocessing CPU based on the priority and the importance of task completion.

37 38

Symmetric Multiprocessing: Difference Between Asymmetric and


It involves a multiprocessor computer hardware and software
architecture where two or more identical processors are connected
Symmetric Multiprocessing
to a single, shared main memory, and have full access to all input
Asymmetric Multiprocessing Symmetric Multiprocessing
and output devices, In other words, Symmetric Multiprocessing is a
type of multiprocessing where each processor is self-scheduling. • n asymmetric • In symmetric
For example, SMP applies multiple processors to that one problem, multiprocessing, the multiprocessing, all the
known as parallel programming. processors are not treated processors are treated
equally. equally.
• Tasks of the operating • Tasks of the operating
system are done by master system are done individual
processor processor.
• No Communication between • All processors communicate
Processors as they are with another processor by a
controlled by the master shared memory.
processor.
39 40

Difference Between Asymmetric and Difference Between Asymmetric and


Symmetric Multiprocessing Symmetric Multiprocessing
Asymmetric Multiprocessing Symmetric Multiprocessing Asymmetric Multiprocessing Symmetric Multiprocessing
• In asymmetric • In symmetric • In case a master processor • In case of processor failure,
multiprocessing, process multiprocessing, the process malfunctions then slave there is reduction in the
scheduling approach used is is taken from the ready processor continues the system’s computing
master-slave. queue. execution which is turned to capacity.
• All processors can exhibit • The architecture of each master processor. When a • It is suitable for
different architecture. processor is the same. slave processor fails then homogeneous cores.
• It is simple as here the • It is complex as other processors take over
master processor has access synchronization is required the task.
to the data, etc. of the processors in order to • It is suitable for
maintain the load balance. homogeneous or
heterogeneous cores.
41 42

7
10/10/2022

Multithreading: Difference between Multiprocessing and


Multithreading is a system in which multiple threads are created of
a process for increasing the computing speed of the system. In Multithreading:
multithreading, many threads of a process are executed
simultaneously and process creation in multithreading is done Multiprocessing Multithreading
according to economical. • In Multiprocessing, CPUs • While In Multithreading,
are added for increasing many threads are created of
computing power. a single process for
increasing computing
• In Multiprocessing, Many power.
processes are executed • While in multithreading,
simultaneously. many threads of a process
are executed
simultaneously.

43 44

Difference between Multiprocessing and Multi-user operating system:


A multi-user operating system is a type of operating system that
Multithreading: allows multiple users to use/access the same system running to a
single operating system. In simpler words, it is an operating system
Multiprocessing Multithreading that more than one user can use at a time on the same machine.
• Multiprocessing are classified • While Multithreading is not In this, different users access the machine running the operating
into Symmetric and Asymme classified in any categories. system through networked terminals in which the operating system
tric. handles requests from users by taking turns.
• In Multiprocessing, Process • While in Multithreading,
creation is a time-consuming process creation is
process. according to economical.
• In Multiprocessing, every • While in Multithreading, a
process owned a separate common address space is
address space. shared by all the threads. The main idea of developing a multi-user operating system is to use
it for time-sharing and batch processing on mainframe computers.
45 46

Components of Multi-User Operating System Types of Multi-User Operating Systems


The major components of the multi-user operating system are: Some of the types of Multi-User Operating systems are :
Memory: Any program that needs to be executed must be copied Distributed System: In this, a collection of multiple components are
from secondary storage like a hard disk to RAM. distributed over multiple computers that interact and coordinate with
Kernel: This is used to interact with the system's hardware directly. each other like a single coherent system. In simpler words, multiple
Processor: The CPU or Central Processing Unit is known as the computers are managed in such a way that they appear as a single
computer's brain. The CPU is mapped into a single chip known as computer. Distributed systems are also known as distributed
the microprocessor. computing.
Device Handler: The purpose of a device handler is to provide all Time-Sliced System: In such a system, each user's job gets a
the requests from the whole device request queue pool. Each specified amount of time from the CPU. An internal component
input/output device requires its own device handler. The device known as the Scheduler decides which job to run next. The
handler works in a continuous cycle mode. scheduler decides and executes the job that needs to be performed
Spooler: The full form of spooler is Simultaneous Peripheral based on the priority cycle.
Output on Line. A spooler runs all the computer processes and Multiprocessor System: In such a system, multiple processors are
outputs the results simultaneously. used, which helps improve the system's overall performance. In case
one of the processors fails, the system does not collapses, the other
47
processors are responsible for completing its tasks. 48

8
10/10/2022

Characteristics of Multi-User Operating System are: Examples of Multi-User Operating System


Resource Sharing: Various output and memory resources such as Some of the examples of multi-user operating systems are:
printers, fax machines, and hard drives can be shared among Unix
multiple users using this operating system. Using this functionality, Unix is a highly dependable open system architecture suitable for
users can share their documents. Each user gets a small slice of small and medium business computing systems. Major tech giants
CPU time in this operating system. like AIX, Solarix, etc., have their own version of Unix.
Multitasking: Multiple tasks can be performed at the same time Multiple Virtual Storage
using the multi-user operating system. IBM developed an operating system for mainframe systems. Its
Background Processing: It means when commands are not most common application is enterprise computing, requiring high-
processed but executed in the background while any other program intensity input/output tasks such as insurance, aviation business, etc.
is interacting with the system in real-time. Shared Computing
Time-Sharing: It is a strategy that is used by multi-user operating A multi-user operating system is used for servers that support most
systems to operate on several users' requests simultaneously by webmail apps. Webmail applications require hundreds of computers,
switching between the jobs at short time intervals. each one of which runs a multi-user operating system capable of
Invisibility: Many functions of the multi-user operating system are various users simultaneously.
hidden due to factors such as OS being instinctive or happening at
the lower end such as disk formatting, etc. 49 50

Advantages
•In case one computer on the network grid goes down due to some
issue, the rest of the computers on the network stay unaffected. The
system can be handled efficiently.
• Using the multi-user operating system, resources can be shared.
For example, it can be used in the printing process, in which
multiple users can access the same printer.
•It is used by Airlines for different functions such as ticket
reservations.
Disadvantages
•Sharing of data sometimes becomes dangerous when you share
your files, your private data files also get shared
•Multiple accounts on a single computer may not be suitable for all.
• If a computer gets attacked by a virus, then it will spread to the
entire network to which that infected computer is connected.

51

You might also like