SlideShare uma empresa Scribd logo
1 de 78
Baixar para ler offline
Unit I
• Contents
- Introduction: Evolution of OS
- Types of OS
- Basic h/w support necessary for modern
operating systems,
- services provided by OS
- system programs and system calls
- system design and implementation
Computer & Software
• A computer is a general-purpose device that can
be programmed to carry out a set
of arithmetic or logical operations automatically.
• software is any set of instructions that directs
a computer's processor to perform specific
operations.
- System Software
- Application Software
Interfaces HW - user
End user
Application SW
System SW
Computer-
hardware
System software ( written for
computer which allows the user to
develop and run this programs )
Eg. Operating System, Compiler,
assembler.
Application software ( written for
specific use )
•packages
•own development
What is an Operating System?
• Software which manages hardware.
• A program that acts as an intermediary between
a user of a computer and the computer hardware.
• Collection of software or programs that manages
computer hardware resources and provides
common services for computer programs
• Provides environment where user can execute
programs conveniently and efficiently.
• Use the computer hardware in an efficient
manner.
Goal
• Convenience: An OS makes a computer more
convenient to use.
• Efficiency: An OS allows the computer system
resources to be used in an efficient manner.
Computer System Structure
Computer system can be divided into four components
– Hardware – provides basic computing resources
• CPU, memory, I/O devices
– Operating system
• Controls and coordinates use of hardware among
various applicationsand users
– Application programs – define the ways in which the
system resources are used to solve the computing
problems of the users
• Word processors, compilers, web browsers, database
systems, video games
– Users
• People, machines, other computers
Four Components of a Computer
System
Operating system from the user view-
The user’s view of the computer varies according
to the interface being used.
• Designing a PC for one user, the goal is to
maximize the work that the user is performing.
Here OS is designed mostly for ease of use.
• In another case the user sits at a terminal connected
to a main frame or minicomputer. Other users
can access the same computer through other
terminals. OS here is designed to maximize
resource utilization to assure that all available CPU
time, memory and I/O are used efficiently.
Operating system from the user
view- (Cont….)
• In other cases, users sit at workstations
connected to networks of other workstations
and servers. These users have dedicated
resources but they also share resources such as
networking and servers. Here OS is designed to
compromise between individual usability and
resource utilization.
Operating system from the system
view-
• OS can be viewed as resource allocator where in
resources are – CPU time, memory space, file
storage space, I/O devices etc. OS must decide how to
allocate these resources to specific programs and
users so that it can operate the computer system
efficiently.
• OS is also a control program. A control program
manages the execution of user programs to prevent
errors and improper use of computer. It is concerned
with the operation and control of I/O devices.
Evolution of Operating System
 No operating system
 The Serial Processing Operating Systems are those which
Performs all the instructions into a Sequence Manner
• Problem: lots of wasted computer time!
– Computer was idle during first and last steps
– Computers were very expensive! low utilization of
expensive components
 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.
 The OS was simple, its major task was to transfer
control from one job to the next.
Evolution of Operating System
Cont….
• Memory management in batch system is very
simple. Memory is usually divided into two
areas : Operating system and user program
area.
OS
User
program
area
• Advantages
- 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
- Lack of interaction between the user and job.
- CPU is often idle, because the speeds of the mechanical
I/O devices is slower than CPU.
- Difficult to provide the desired priority.
Spooling
• Original batch systems used tape drives
• Later batch systems used disks for buffering
– Operator read cards onto disk attachedto the
computer
– Computer read jobs from disk
– Computer wrote job results to disk
– Operator directed that job results be printed from
disk
• Disks enabled simultaneousperipheral operation
on-line (spooling)
– Computer overlapped I/O of one job with execution
of another
– Better utilization of the expensive CPU
– Still only one job activeat any given time
 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.
Evolution of Operating System
Cont….
OS
Job 1
Job 2
Job 3
Job 4
Job 5
• Figure depicts the layout of
multiprogramming system.
• The main memory consists of 5
jobs at a time, the CPU executes one
by one.
• Advantages:
- Efficient memory utilization
- Throughput increases
- CPU is never idle, so performance increases
• Disadvantages:
- CPU scheduling is required
- Memory management is required to accommodate more
jobs in memory
 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.
 Examples: Multics, Unix, etc.,
Evolution of Operating System
Cont….
• Advantages:
 Provide advantage of quick response.
 Reduces CPU idle time.
• Disadvantages:
 Problem of reliability.
 Question of security and integrity of user programs and
data.
 Problem of data communication.
