0% found this document useful (0 votes)
18 views

Unit-1 Operating System Introduction

added by goswamiavanish92

Uploaded by

goswamiavanish92
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Unit-1 Operating System Introduction

added by goswamiavanish92

Uploaded by

goswamiavanish92
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 118

OPERATING SYSTEM

--AVANISH GOSWAMI

BY-AVANISH GOSWAMI
Introduction of operating
system
• An Operating System (OS) is an interface between a computer user
and computer hardware.
• An operating system is a software which performs all the basic tasks
like file management, memory management, process management,
handling input and output, and controlling peripheral devices such as
disk drives and printers.

BY-AVANISH GOSWAMI
Definition of operating system
• An operating system is a program that acts as an interface between
the user and the computer hardware and controls the execution of all
kinds of programs.

BY-AVANISH GOSWAMI
• Some popular Operating Systems include Linux Operating System, Windows Operating System, VMS, OS/400,
AIX, z/OS, etc.

• Following are some of important functions of an operating System.

• Memory Management
• Processor Management
• Device Management
• File Management
• Security
• Control over system performance
• Job accounting
• Error detecting aids
• Coordination between other software and users
BY-AVANISH GOSWAMI
Characteristics of operating
system

1. Security 11. Information and resource protection


2. Resource management 12. Input and output control
3. File management 13. Program execution
4. Device management
14. Communication
5. Error detection
15. task management
6. Business process management
7. Graphical user interface
16. Multitasking
8. Performance monitoring 17. Memory management
9. Booting 18. Co-ordination between other
10. Accounting software and user
BY-AVANISH GOSWAMI
Main objective of operating
system
• Convenience-in this the operating system provide interaction to the
user to access a computer easily and quickly.
• Efficiency- the operating system can do large work in less number of
time.
• Ability to evolve-in this the operating system provide a way for future
enhancement and modification.

BY-AVANISH GOSWAMI
Applications of Operating
System
• Following are some of the important activities that an Operating
System performs −
• Security − By means of password and similar other techniques, it
prevents to programs unauthorized access and data.
• Control over system performance − Recording delays between
request for a service and response from the system.
• Job accounting − Keeping track of time and resources used by various
jobs and users.

BY-AVANISH GOSWAMI
• Error detecting aids −production of dumps,traces,errors message,and
Other debugging and error detecting aids.
• Coordination between other softwares and users − Coordination and
assignment of compilers, interpreters, assemblers and other software
to the various users of the computer systems.

BY-AVANISH GOSWAMI
Purpose of operating system
• To provide an enviorment in which a user can execute program in
convenient an efficient manner.
• Execute user programs and make solving user problems easier.
• Use the computer hardware in an efficient manner.

BY-AVANISH GOSWAMI
Types of operating system
• Operating systems are there from the very first computer generation and they
keep evolving with time. In this chapter, we will discuss some of the important
types of operating systems which are most commonly used.
Batch operating system-
• The users of a batch operating system do not interact with the computer directly.
• Each user prepares his job on an off-line device like punch cards and submits it
to the computer operator.
• To speed up processing, jobs with similar needs are batched together and run as
a group.
• The programmers leave their programs with the operator and the operator then
sorts the programs with similar requirements into batches.
BY-AVANISH GOSWAMI
Batch operating system-

BY-AVANISH GOSWAMI
• The problems with Batch Systems are as follows −
• Lack of interaction between the user and the job.
• CPU is often idle, because the speed of the mechanical I/O devices is
slower than the CPU.
• Difficult to provide the desired priority.

BY-AVANISH GOSWAMI
Time-sharing operating systems
• Time-sharing is a technique which enables many people, located at
various terminals, to use a particular computer system at the same
time.
• Time-sharing or multitasking is a logical extension of
multiprogramming.
• Processor’s time which is shared among multiple users simultaneously
is termed as time-sharing.

BY-AVANISH GOSWAMI
• The main difference between Multiprogrammed Batch Systems and Time-Sharing
Systems is that in case of Multiprogrammed batch systems, the objective is to
maximize processor use, whereas in Time-Sharing Systems, the objective is to
minimize response time.
• Multiple jobs are executed by the CPU by switching between them, but the switches
occur so frequently.
• Thus, the user can receive an immediate response. For example, in a transaction
processing, the processor executes each user program in a short burst or quantum
of computation.
• That is, if n users are present, then each user can get a time quantum(the periods
of time for which a process is allowed to run in a pre-emptive multitasking system).
• When the user submits the command, the response time is in few seconds at most.
BY-AVANISH GOSWAMI
• Disadvantages of Time-sharing operating systems are as follows −

• Problem of reliability.
• Question of security and integrity of user programs and data.
• Problem of data communication.

BY-AVANISH GOSWAMI
• The operating system uses CPU scheduling and multiprogramming to
provide each user with a small portion of a time.
• Computer systems that were designed primarily as batch systems
have been modified to time-sharing systems.
• Advantages of Timesharing operating systems are as follows −

• Provides the advantage of quick response.


• Avoids duplication of software.
• Reduces CPU idle time.
BY-AVANISH GOSWAMI
BY-AVANISH GOSWAMI
Distributed operating System
• Distributed systems use multiple central processors to serve multiple
real-time applications and multiple users. Data processing jobs are
distributed among the processors accordingly.

• 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, computers, and so on.

BY-AVANISH GOSWAMI
• The advantages of distributed systems are as follows −

• With resource sharing facility, a 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.
BY-AVANISH GOSWAMI
Real Time operating System

• A real-time system is defined 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.
• The time taken by the system to respond to an input and display of
required updated information is termed as the response time. So in
this method, the response time is very less as compared to 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

BY-AVANISH GOSWAMI
• A real-time operating system must have well-defined, fixed time
constraints, otherwise the system will fail. For example, Scientific
experiments, medical imaging systems, industrial control systems,
weapon systems, robots, air traffic control systems, etc.
• 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 and
the data is stored in ROM. In these systems, virtual memory is almost
never found.
BY-AVANISH GOSWAMI
• Soft real-time systems—
• Soft real-time systems are less restrictive.
• A 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

BY-AVANISH GOSWAMI
Multiprogramming operating
system
• Sharing the processor, when two or more programs reside in memory
at the same time, is referred as multiprogramming.
Multiprogramming assumes a single shared processor.
Multiprogramming increases CPU utilization by organizing jobs so that
the CPU always has one to execute.
• Advantages-
• High and efficient CPU utilization.
• User feels that many programs are allotted CPU almost
simultaneously.

BY-AVANISH GOSWAMI
• Disadvantages
• CPU scheduling is required.
• To accommodate many jobs in memory, memory management is required
• . An OS does the following activities related to multiprogramming
• 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 jobs in the memory.
• Multiprogramming operating systems monitor the state of all active programs and
system resources using memory management programs to ensures that the CPU
is never idle, unless there are no jobs to process

BY-AVANISH GOSWAMI
• The following figure shows the memory layout for a
multiprogramming system.

BY-AVANISH GOSWAMI
Multiprogramming operating
system

BY-AVANISH GOSWAMI
Real Time System
• Real-time systems are usually dedicated, embedded systems. An
operating system does the following activities related to real-time
system activity.

• In such systems, Operating Systems typically read from and react to


sensor data.
• The Operating system must guarantee response to events within fixed
periods of time to ensure correct performance.

BY-AVANISH GOSWAMI
Operating system structure
overview
• An operating system is a design that enables user application programs to
communicate with the hardware of the machine.
• The operating system should be built with the utmost care because it is such a
complicated structure and should be simple to use and modify.
• Partially developing the operating system is a simple approach to accomplish this.
• Each of these components needs to have distinct inputs, outputs, and
functionalities.

• This article discusses many sorts of structures that implement operating systems,
as listed below, as well as how and why they work. It also defines the operating
system structure.

BY-AVANISH GOSWAMI
• Simple Structure
• Monolithic Structure
• Layered Approach Structure
• Micro-Kernel Structure
• Exo-Kernel Structure
• Virtual Machines

BY-AVANISH GOSWAMI
What is an operating System
Structure?
• We want a clear structure to let us apply an operating system to our
particular needs because operating systems have complex structures.
• It is easier to create an operating system in pieces, much as we break
down larger issues into smaller, more manageable subproblems.
• Every segment is also a part of the operating system. Operating
system structure can be thought of as the strategy for connecting and
incorporating various operating system components within the kernel.
• Operating systems are implemented using many types of structures,
as will be discussed below:--

BY-AVANISH GOSWAMI
SIMPLE STRUCTURE
• It is the most straightforward operating system structure, but it lacks
definition and is only appropriate for usage with tiny and restricted
systems. Since the interfaces and degrees of functionality in this
structure are clearly defined, programs are able to access I/O
routines, which may result in unauthorized access to I/O procedures.
• This organizational structure is used by the MS-DOS operating system:
• There are four layers that make up the MS-DOS operating system, and
each has its own set of features.
• These layers include ROM BIOS device drivers, MS-DOS device drivers,
application programs, and system programs.
BY-AVANISH GOSWAMI
• The MS-DOS operating system benefits from layering because each
level can be defined independently and, when necessary, can interact
with one another.
• If the system is built in layers, it will be simpler to design, manage,
and update. Because of this, simple structures can be used to build
constrained systems that are less complex.
• When a user program fails, the operating system as whole crashes.
• Because MS-DOS systems have a low level of abstraction, programs
and I/O procedures are visible to end users, giving them the potential
for unwanted access.
BY-AVANISH GOSWAMI
The following figure illustrates layering in simple structure:

BY-AVANISH GOSWAMI
• Advantages of Simple Structure:
• Because there are only a few interfaces and levels, it is simple to develop.
• Because there are fewer layers between the hardware and the applications,
it offers superior performance.
• Disadvantages of Simple Structure:
• The entire operating system breaks if just one user program malfunctions.
• Since the layers are interconnected, and in communication with one
another, there is no abstraction or data hiding.
• The operating system's operations are accessible to layers, which can result
in data tampering and system failure.
BY-AVANISH GOSWAMI
MONOLITHIC STRUCTURE

• The monolithic operating system controls all aspects of the operating


system's operation, including file management, memory management,
device management, and operational operations.

• The core of an operating system for computers is called the kernel (OS).
• All other System components are provided with fundamental services by
the kernel.
• The operating system and the hardware use it as their main interface.
• When an operating system is built into a single piece of hardware, such as
a keyboard or mouse, the kernel can directly access all of its resources.
BY-AVANISH GOSWAMI
• The monolithic operating system is often referred to as the monolithic
kernel.
• Multiple programming techniques such as batch processing and time-
sharing increase a processor's usability.
• Working on top of the operating system and under complete
command of all hardware, the monolithic kernel performs the role of
a virtual computer.
• This is an old operating system that was used in banks to carry out
simple tasks like batch processing and time-sharing, which allows
numerous users at different terminals to access the Operating System.
BY-AVANISH GOSWAMI
The following diagram represents the monolithic structure:

BY-AVANISH GOSWAMI
• Advantages of Monolithic Structure:

• Because layering is unnecessary and the kernel alone is responsible


for managing all operations, it is easy to design and execute.
• Due to the fact that functions like memory management, file
management, process scheduling, etc., are implemented in the same
address area, the monolithic kernel runs rather quickly when
compared to other systems.
• Utilizing the same address speeds up and reduces the time required
for address allocation for new processes.
BY-AVANISH GOSWAMI
• Disadvantages of Monolithic Structure:
• The monolithic kernel's services are interconnected in address space
and have an impact on one another, so if any of them malfunctions,
the entire system does as well.
• It is not adaptable. Therefore, launching a new service is difficult.

BY-AVANISH GOSWAMI
LAYERED STRUCTURE
• The OS is separated into layers or levels in this kind of arrangement. Layer 0
(the lowest layer) contains the hardware, and layer 1 (the highest layer)
contains the user interface (layer N).
• These layers are organized hierarchically, with the top-level layers making
use of the capabilities of the lower-level ones.
• The functionalities of each layer are separated in this method, and
abstraction is also an option.
• Because layered structures are hierarchical, debugging is simpler, therefore
all lower-level layers are debugged before the upper layer is examined.
• As a result, the present layer alone has to be reviewed since all the lower
layers have already been examined.
BY-AVANISH GOSWAMI
The image below shows how OS is organized
into layers:

BY-AVANISH GOSWAMI
• Advantages of Layered Structure:
• Work duties are separated since each layer has its own functionality,
and there is some amount of abstraction.
• Debugging is simpler because the lower layers are examined first,
followed by the top layers.
• Disadvantages of Layered Structure:
• Performance is compromised in layered structures due to layering.
• Construction of the layers requires careful design because upper
layers only make use of lower layers' capabilities.

BY-AVANISH GOSWAMI
MICRO-KERNEL STRUCTURE

• The operating system is created using a micro-kernel framework that


strips the kernel of any unnecessary parts. Systems and user
applications are used to implement these optional kernel
components. So, Micro-Kernels is the name given to these systems
that have been developed.
• Each Micro-Kernel is created separately and is kept apart from the
others. As a result, the system is now more trustworthy and secure. If
one Micro-Kernel malfunctions, the remaining operating system is
unaffected and continues to function normally.

BY-AVANISH GOSWAMI
The image below shows Micro-Kernel Operating System Structure:

BY-AVANISH GOSWAMI
Advantages of Micro-Kernel Structure:

• It enables portability of the operating system across platforms.


• Due to the isolation of each Micro-Kernel, it is reliable and secure.
• The reduced size of Micro-Kernels allows for successful testing.
• The remaining operating system remains unaffected and keeps
running properly even if a component or Micro-Kernel fails.

BY-AVANISH GOSWAMI
Disadvantages of Micro-Kernel Structure:
• The performance of the system is decreased by increased inter-
module communication.
• The construction of a system is complicated.