Distributed Operating System
• In a Distributed Operating System, we have various
systems and all these systems have their own CPU,
main memory, secondary memory, and resources.
• These systems are connected to each other using a
shared communication network. Here, each system can
perform its task individually.
• The best part about these Distributed Operating System
is remote access i.e. one user can access the data of the
other system and can work accordingly. So, remote
access is possible in these distributed Operating
Systems.
Cont…
Cont…
Advantages:
• Since the systems are connected with each other so, the
failure of one system can't stop the execution of
processes because other systems can do the execution.
• Resources are shared between each other.
• The load on the host computer gets distributed and this,
in turn, increases the efficiency.
Disadvantages:
• Since the data is shared among all the computers, so to
make the data secure and accessible to few computers,
you need to put some extra efforts.
• If there is a problem in the communication network
then the whole communication will be broken.
Real-time Operating System
• The Real-time Operating Systems are used in the situation
where we are dealing with some real-time data. So, as soon
as the data comes, the execution of the process should be
done and there should be no dealy i.e. no buffer delays
should be there.
• Real-time OS is a time-sharing system that is based on the
concept of clock interrupt. So, whenever you want to
process a large number of request in a very short period of
time, then you should use Real-time Operating System.
• For example, the details of the temperature of the petroleum
industry are very crucial and this should be done in real-
time and in a very short period of time. A small delay can
result in a life-death situation. So, this is done with the help
of Real-time Operating System.
Cont…
• There are two types of Real-time Operating
System:
– Hard Real-time: In this type, a small delay can
lead to drastic change. So, when the time
constraint is very important then we use the Hard
Real-time.
– Soft Real-time: Here, the time constraint is not
that important but here also we are dealing with
some real-time data.
Cont…
Advantages:
• There is maximum utilizationof devices and
resources.
• These systems are almost error-free.
Disadvantages:
• The algorithms used in Real-timeOperating
Systemis very complex.
• Specific device drivers are used for respondingto
the interruptsas soon as possible.
Network Operating System
• These systems run on a server and provide the capability to
manage data, users, groups, security, applications, and other
networking functions.
• These type of operating systems allow shared access of files,
printers, security, applications, and other networking
functions over a small private network.
• One more important aspect of Network Operating Systems is
that all the users are well aware of the underlying
configuration, of all other users within the network, their
individual connections etc. and that’s why these computers
are popularly known as tightly coupled systems.
Cont..
Cont..
• Advantagesof NetworkOperating System:
– Highly stable centralized servers
– Security concerns are handled through servers
– New technologies and hardware up-gradation are easily
integrated to the system
– Server access are possible remotely from different locations
and types of systems
• Disadvantagesof NetworkOperating System:
– Servers are costly
– User has to depend on central location for most operations
– Maintenance and updates are required regularly
Cont..
• Examples of Network Operating System are: Microsoft
Windows Server 2003, Microsoft Windows Server 2008,
UNIX, Linux, Mac OS X, Novell NetWare, and BSD etc.
• An Operating System provides services to both
the users and to the programs.
• It provides programs an environment to
execute.
• It provides users the services to execute the
programs in a convenient manner.
• Common services provided by operating systems.
1. User Interface
2. Program execution
3. I/O operations
4. File System manipulation
5. Communication
6. Error Detection
7. Resource Allocation
8. Accounting
9. Protection & Security
User Operating-System Interface
• There are two fundamental approaches for
users to interface with the operating system.
 Command line interpreter
 Batch Interface
 Graphical User Interfaces
• Program execution
• Operating systems can handle several kinds of activities
starting from user programs to system programs like printer
spooler, name servers, file server, etc and every activity will
be encapsulated as a process.
• A process will include the complete execution context
(code to execute, data to manipulate, registers, OS
resources in use). Below are the major activities of an
operating system with respect to program
management
Loads a program into memory.
Executes the program.
Handles program's execution.
Provides a mechanism for process synchronization.
Provides a mechanism for process communication.
Provides a mechanism for deadlock handling.
OPERATING SYSTEM SERVICES
CONT….
 I/O Operation:
I/O operation means read or write operation
with any file or any specific I/O device.
Program may require any I/O device while
running.
Operating system provides the access to the
required I/O device when required.
 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.
Permission varies from read-only, read-write,
denied and so on.
 Operating System provides an interface to the user
to create/delete files.
Operating System provides an interface to the user
to create/delete directories.
Operating System provides an interface to create
the backup of file system.
OPERATING SYSTEM SERVICES
CONT….
 Communication:
Two processes often require data to be transferred
between them.
The both processes can be on the one computer or
on different computer but are connected through
computer network.
Communication may be implemented by two
methods either by Shared Memory or by Message
Passing.
 Error detection: Error can occur anytime and
anywhere. Error may occur in CPU, in I/O devices
or in the memory hardware. Following are the
major activities of an operating system with respect
to error handling.
OS constantly remains aware of possible errors.
OS takes the appropriate action to ensure correct
and consistent computing.
 Resource allocation: When there are multiple
users or multiple jobs running at the same
time, resources must be allocated to each of
them.
 OS manages all kind of resources using schedulers.
CPU scheduling algorithms are used for better
utilization of CPU.
 Accounting: We want to keep track of which