BY-AVANISH GOSWAMI
EXOKERNEL
• An operating system called Exokernel was created at MIT with the goal
of offering application-level management of hardware resources. The
exokernel architecture's goal is to enable application-specific
customization by separating resource management from protection.
Exokernel size tends to be minimal due to its limited operability.
• Because the OS sits between the programs and the actual hardware, it
will always have an effect on the functionality, performance, and
breadth of the apps that are developed on it.
• By rejecting the idea that an operating system must offer abstractions
upon which to base applications, the exokernel operating system makes
an effort to solve this issue.
BY-AVANISH GOSWAMI
Diagram of Exokernel

BY-AVANISH GOSWAMI
• The goal is to give developers as few restriction on the use of
abstractions as possible while yet allowing them the freedom to do so
when necessary.
• Because of the way the exokernel architecture is designed, a single
tiny kernel is responsible for moving all hardware abstractions into
unreliable libraries known as library operating systems.
• Exokernels differ from micro- and monolithic kernels in that their
primary objective is to prevent forced abstraction.

BY-AVANISH GOSWAMI
Exokernel operating systems have a number of features, including:

• Enhanced application control support.


• Splits management and security apart.
• A secure transfer of abstractions is made to an unreliable library
operating system.
• Brings up a low-level interface.
• Operating systems for libraries provide compatibility and portability.

BY-AVANISH GOSWAMI
Advantages of Exokernel Structure:

• Application performance is enhanced by it.


• Accurate resource allocation and revocation enable more effective
utilisation of hardware resources.
• New operating systems can be tested and developed more easily.
• Every user-space program is permitted to utilise its own customised
memory management.

BY-AVANISH GOSWAMI
Disadvantages of Exokernel Structure:
• A decline in consistency
• Exokernel interfaces have a complex architecture.

BY-AVANISH GOSWAMI
VIRTUAL MACHINES (VMs)
• The hardware of our personal computer, including the CPU, disc drives,
RAM, and NIC (Network Interface Card), is abstracted by a virtual
machine into a variety of various execution contexts based on our
needs, giving us the impression that each execution environment is a
separate computer. A virtual box is an example of it.
• Using CPU scheduling and virtual memory techniques, an operating
system allows us to execute multiple processes simultaneously while
giving the impression that each one is using a separate processor and
virtual memory.
• System calls and a file system are examples of extra functionalities that
a process can have that the hardware is unable to give
BY-AVANISH GOSWAMI
Diagram of virtual machine

BY-AVANISH GOSWAMI
• Instead of offering these extra features, the virtual machine method
just offers an interface that is similar to that of the most fundamental
hardware. A virtual duplicate of the computer system underneath is
made available to each process.
• We can develop a virtual machine for a variety of reasons, all of which
are fundamentally connected to the capacity to share the same
underlying hardware while concurrently supporting various execution
environments, i.e., various operating systems.

BY-AVANISH GOSWAMI
• Disk systems are the fundamental problem with the virtual machine technique. If the
actual machine only has three-disc drives but needs to host seven virtual machines,
let's imagine that. It is obvious that it is impossible to assign a disc drive to every
virtual machine because the program that creates virtual machines would require a
sizable amount of disc space in order to offer virtual memory and spooling. The
provision of virtual discs is the solution.

• The result is that users get their own virtual machines. They can then use any of the
operating systems or software programs that are installed on the machine below.
Virtual machine software is concerned with programming numerous virtual machines
simultaneously into a physical machine; it is not required to take into account any user-
support software. With this configuration, it may be possible to break the challenge of
building an interactive system for several users into two manageable chunks.
BY-AVANISH GOSWAMI
Advantages of Virtual Machines:

• Due to total isolation between each virtual machine and every other
virtual machine, there are no issues with security.
• A virtual machine may offer an architecture for the instruction set
that is different from that of actual computers.
• Simple availability, accessibility, and recovery convenience.

BY-AVANISH GOSWAMI
Disadvantages of Virtual Machines:
• Depending on the workload, operating numerous virtual machines
simultaneously on a host computer may have an adverse effect on
one of them.
• When it comes to hardware access, virtual computers are less
effective than physical ones.

BY-AVANISH GOSWAMI
Components of Operating
System
• An operating system is a large and complex system that can only be
created by partitioning into small parts. These pieces should be a
well-defined part of the system, carefully defining inputs, outputs,
and functions.
• Although Windows, Mac, UNIX, Linux, and other OS do not have the
same structure, most operating systems share similar OS system
components, such as file, memory, process, I/O device management.

BY-AVANISH GOSWAMI
• The components of an operating system play a key role to make a variety of computer
system parts work together.
• There are the following components of an operating system, such as:
• Process Management
• File Management
• Network Management
• Main Memory Management
• Secondary Storage Management
• I/O Device Management
• Security Management
• Command Interpreter System
BY-AVANISH GOSWAMI
• Operating system components help you get the correct computing by
detecting CPU and memory hardware errors.

BY-AVANISH GOSWAMI
Process Management

• The process management component is a procedure for managing


many processes running simultaneously on the operating system.
• Every running software application program has one or more
processes associated with them.
• For example, when you use a search engine like Chrome, there is a
process running for that browser program.

• Process management keeps processes running efficiently. It also uses


memory allocated to them and shutting them down when needed.

BY-AVANISH GOSWAMI
• The execution of a process must be sequential so, at least one
instruction should be executed on behalf of the process.

BY-AVANISH GOSWAMI
Functions of process management
• Here are the following functions of process management in the
operating system, such as:
• Process creation and deletion.
• Suspension and resumption.
• Synchronization process
• Communication process

BY-AVANISH GOSWAMI
File Management
• A file is a set of related information defined by its creator. It
commonly represents programs (both source and object forms) and
data. Data files can be alphabetic, numeric, or alphanumeric.

BY-AVANISH GOSWAMI
Function of file management
• The operating system has the following important activities in
connection with file management:
• File and directory creation and deletion.
• For manipulating files and directories.
• Mapping files onto secondary storage.
• Backup files on stable storage media.

BY-AVANISH GOSWAMI
Network Management

• Network management is the process of administering and managing


computer networks. It includes performance management,
provisioning of networks, fault analysis, and maintaining the quality of
service.

BY-AVANISH GOSWAMI
• A distributed system is a collection of computers or processors that
never share their memory and clock. In this type of system, all the
processors have their local memory, and the processors communicate
with each other using different communication cables, such as fibre
optics or telephone lines.

• The computers in the network are connected through a communication


network, which can configure in many different ways.
• The network can fully or partially connect in network management,
which helps users design routing and connection strategies that
overcome connection and security issues.
BY-AVANISH GOSWAMI
Functions of Network
management
• Network management provides the following functions, such as:

• Distributed systems help you to various computing resources in size


and function. They may involve minicomputers, microprocessors, and
many general-purpose computer systems.
• A distributed system also offers the user access to the various
resources the network shares.
• It helps to access shared resources that help computation to speed up
or offers data availability and reliability.

BY-AVANISH GOSWAMI
Main Memory management

• Main memory is a large array of storage or bytes, which has an


address. The memory management process is conducted by using a
sequence of reads or writes of specific memory addresses.

• It should be mapped to absolute addresses and loaded inside the


memory to execute a program. The selection of a memory
management method depends on several factors.

BY-AVANISH GOSWAMI
• However, it is mainly based on the hardware design of the system.
Each algorithm requires corresponding hardware support. Main
memory offers fast storage that can be accessed directly by the CPU.
It is costly and hence has a lower storage capacity. However, for a
program to be executed, it must be in the main memory.

BY-AVANISH GOSWAMI
Functions of Memory management
• An Operating System performs the following functions for Memory
Management in the operating system:

• It helps you to keep track of primary memory.


• Determine what part of it are in use by whom, what part is not in use.
• In a multiprogramming system, the OS decides which process will get
memory and how much.
• Allocates the memory when a process requests.
• It also de-allocates the memory when a process no longer requires or
has been terminated.
BY-AVANISH GOSWAMI
Secondary-Storage
Management
• The most important task of a computer system is to execute
programs. These programs help you to access the data from the main
memory during execution.
• This memory of the computer is very small to store all data and
programs permanently.
• The computer system offers secondary storage to back up the main
memory.

BY-AVANISH GOSWAMI
• Today modern computers use hard drives/SSD as the primary storage
of both programs and data.
• However, the secondary storage management also works with storage
devices, such as USB flash drives and CD/DVD drives.
• Programs like assemblers and compilers are stored on the disk until it
is loaded into memory, and then use the disk is used as a source and
destination for processing.

BY-AVANISH GOSWAMI
Functions of Secondary storage
management
• Here are some major functions of secondary storage management in
the operating system:

• Storage allocation
• Free space management
• Disk scheduling

BY-AVANISH GOSWAMI
I/O Device Management

• One of the important use of an operating system that helps to hide


the variations of specific hardware devices from the user.

BY-AVANISH GOSWAMI
Functions of I/O management
• The I/O management system offers the following functions, such as:

• It offers a buffer caching system


• It provides general device driver code
• It provides drivers for particular hardware devices.
• I/O helps you to know the individualities of a specific device.
• NOTE: The user's program can't execute I/O operations directly. The
operating system should provide some medium to perform this.