users use how much and what kinds of
computer resources. This record keeping may
be used for accounting (so that users can be
billed) or simply for accumulating usage
statistics.
• Protection and security: Protection involves
ensuring that all access to system resources is
controlled. Security of the system from
outsiders is also important.
Protection and security
• Following are the major activities of an operating system with
respect to protection −
• The OS ensures that all access to system resources is
controlled.
• 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.
Kernel
• A Kernel is a computer program that is the heart
and core of an Operating System.
• Whenever a system starts, the Kernel is the first
program that is loaded after the bootloader
because the Kernel has to handle the rest of the
thing of the system for the Operating System. The
Kernel remains in the memory until the Operating
System is shut-down.
• The Kernel is responsible for low-level tasks such
as disk management, memory management, task
management,etc.
Cont…
• It provides an interface between the user and the
hardware components of the system. When a
process makes a request to the Kernel, then it is
called System Call.
• A Kernel is provided with a protected Kernel
Space which is a separate area of memory and
this area is not accessible by other application
programs. So, the code of the Kernel is loaded
into this protected Kernel Space.
• Apart from this, the memory used by other
applications is called the User Space. As these are
two different spaces in the memory, so
communicationbetween them is a bit slower.
Functions of a Kernel
• Access Computer resource
• Resource Management
• Memory Management
• Device Management
Kernel Mode and User Mode
• There are certain instructions that need to be
executed by Kernel only. So, the CPU executes
these instructions in the Kernel Mode only.
For example, memory management should be
done in Kernel-Mode only. While in the User
Mode, the CPU executes the processes that
are given by the user in the User Space.
Types of Kernel
• Monolithic Kernels - Monolithic Kernels are those
Kernels where the user services and the kernel services
are implemented in the same memory space. As there
is no separate User Space and Kernel Space, so the
execution of the process will be faster in Monolithic
Kernels.
• Microkernel - A Microkernel is different from
Monolithic kernel because in a Microkernel, the user
services and kernel services are implemented into
different spaces i.e. we use User Space and Kernel
Space in case of Microkernels.
Cont…
• Hybrid Kernel - A Hybrid Kernel is a combination
of both Monolithic Kernel and Microkernel. It
makes the use of the speed of Monolithic Kernel
and the modularity of Microkernel.
• Nanokernel - In a Nanokrnel, the whole code of
the kernel is very small i.e. the code executing in
the privileged mode of the hardware is very
small.
• Exokernel - Exokernel is an Operating System
kernel that is developed by the MIT parallel and
the Distributed Operating Systemsgroup.
System Call
• A System call is programmatic way in which a Computer
Program request a service from the kernel operating system.
Operating System Design and Implementation
• An operating system is a construct that allows the user
application programs to interact with the system hardware.
• Operating system by itself does not provide any function but
it provides an atmosphere in which different applications
and programs can do useful work.
• There are many problems that can occur while designing and
implementing an operating system.
Cont..
Operating Systems Structures
• Structure/Organization/Layout of OSs:
1. Monolithic (one unstructured program)
2. Layered
3. Microkernel
Monolithic OS – Basic Structure
• Contains all operating system core functions
and the device drivers.
• Work done via system call.
• Application programs that invoke the
requested system services.
• A set of system services that carry out the
operating system procedures/calls.
Monolithic OS – Basic Structure
A Monolithic
kernel is an OS
architecture
where the entire
operating system
(which includes
the device
drivers, file
system, and the
application IPC)
is working
in kernel space.
Monolithic OS – Basic Structure
• Advantages
- Simple to design and implement
- Simplicity provides speed on simple hardware
• Disadvantages
– Dependencies between system component
– Complex & huge (millions(!) of lines of code)
– Larger size makes it hard to maintain
• E.g. Multics, Unix, BSD, Linux
Layered Approach
• The operating system is divided into a number
of layers (levels), each built on top of lower
layers.
• The bottom layer (layer 0) is the hardware; the
highest (layer N) is the user interface.
• With modularity, layers are selected such that
each uses functions (operations) and services
of only lower-level layers.
Layered Approach
• Advantage
 simplicity of construction and debugging.
• Disadvantage
 The main difficulty is defining the various layers.
 less efficient than other implementations.
 It is difficult to exactly assign of functionalities to
the correct and appropriate layer Because of
having too many layers, performance of the system
is degraded
Microkernel System Structure
• Move as much functionality as possible from the
kernel into “user” space.
• Only a few essential functions in the kernel:
primitive memory management (address space)
 I/O and interrupt management
 Inter-Process Communication (IPC)
 basic scheduling
• Other OS services are provided by processes
running in user mode (vertical servers):device
drivers, file system, virtual memory…
Microkernel Operating System
Microkernel Operating System
• Communication takes place between user modules using
message passing
• Benefits: Easier to extend a microkernel
 Easier to port the operating system to new architectures
 More reliable (less code is running in kernel mode)
 More secure