BY-AVANISH GOSWAMI
Security Management

• The various processes in an operating system need to be secured


from other activities. Therefore, various mechanisms can ensure
those processes that want to operate files, memory CPU, and other
hardware resources should have proper authorization from the
operating system.

• Security refers to a mechanism for controlling the access of programs,


processes, or users to the resources defined by computer controls to
be imposed, together with some means of enforcement.

BY-AVANISH GOSWAMI
BY-AVANISH GOSWAMI
• For example, memory addressing hardware helps to confirm that a process can
be executed within its own address space.
• The time ensures that no process has control of the CPU without renouncing it.
• Lastly, no process is allowed to do its own I/O to protect, which helps you to
keep the integrity of the various peripheral devices.

• Security can improve reliability by detecting latent errors at the interfaces


between component subsystems.
• Early detection of interface errors can prevent the foulness of a healthy
subsystem by a malfunctioning subsystem.
• An unprotected resource cannot misuse by an unauthorized or incompetent user.
BY-AVANISH GOSWAMI
Command Interpreter System

• One of the most important components of an operating system is its


command interpreter. The command interpreter is the primary
interface between the user and the rest of the system.

BY-AVANISH GOSWAMI
• Many commands are given to the operating system by control statements. A
program that reads and interprets control statements is automatically executed
when a new job is started in a batch system or a user logs in to a time-shared
system. This program is variously called.

• The control card interpreter,


• The command-line interpreter,
• The shell (in UNIX), and so on.
• Its function is quite simple, get the next command statement, and execute it. The
command statements deal with process management, I/O handling, secondary
storage management, main memory management, file system access, protection,
and networking.
BY-AVANISH GOSWAMI
Services of Operating System
• Program execution
• Input Output Operations
• Communication between Process
• File Management
• Memory Management
• Process Management
• Security and Privacy
• Resource Management
• User Interface
• Networking
• Error handling
• Time Management
BY-AVANISH GOSWAMI
• The operating system is a primary resource manager. It manages the hardware,
including processors, memory, Input-Output devices, and communication devices.

BY-AVANISH GOSWAMI
• The operating system operates either in kernel mode or user mode.
Compilers and editors run in user mode, whereas operating system
code runs in kernel mode.

BY-AVANISH GOSWAMI
Program execution
• To execute a program, several tasks need to be performed.
• Both the instructions and data must be loaded into the main
memory.
• In addition, input-output devices and files should be initialized, and
other resources must be prepared.
• The Operating structures handle these kinds of tasks.
• The user now no longer should fear the reminiscence allocation or
multitasking or anything.

BY-AVANISH GOSWAMI
Control Input/output devices
• As there are numerous types of I/O devices within the computer
system, and each I/O device calls for its own precise set of
instructions for the operation.
• The Operating System hides that info with the aid of presenting a
uniform interface. Thus, it is convenient for programmers to access
such devices easily.

BY-AVANISH GOSWAMI
Program Creation
• The Operating system offers the structures and tools, including editors
and debuggers, to help the programmer create, modify, and
debugging programs.

BY-AVANISH GOSWAMI
Error Detection and Response
• An Error in a device may also cause malfunctioning of entire device.
These include hardware by zero, attempts to access and software
errors such as device failure, memory error, forbidden memory
locations, etc.
• To avoid error, the operating system monitors the system for
detecting errors and takes suitable action with at least impact on
running applications.

• While working with computers, errors may occur quite often. Errors
may occur in the:
BY-AVANISH GOSWAMI
• Input/ Output devices: For example, connection failure in the
network, lack of paper in the printer, etc.
• User program: For example: attempt to access illegal memory
locations, divide by zero, use too much CPU time, etc.
• Memory hardware: For example, Memory error, the memory
becomes full, etc.
• To handle these errors and other types of possible errors, the
operating system takes appropriate action and generates messages to
ensure correct and consistent computing.

BY-AVANISH GOSWAMI
Accounting

• An Operating device collects utilization records for numerous assets


and tracks the overall performance parameters and responsive time
to enhance overall performance.
• These personal records are beneficial for additional upgrades and
tuning the device to enhance overall performance.

BY-AVANISH GOSWAMI
Security and Protection

• Operating device affords safety to the statistics and packages of a person and
protects any interference from unauthorized users.
• The safety feature counters threats, which are published via way of individuals
out of doors the manage of the running device.

• For Example:

• When a user downloads something from the internet, that program may
contain malicious code that may harm the already existing programs.
• The operating system ensures that proper checks are applied while
downloading such programs.
BY-AVANISH GOSWAMI
File management
• Computers keep data and information on secondary storage devices
like magnetic tape, magnetic disk, optical disk, etc.
• Each storage media has its capabilities like speed, capacity, data
transfer rate, and data access methods.

• For file management, the operating system must know the types of
different files and the characteristics of different storage devices.
• It has to offer the proportion and safety mechanism of documents
additionally.

BY-AVANISH GOSWAMI
Communication
• The operating system manages the exchange of data and programs
among different computers connected over a network.
• This communication is accomplished using message passing and
shared memory.

BY-AVANISH GOSWAMI
System Calls in Operating
System (OS)
• A system call is a way for a user program to interface with the operating
system.
• The program requests several services, and the OS responds by invoking a
series of system calls to satisfy the request.
• A system call can be written in assembly language or a high-level language
like C or Pascal.
• System calls are predefined functions that the operating system may directly
invoke if a high-level language is used.

• In this article, you will learn about the system calls in the operating system
and discuss their types and many other things.
BY-AVANISH GOSWAMI
What is a System Call?

• A system call is a method for a computer program to request a service from the
kernel of the operating system on which it is running.
• A system call is a method of interacting with the operating system via programs.
• A system call is a request from computer software to an operating system's kernel.

• The Application Program Interface (API) connects the operating system's functions
to user programs.
• It acts as a link between the operating system and a process, allowing user-level
programs to request operating system services.
• The kernel system can only be accessed using system calls.
• System calls are required for any programs that use resources.
BY-AVANISH GOSWAMI
How are system calls made?

• A system call function may create and use kernel processes to execute
the asynchronous processing.
• A system call has greater authority than a standard subroutine. A
system call with kernel-mode privilege executes in the kernel
protection domain.
• System calls are not permitted to use shared libraries or any symbols
that are not present in the kernel protection domain.
• The code and data for system calls are stored in global kernel
memory.

BY-AVANISH GOSWAMI
Why do you need system calls in Operating
System?

• It is must require when a file system wants to create or delete a file.


• Network connections require the system calls to sending and
receiving data packets.
• If you want to read or write a file, you need to system calls.
• If you want to access hardware devices, including a printer, scanner,
you need a system call.
• System calls are used to create and manage new processes.

BY-AVANISH GOSWAMI
How System Calls Work

• The Applications run in an area of memory known as user space.


• A system call connects to the operating system's kernel, which
executes in kernel space.
• When an application creates a system call, it must first obtain
permission from the kernel.
• It achieves this using an interrupt request, which pauses the current
process and transfers control to the kernel.

BY-AVANISH GOSWAMI
Types of System Calls

• There are commonly five types of system calls. These are as follows:
• Process Control
• File Management
• Device Management
• Information Maintenance
• Communication

BY-AVANISH GOSWAMI
• Process Control: Process control is the system call that is used to direct the
processes. Some process control examples include creating, load, abort,
end, execute, process, terminate the process, etc.

• File Management: File management is a system call that is used to handle


the files. Some file management examples include creating files, delete
files, open, close, read, write, etc.

• Device Management:Device management is a system call that is used to


deal with devices. Some examples of device management include read,
device, write, get device attributes, release device, etc.
BY-AVANISH GOSWAMI
• Information Maintenance: Information maintenance is a system call
that is used to maintain information. There are some examples of
information maintenance, including getting system data, set time or
date, get time or date, set system data, etc.

• Communication:Communication is a system call that is used for


communication. There are some examples of communication,
including create, delete communication connections, send, receive
messages, etc.

BY-AVANISH GOSWAMI
• Generally, system calls are made by the user level programs in the
following situations:
• Creating, opening, closing and deleting files in the file system.
• Creating and managing new processes.
• Creating a connection in the network, sending and receiving packets.
• Requesting access to a hardware device, like a mouse or a printer.

BY-AVANISH GOSWAMI
System program

• System Programming can be defined as the act of building Systems


Software using System Programming Languages.

BY-AVANISH GOSWAMI
• The performance of the entire computer's application software is
controlled by the system program, which is one of several sorts of
system programs that users of operating systems can use.
• System calls define several sorts of system programs for various
activities, and system calls can be used to access these programs.
System programs are responsible for the creation and execution of a
program.

BY-AVANISH GOSWAMI
Functions of the System
Program
• There are several functions of the system program in the operating system. These are as
follows:
• File management:
• The files and directory are generally manipulated by these programs, which also create, delete,
copy, rename, print, and exit.