• Disadvantages:
 Performance overhead of user space to kernel space
communication
 Lots of system calls and context switches
• Examples: Mach, L4, AmigaOS, Minix, K42
Summary: Kernels
• Monolithic kernels
– Advantages: performance
– Disadvantages: difficult to debug and maintain
• Layered Kernels
– Advantages: easy to debug and maintain
– performance of the system is degraded
• Microkernels
– Advantages: more reliable and secure
– Disadvantages: more overhead
Design Goals
• It is quite complicated to define all the goals and
specifications of the operating system while designing it.
• The design changes depending on the type of the operating
system i.e if it is batch system, time shared system, single
user system, multi user system, distributed system etc.
• There are basically two types of goals while designing an
operating system.
• User Goals
• System Goals
Cont..
• User Goals
• The operating system should be convenient, easy to use,
reliable, safe and fast according to the users.
• However, these specifications are not very useful as there is
no set method to achieve these goals.
• System Goals
• The operating system should be easy to design, implement
and maintain.
• These are specifications required by those who create,
maintain and operate the operating system.
Mechanisms and Policies
• One important principle is the separation of policy from
mechanism. Mechanisms
• determine how to do something; policies determine what
will be done.
• For example, the timer construct is a mechanism for ensuring
• CPU protection, but deciding how long the timer is to be set
for a particular
• user is a policy decision.
• The separation of policy and mechanism is important for
flexibility
Cont..
• Operating System Mechanisms and Policies
• There is no specific way to design an operating system as it is
a highly creative task. However, there are general software
principles that are applicable to all operating systems.
• A subtle difference between mechanism and policy is that
mechanism shows how to do something and policy shows
what to do.
• Policies may change over time and this would lead to
changes in mechanism. So, it is better to have a general
mechanism that would require few changes even when a
policy change occurs.
Cont..
• For example - If the mechanism and policy are independent,
then few changes are required in mechanism if policy
changes.
• If a policy favours I/O intensive processes over CPU intensive
processes, then a policy change to preference of CPU
intensiveprocesses will not change the mechanism.
Virtual Machines
• A virtual machine takes the layered approach to
its logical next step. It treats hardware and the
operating system kernel as though they were all
hardware
• A virtual machine provides an interface identical
to the underlying bare hardware
• The operating system host creates the illusion that
a process has its own processor (and virtual
memory)
• Each guest provided with a (virtual) copy of
underlying computer
(a) Non-virtualmachine (b) virtualmachine

Mais conteĂşdo relacionado

Semelhante a Unit I OS.pdf

Operating system concepts
Operating system conceptsOperating system concepts
Operating system conceptsArnav Chowdhury
 
OperatingSystemFeature.pptx
OperatingSystemFeature.pptxOperatingSystemFeature.pptx
OperatingSystemFeature.pptxCharuJain396881
 
Operating System DOS and Windows
Operating System DOS and WindowsOperating System DOS and Windows
Operating System DOS and WindowsYasirKhan357
 
Operating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantagesOperating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantagesOPTOM Nimra Murtaza
 
Module 1 Introduction.ppt
Module 1 Introduction.pptModule 1 Introduction.ppt
Module 1 Introduction.pptshreesha16
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxakhilagajjala
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxssuser000e54
 
Operating System Components.pptx
Operating System Components.pptxOperating System Components.pptx
Operating System Components.pptxpkavithascs
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)NehaTadam
 
unit1 part1.ppt
unit1 part1.pptunit1 part1.ppt
unit1 part1.pptsuresh554942
 
Operating systems
Operating systemsOperating systems
Operating systemsUjjwal 'Shanu'
 
8 operating system concept
8 operating system concept8 operating system concept
8 operating system conceptBaliThorat1
 
Ch1 - OS.pdf
Ch1 - OS.pdfCh1 - OS.pdf
Ch1 - OS.pdfOmarKamil1
 

Semelhante a Unit I OS.pdf (20)

Operating System
Operating SystemOperating System
Operating System
 
Operating system concepts
Operating system conceptsOperating system concepts
Operating system concepts
 
EE469-ch1.pptx
EE469-ch1.pptxEE469-ch1.pptx
EE469-ch1.pptx
 
EE469-ch1.pptx
EE469-ch1.pptxEE469-ch1.pptx
EE469-ch1.pptx
 
OperatingSystemFeature.pptx
OperatingSystemFeature.pptxOperatingSystemFeature.pptx
OperatingSystemFeature.pptx
 
Operating System DOS and Windows
Operating System DOS and WindowsOperating System DOS and Windows
Operating System DOS and Windows
 
Os concepts
Os conceptsOs concepts
Os concepts
 
Operating System
Operating SystemOperating System
Operating System
 
Operating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantagesOperating System-Types-Examples-Advantages & disadvantages
Operating System-Types-Examples-Advantages & disadvantages
 