• In the computer system, adding new files and putting them in certain places can be helpful.
• It aids in swiftly and simply locating these files within the computer system.
• It effectively simplifies and streamlines the process of exchanging files among users.
• Files should be kept in distinct directories, which are folders.
• Users can manage files according to their intended usage or conduct rapid searches of files using
these directories.
• The ability to change a file's data or a directory's file names is helpful to users.
BY-AVANISH GOSWAMI
• Status information: Status information is the knowledge of the input,
output, storage, and CPU usage processes and how the process will
compute how much memory is needed to complete a task.

• A programming language supports: Compiler, Assembler, and


Interrupt are examples of programming language tools used in the
operating system of a computer for certain functions.

BY-AVANISH GOSWAMI
• Programming Loading and Execution: It performs system calls with the aid of
system programs to do two tasks: enter the program and execute the output of
the program when the program has loaded.

• Communication:The user offers these services because the operating system


requires that a large number of devices be able to communicate with one another
via wireless or other devices.

• Background services:In the operating system, there are several services that may
be used for communication, and a background service can be used to change the
backdrop of your window and search for and identify computer viruses.

BY-AVANISH GOSWAMI
The reason for utilizing a
system program
• System programs manage the hardware's operations, communication,
and coordination of the actions and features of the system's hardware
and software. One illustration of system software is an operating
system. The operating system manages the computer and serves as a
connection for the application software.

• A component of the operating system is the system program. It usually


comes after the user interface and before the system calls. System
programs, not system calls, define how the system appears to them
since they are what users engage with and are more closely related to
the user interface.
BY-AVANISH GOSWAMI
System program types
• There are several categories of system programs mentioned below:
• Utility program:
• It oversees, keeps up with, and regulates a variety of computer
resources. Utility software is quite technical and is intended for
individuals with strong technological backgrounds.
• Software like backup software, disk tools, and antivirus programs are
a few examples of utilities.

BY-AVANISH GOSWAMI
• :Device drivers
• It is used to manage the specific device that is connected to a
computer system. Drivers for connected devices essentially serve as a
translator between the operating system and the connected devices.
• For instance, drivers for storage devices, scanners, and.
• Directory reporting tools:
• These tools are necessary for an operating system to have some
software that makes it easier to navigate the computer system.
• Examples include Windows Explorer, ls, and dir.

BY-AVANISH GOSWAMI
Kernel
• A Kernel is the central part of an operating system. It manages the operations of the
computer and the hardware, most of memory and CPU time.
• Kernel is a software code that reside in central core of OS. It has complete control over
system.
• When OS boots, kernel is first part of OS to load in main memory.
• Kernel remains in main memory for entire duration of computer session. The kernel code is
usually loaded in to protected area of memory.
• Kernel performs it’s task like executing processes and handling interrupts in kernel space.
• User performs it’s task in user area of memory.
• This memory separation is made in order to prevent user data and kernel data from
interfering with each other.
• Kernel does not interact directly with user, but it interacts using SHELL and other programs
and hardware.
BY-AVANISH GOSWAMI
Kernel includes:-

• 1. Scheduler: It allocates the Kernel’s processing time to various


processes.
• 2. Supervisor: It grants permission to use computer system resources
to each process.
• 3. Interrupt handler : It handles all requests from the various
hardware devices which compete for kernel services.
• 4. Memory manager : allocates space in memory for all users of
kernel service.

BY-AVANISH GOSWAMI
Kernel :-

BY-AVANISH GOSWAMI
Interrupt
• Interrupt is a signal emitted by hardware or software when a process
or an event needs immediate attention.
• An interrupt is a mechanism used in computer system to temporarily
suspend the normal execution of a program and transfer control to a
specific piece of code known as interrupt.
• An interrupt is an input signal to the processor indicating an event
that needs immediate attention. It requires the operating system (OS)
to stop and figure out what to do next. An interrupt temporarily stops
or terminates a service or a current process.

BY-AVANISH GOSWAMI
Types: Hardware Interrupt
• If the signal for the processor is from external device or hardware is
called hardware interrupts. Example: from keyboard we will press the
key to do some action this pressing of key in keyboard will generate a
signal which is given to the processor to do action, such interrupts
are called hardware interrupts. Hardware interrupts can be classified
into two types they are :
• Maskable Interrupt: The hardware interrupts which can be delayed
when a much highest priority interrupt has occurred to the processor.
• Non Maskable Interrupt: The hardware which cannot be delayed and
should process by the processor immediately.

BY-AVANISH GOSWAMI
Types: Software Interrupt
• Software Interrupts: Software interrupt can also divided in to two
types.
• They are Normal Interrupts: the interrupts which are caused by
the software instructions are called software instructions.
• Exception: unplanned interrupts while executing a program is called
Exception. For example: while executing a program if we got a value
which should be divided by zero is called a exception

BY-AVANISH GOSWAMI
Thank you

BY-AVANISH GOSWAMI

You might also like