Operating System-adi.pdf
Operating System-adi.pdfOperating System-adi.pdf
Operating System-adi.pdf
 
Module 1 Introduction.ppt
Module 1 Introduction.pptModule 1 Introduction.ppt
Module 1 Introduction.ppt
 
Os unit i
Os unit iOs unit i
Os unit i
 
CSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptxCSE3120- Module1 part 1 v1.pptx
CSE3120- Module1 part 1 v1.pptx
 
Evolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptxEvolution, Strutcture and Operations.pptx
Evolution, Strutcture and Operations.pptx
 
Operating System Components.pptx
Operating System Components.pptxOperating System Components.pptx
Operating System Components.pptx
 
Nt introduction(os)
Nt introduction(os)Nt introduction(os)
Nt introduction(os)
 
unit1 part1.ppt
unit1 part1.pptunit1 part1.ppt
unit1 part1.ppt
 
Operating systems
Operating systemsOperating systems
Operating systems
 
8 operating system concept
8 operating system concept8 operating system concept
8 operating system concept
 
Ch1 - OS.pdf
Ch1 - OS.pdfCh1 - OS.pdf
Ch1 - OS.pdf
 

Último

Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.eptoze12
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfAsst.prof M.Gokilavani
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx959SahilShah
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction managementMariconPadriquez1
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringJuanCarlosMorales19600
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the weldingMuhammadUzairLiaqat
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitterShivangiSharma879191
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptJasonTagapanGulla
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)dollysharma2066
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleAlluxio, Inc.
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptSAURABHKUMAR892774
 

Último (20)

Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
 
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdfCCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
Application of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptxApplication of Residue Theorem to evaluate real integrations.pptx
Application of Residue Theorem to evaluate real integrations.pptx
 
computer application and construction management
computer application and construction managementcomputer application and construction management
computer application and construction management
 
Piping Basic stress analysis by engineering
Piping Basic stress analysis by engineeringPiping Basic stress analysis by engineering
Piping Basic stress analysis by engineering
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
welding defects observed during the welding
welding defects observed during the weldingwelding defects observed during the welding
welding defects observed during the welding
 
8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter8251 universal synchronous asynchronous receiver transmitter
8251 universal synchronous asynchronous receiver transmitter
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
Solving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.pptSolving The Right Triangles PowerPoint 2.ppt
Solving The Right Triangles PowerPoint 2.ppt
 
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
Correctly Loading Incremental Data at Scale
Correctly Loading Incremental Data at ScaleCorrectly Loading Incremental Data at Scale
Correctly Loading Incremental Data at Scale
 
Arduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.pptArduino_CSE ece ppt for working and principal of arduino.ppt
Arduino_CSE ece ppt for working and principal of arduino.ppt
 

Unit I OS.pdf

  • 1.
  • 2. Unit I • Contents - Introduction: Evolution of OS - Types of OS - Basic h/w support necessary for modern operating systems, - services provided by OS - system programs and system calls - system design and implementation
  • 3. Computer & Software • A computer is a general-purpose device that can be programmed to carry out a set of arithmetic or logical operations automatically. • software is any set of instructions that directs a computer's processor to perform specific operations. - System Software - Application Software
  • 4. Interfaces HW - user End user Application SW System SW Computer- hardware System software ( written for computer which allows the user to develop and run this programs ) Eg. Operating System, Compiler, assembler. Application software ( written for specific use ) •packages •own development
  • 5. What is an Operating System? • Software which manages hardware. • A program that acts as an intermediary between a user of a computer and the computer hardware. • Collection of software or programs that manages computer hardware resources and provides common services for computer programs • Provides environment where user can execute programs conveniently and efficiently. • Use the computer hardware in an efficient manner.
  • 6. Goal • Convenience: An OS makes a computer more convenient to use. • Efficiency: An OS allows the computer system resources to be used in an efficient manner.
  • 7. Computer System Structure Computer system can be divided into four components – Hardware – provides basic computing resources • CPU, memory, I/O devices – Operating system • Controls and coordinates use of hardware among various applicationsand users – Application programs – define the ways in which the system resources are used to solve the computing problems of the users • Word processors, compilers, web browsers, database systems, video games – Users • People, machines, other computers
  • 8. Four Components of a Computer System
  • 9. Operating system from the user view- The user’s view of the computer varies according to the interface being used. • Designing a PC for one user, the goal is to maximize the work that the user is performing. Here OS is designed mostly for ease of use. • In another case the user sits at a terminal connected to a main frame or minicomputer. Other users can access the same computer through other terminals. OS here is designed to maximize resource utilization to assure that all available CPU time, memory and I/O are used efficiently.
  • 10. Operating system from the user view- (Cont….) • In other cases, users sit at workstations connected to networks of other workstations and servers. These users have dedicated resources but they also share resources such as networking and servers. Here OS is designed to compromise between individual usability and resource utilization.
  • 11. Operating system from the system view- • OS can be viewed as resource allocator where in resources are – CPU time, memory space, file storage space, I/O devices etc. OS must decide how to allocate these resources to specific programs and users so that it can operate the computer system efficiently. • OS is also a control program. A control program manages the execution of user programs to prevent errors and improper use of computer. It is concerned with the operation and control of I/O devices.
  • 12. Evolution of Operating System  No operating system  The Serial Processing Operating Systems are those which Performs all the instructions into a Sequence Manner
  • 13. • Problem: lots of wasted computer time! – Computer was idle during first and last steps – Computers were very expensive! low utilization of expensive components
  • 14.  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.  The OS was simple, its major task was to transfer control from one job to the next. Evolution of Operating System Cont….
  • 15.
  • 16. • Memory management in batch system is very simple. Memory is usually divided into two areas : Operating system and user program area. OS User program area
  • 17. • Advantages - 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 - Lack of interaction between the user and job. - CPU is often idle, because the speeds of the mechanical I/O devices is slower than CPU. - Difficult to provide the desired priority.
  • 18. Spooling • Original batch systems used tape drives • Later batch systems used disks for buffering – Operator read cards onto disk attachedto the computer – Computer read jobs from disk – Computer wrote job results to disk – Operator directed that job results be printed from disk • Disks enabled simultaneousperipheral operation on-line (spooling) – Computer overlapped I/O of one job with execution of another – Better utilization of the expensive CPU – Still only one job activeat any given time
  • 19.
  • 20.  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. Evolution of Operating System Cont….
  • 21. OS Job 1 Job 2 Job 3 Job 4 Job 5 • Figure depicts the layout of multiprogramming system. • The main memory consists of 5 jobs at a time, the CPU executes one by one.
  • 22. • Advantages: - Efficient memory utilization - Throughput increases - CPU is never idle, so performance increases • Disadvantages: - CPU scheduling is required - Memory management is required to accommodate more jobs in memory
  • 23.  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.  Examples: Multics, Unix, etc., Evolution of Operating System Cont….
  • 24. • Advantages:  Provide advantage of quick response.  Reduces CPU idle time. • Disadvantages:  Problem of reliability.  Question of security and integrity of user programs and data.  Problem of data communication.
  • 25. Distributed Operating System • In a Distributed Operating System, we have various systems and all these systems have their own CPU, main memory, secondary memory, and resources. • These systems are connected to each other using a shared communication network. Here, each system can perform its task individually. • The best part about these Distributed Operating System is remote access i.e. one user can access the data of the other system and can work accordingly. So, remote access is possible in these distributed Operating Systems.
  • 27. Cont… Advantages: • Since the systems are connected with each other so, the failure of one system can't stop the execution of processes because other systems can do the execution. • Resources are shared between each other. • The load on the host computer gets distributed and this, in turn, increases the efficiency. Disadvantages: • Since the data is shared among all the computers, so to make the data secure and accessible to few computers, you need to put some extra efforts. • If there is a problem in the communication network then the whole communication will be broken.
  • 28. Real-time Operating System • The Real-time Operating Systems are used in the situation where we are dealing with some real-time data. So, as soon as the data comes, the execution of the process should be done and there should be no dealy i.e. no buffer delays should be there. • Real-time OS is a time-sharing system that is based on the concept of clock interrupt. So, whenever you want to process a large number of request in a very short period of time, then you should use Real-time Operating System. • For example, the details of the temperature of the petroleum industry are very crucial and this should be done in real- time and in a very short period of time. A small delay can result in a life-death situation. So, this is done with the help of Real-time Operating System.
  • 29. Cont… • There are two types of Real-time Operating System: – Hard Real-time: In this type, a small delay can lead to drastic change. So, when the time constraint is very important then we use the Hard Real-time. – Soft Real-time: Here, the time constraint is not that important but here also we are dealing with some real-time data.
  • 30. Cont… Advantages: • There is maximum utilizationof devices and resources. • These systems are almost error-free. Disadvantages: • The algorithms used in Real-timeOperating Systemis very complex. • Specific device drivers are used for respondingto the interruptsas soon as possible.
  • 31. Network Operating System • These systems run on a server and provide the capability to manage data, users, groups, security, applications, and other networking functions. • These type of operating systems allow shared access of files, printers, security, applications, and other networking functions over a small private network. • One more important aspect of Network Operating Systems is that all the users are well aware of the underlying configuration, of all other users within the network, their individual connections etc. and that’s why these computers are popularly known as tightly coupled systems.
  • 33. Cont.. • Advantagesof NetworkOperating System: – Highly stable centralized servers – Security concerns are handled through servers – New technologies and hardware up-gradation are easily integrated to the system – Server access are possible remotely from different locations and types of systems • Disadvantagesof NetworkOperating System: – Servers are costly – User has to depend on central location for most operations – Maintenance and updates are required regularly
  • 34. Cont.. • Examples of Network Operating System are: Microsoft Windows Server 2003, Microsoft Windows Server 2008, UNIX, Linux, Mac OS X, Novell NetWare, and BSD etc.
  • 35. • An Operating System provides services to both the users and to the programs. • It provides programs an environment to execute. • It provides users the services to execute the programs in a convenient manner.
  • 36. • Common services provided by operating systems. 1. User Interface 2. Program execution 3. I/O operations 4. File System manipulation 5. Communication 6. Error Detection 7. Resource Allocation 8. Accounting 9. Protection & Security
  • 37. User Operating-System Interface • There are two fundamental approaches for users to interface with the operating system.  Command line interpreter  Batch Interface  Graphical User Interfaces
  • 38. • Program execution • Operating systems can handle several kinds of activities starting from user programs to system programs like printer spooler, name servers, file server, etc and every activity will be encapsulated as a process.
  • 39. • A process will include the complete execution context (code to execute, data to manipulate, registers, OS resources in use). Below are the major activities of an operating system with respect to program management Loads a program into memory. Executes the program. Handles program's execution. Provides a mechanism for process synchronization. Provides a mechanism for process communication. Provides a mechanism for deadlock handling.
  • 40. OPERATING SYSTEM SERVICES CONT….  I/O Operation: I/O operation means read or write operation with any file or any specific I/O device. Program may require any I/O device while running. Operating system provides the access to the required I/O device when required.
  • 41.  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. Permission varies from read-only, read-write, denied and so on.  Operating System provides an interface to the user to create/delete files. Operating System provides an interface to the user to create/delete directories. Operating System provides an interface to create the backup of file system.
  • 42. OPERATING SYSTEM SERVICES CONT….  Communication: Two processes often require data to be transferred between them. The both processes can be on the one computer or on different computer but are connected through computer network. Communication may be implemented by two methods either by Shared Memory or by Message Passing.
  • 43.  Error detection: Error can occur anytime and anywhere. Error may occur in CPU, in I/O devices or in the memory hardware. Following are the major activities of an operating system with respect to error handling. OS constantly remains aware of possible errors. OS takes the appropriate action to ensure correct and consistent computing.
  • 44.  Resource allocation: When there are multiple users or multiple jobs running at the same time, resources must be allocated to each of them.  OS manages all kind of resources using schedulers. CPU scheduling algorithms are used for better utilization of CPU.
  • 45.  Accounting: We want to keep track of which users use how much and what kinds of computer resources. This record keeping may be used for accounting (so that users can be billed) or simply for accumulating usage statistics. • Protection and security: Protection involves ensuring that all access to system resources is controlled. Security of the system from outsiders is also important.
  • 46. Protection and security • Following are the major activities of an operating system with respect to protection − • The OS ensures that all access to system resources is controlled. • 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.
  • 47. Kernel • A Kernel is a computer program that is the heart and core of an Operating System. • Whenever a system starts, the Kernel is the first program that is loaded after the bootloader because the Kernel has to handle the rest of the thing of the system for the Operating System. The Kernel remains in the memory until the Operating System is shut-down. • The Kernel is responsible for low-level tasks such as disk management, memory management, task management,etc.
  • 48. Cont… • It provides an interface between the user and the hardware components of the system. When a process makes a request to the Kernel, then it is called System Call. • A Kernel is provided with a protected Kernel Space which is a separate area of memory and this area is not accessible by other application programs. So, the code of the Kernel is loaded into this protected Kernel Space. • Apart from this, the memory used by other applications is called the User Space. As these are two different spaces in the memory, so communicationbetween them is a bit slower.
  • 49. Functions of a Kernel • Access Computer resource • Resource Management • Memory Management • Device Management
  • 50. Kernel Mode and User Mode • There are certain instructions that need to be executed by Kernel only. So, the CPU executes these instructions in the Kernel Mode only. For example, memory management should be done in Kernel-Mode only. While in the User Mode, the CPU executes the processes that are given by the user in the User Space.
  • 51. Types of Kernel • Monolithic Kernels - Monolithic Kernels are those Kernels where the user services and the kernel services are implemented in the same memory space. As there is no separate User Space and Kernel Space, so the execution of the process will be faster in Monolithic Kernels. • Microkernel - A Microkernel is different from Monolithic kernel because in a Microkernel, the user services and kernel services are implemented into different spaces i.e. we use User Space and Kernel Space in case of Microkernels.
  • 52. Cont… • Hybrid Kernel - A Hybrid Kernel is a combination of both Monolithic Kernel and Microkernel. It makes the use of the speed of Monolithic Kernel and the modularity of Microkernel. • Nanokernel - In a Nanokrnel, the whole code of the kernel is very small i.e. the code executing in the privileged mode of the hardware is very small. • Exokernel - Exokernel is an Operating System kernel that is developed by the MIT parallel and the Distributed Operating Systemsgroup.
  • 53. System Call • A System call is programmatic way in which a Computer Program request a service from the kernel operating system.
  • 54.
  • 55.
  • 56.
  • 57. Operating System Design and Implementation • An operating system is a construct that allows the user application programs to interact with the system hardware. • Operating system by itself does not provide any function but it provides an atmosphere in which different applications and programs can do useful work. • There are many problems that can occur while designing and implementing an operating system.
  • 59. Operating Systems Structures • Structure/Organization/Layout of OSs: 1. Monolithic (one unstructured program) 2. Layered 3. Microkernel
  • 60. Monolithic OS – Basic Structure • Contains all operating system core functions and the device drivers. • Work done via system call. • Application programs that invoke the requested system services. • A set of system services that carry out the operating system procedures/calls.
  • 61. Monolithic OS – Basic Structure A Monolithic kernel is an OS architecture where the entire operating system (which includes the device drivers, file system, and the application IPC) is working in kernel space.
  • 62. Monolithic OS – Basic Structure • Advantages - Simple to design and implement - Simplicity provides speed on simple hardware • Disadvantages – Dependencies between system component – Complex & huge (millions(!) of lines of code) – Larger size makes it hard to maintain • E.g. Multics, Unix, BSD, Linux
  • 63. Layered Approach • The operating system is divided into a number of layers (levels), each built on top of lower layers. • The bottom layer (layer 0) is the hardware; the highest (layer N) is the user interface. • With modularity, layers are selected such that each uses functions (operations) and services of only lower-level layers.
  • 64.
  • 65.
  • 66. Layered Approach • Advantage  simplicity of construction and debugging. • Disadvantage  The main difficulty is defining the various layers.  less efficient than other implementations.  It is difficult to exactly assign of functionalities to the correct and appropriate layer Because of having too many layers, performance of the system is degraded
  • 67. Microkernel System Structure • Move as much functionality as possible from the kernel into “user” space. • Only a few essential functions in the kernel: primitive memory management (address space)  I/O and interrupt management  Inter-Process Communication (IPC)  basic scheduling • Other OS services are provided by processes running in user mode (vertical servers):device drivers, file system, virtual memory…
  • 69.
  • 70. Microkernel Operating System • Communication takes place between user modules using message passing • Benefits: Easier to extend a microkernel  Easier to port the operating system to new architectures  More reliable (less code is running in kernel mode)  More secure • Disadvantages:  Performance overhead of user space to kernel space communication  Lots of system calls and context switches • Examples: Mach, L4, AmigaOS, Minix, K42
  • 71. Summary: Kernels • Monolithic kernels – Advantages: performance – Disadvantages: difficult to debug and maintain • Layered Kernels – Advantages: easy to debug and maintain – performance of the system is degraded • Microkernels – Advantages: more reliable and secure – Disadvantages: more overhead
  • 72. Design Goals • It is quite complicated to define all the goals and specifications of the operating system while designing it. • The design changes depending on the type of the operating system i.e if it is batch system, time shared system, single user system, multi user system, distributed system etc. • There are basically two types of goals while designing an operating system. • User Goals • System Goals
  • 73. Cont.. • User Goals • The operating system should be convenient, easy to use, reliable, safe and fast according to the users. • However, these specifications are not very useful as there is no set method to achieve these goals. • System Goals • The operating system should be easy to design, implement and maintain. • These are specifications required by those who create, maintain and operate the operating system.
  • 74. Mechanisms and Policies • One important principle is the separation of policy from mechanism. Mechanisms • determine how to do something; policies determine what will be done. • For example, the timer construct is a mechanism for ensuring • CPU protection, but deciding how long the timer is to be set for a particular • user is a policy decision. • The separation of policy and mechanism is important for flexibility
  • 75. Cont.. • Operating System Mechanisms and Policies • There is no specific way to design an operating system as it is a highly creative task. However, there are general software principles that are applicable to all operating systems. • A subtle difference between mechanism and policy is that mechanism shows how to do something and policy shows what to do. • Policies may change over time and this would lead to changes in mechanism. So, it is better to have a general mechanism that would require few changes even when a policy change occurs.
  • 76. Cont.. • For example - If the mechanism and policy are independent, then few changes are required in mechanism if policy changes. • If a policy favours I/O intensive processes over CPU intensive processes, then a policy change to preference of CPU intensiveprocesses will not change the mechanism.
  • 77. Virtual Machines • A virtual machine takes the layered approach to its logical next step. It treats hardware and the operating system kernel as though they were all hardware • A virtual machine provides an interface identical to the underlying bare hardware • The operating system host creates the illusion that a process has its own processor (and virtual memory) • Each guest provided with a (virtual) copy of underlying computer
  • 78. (a) Non-virtualmachine (b) virtualmachine