SlideShare una empresa de Scribd logo
1 de 44
CHAPTER ONE
Introduction to Operating System (OS)
Definition and functions of an 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.
Definition and functions of an operating system…
• 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
Evolution of operating systems
• Operating Systems have evolved over the years. So, their evolution through the
years can be mapped using generations of operating systems.
• There are four generations of operating systems. These can be described as
follows:
Major Computer hardware components
• Computer systems consist of three components as shown in below
image: Central Processing Unit, Input devices and Output devices.
• Input devices provide data input to processor, which processes data
and generates useful information that’s displayed to the user through
output devices. This is stored in computer’s memory.
Major Computer hardware components…
• The Central Processing Unit (CPU) is called "the brain of computer" as
it controls operation of all parts of computer.
• It consists of two components: Arithmetic Logic Unit (ALU), and
Control Unit.
Major Computer hardware components…
• Arithmetic Logic Unit (ALU): Data entered into computer is sent to
RAM, from where it is then sent to ALU, where rest of data processing
takes place.
• All types of processing, such as comparisons, decision-making and
processing of non-numeric information takes place here and once
again data is moved to RAM.
Major Computer hardware components…
• Control Unit: As name indicates, this part of CPU extracts instructions,
performs execution, maintains and directs operations of entire
system.
• Control unit performs following functions :−
It controls all activities of computer
Supervises flow of data within CPU
Directs flow of data within CPU
Transfers data to Arithmetic and Logic Unit
Transfers results to memory
Fetches results from memory to output devices
Major Computer hardware components…
• Memory Unit: This is unit in which data and instructions given to
computer as well as results given by computer are stored. Unit of
memory is "Byte".
1 Byte = 8 Bits
Different approaches or Structures of Operating Systems
• Operating system can be implemented with the help of various
structures.
• The structure of the OS depends mainly on how the various common
components of the operating system are interconnected and melded
into the kernel.
• Depending on this we have following structures of the operating
system:
Different approaches or Structures of Operating Systems
• An operating system can have different architectures:
Monolithic
Microkernel Architecture
Layered Architecture
Client server architecture
Virtual Machine architecture
Assignment 1
 Deeply discuss the different types of OS architectures.
OS Services
• 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.
• Following are a few common services provided by an operating
system.
Program execution
I/O operations
File System manipulation
Communication
Error Detection
Resource Allocation
Protection
Program execution
• Operating systems handle many kinds of activities from user
programs to system programs like printer spooler, name servers, file
server, etc. Each of these activities is encapsulated as a process.
• A process includes the complete execution context (code to execute,
data to manipulate, registers, OS resources in use). Following 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.
I/O Operation
• An I/O subsystem comprises of I/O devices and their corresponding
driver software. Drivers hide the peculiarities of specific hardware
devices from the users.
• An Operating System manages the communication between user and
device drivers.
I/O operation means read or write operation with any file or any specific I/O
device.
Operating system provides the access to the required I/O device when
required.
File system manipulation
• A file represents a collection of related information. Computers can
store files on the disk (secondary storage), for long-term storage
purpose. Examples of storage media include magnetic tape, magnetic
disk and optical disk drives like CD, DVD.
• Each of these media has its own properties like speed, capacity, data
transfer rate and data access methods.
• A file system is normally organized into directories for easy navigation
and usage. These directories may contain files and other directions.
File system manipulation…
• Following are the major activities of an operating system with respect
to file management.
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.
Communication
• In case of distributed systems which are a collection of processors
that do not share memory, peripheral devices, or a clock, the
operating system manages communications between all the
processes.
• Multiple processes communicate with one another through
communication lines in the network.
• The OS handles routing and connection strategies, and the problems
of contention and security.
Communication…
• Following are the major activities of an operating system with respect
to communication −
Two processes often require data to be transferred between them
Both the processes can be on one computer or on different computers, but
are connected through a computer network.
Communication may be implemented by two methods, either by Shared
Memory or by Message Passing.
Error handling
• Errors can occur anytime and anywhere. An 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 :
The OS constantly checks for possible errors.
The OS takes an appropriate action to ensure correct and consistent
computing.
Resource Management
• In case of multi-user or multi-tasking environment, resources such as
main memory, CPU cycles and files storage are to be allocated to each
user or job.
• Following are the major activities of an operating system with respect
to resource management:
The OS manages all kinds of resources using schedulers.
CPU scheduling algorithms are used for better utilization of CPU.
Protection
• Considering a computer system having multiple users and concurrent
execution of multiple processes, the various processes must be protected
from each other's activities.
• Protection refers to a mechanism or a way to control the access of
programs, processes, or users to the resources defined by a computer
system.
• 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.
System Calls in Operating System
• 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.
• 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.
How are system calls made?
• When a computer software needs to access the operating system's
kernel, it makes a system call.
• The system call uses an API to expose the operating system's services
to user programs.
• It is the only method to access the kernel system.
• All programs or processes that require resources for execution must
use system calls, as they serve as an interface between the operating
system and user programs.
Why do you need system calls in Operating
System?
• There are various situations where you must require system calls in
the operating system. Following of the situations are as follows:
I. It is must require when a file system wants to create or delete a file.
II. Network connections require the system calls to sending and receiving data
packets.
III. If you want to read or write a file, you need to system calls.
IV. If you want to access hardware devices, including a printer, scanner, you
need a system call.
V. System calls are used to create and manage new processes.
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.
• If the request is permitted, the kernel performs the requested action, like creating or deleting a file.
• As input, the application receives the kernel's output.
• The application resumes the procedure after the input is received.
• When the operation is finished, the kernel returns the results to the application and then moves data from kernel space to user
space in memory.
• A simple system call may take few nanoseconds to provide the result, like retrieving the system date and time.
• A more complicated system call, such as connecting to a network device, may take a few seconds.
• Most operating systems launch a distinct kernel thread for each system call to avoid bottlenecks.
• Modern operating systems are multi-threaded, which means they can handle various system calls at the same time.
Types of System Calls
Types of System Calls…
• 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.
• 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.
Examples of Windows and Unix system calls
No System Programs in Operating System
• System Programming can be defined as the act of building Systems
Software using System Programming Languages.
• According to Computer Hierarchy, one which comes at last is
Hardware. Then it is Operating System, System Programs, and finally
Application Programs.
• Program Development and Execution can be done conveniently in
System Programs.
• Some of the System Programs are simply user interfaces, others are
complex.
• It traditionally lies between the user interface and system calls.
System Programs in Operating System…
• So here, the user can only view up-to-the System Programs he can’t
see System Calls.
System Programs in Operating System…
• System Programs can be divided into these categories :
• File Management – A file is a collection of specific information stored in
the memory of a computer system. File management is defined as the
process of manipulating files in the computer system, its management
includes the process of creating, modifying and deleting files.
It helps to create new files in the computer system and placing them at specific
locations.
It helps in easily and quickly locating these files in the computer system.
It makes the process of sharing files among different users very easy and user-
friendly.
It helps to store files in separate folders known as directories.
These directories help users to search files quickly or to manage files according to
their types of uses.
It helps users to modify the data of files or to modify the name of files in directories.
System Programs in Operating System…
• Status Information – Information like date, time amount of available
memory, or disk space is asked by some users.
• Others providing detailed performance, logging, and debugging
information which is more complex.
• All this information is formatted and displayed on output devices or
printed.
• Terminal or other output devices or files or a window of GUI is used
for showing the output of programs.
System Programs in Operating System…
• File Modification – For modifying the contents of files we use this.
For Files stored on disks or other storage devices, we used different
types of editors.
• For searching contents of files or perform transformations of files we
use special commands.
System Programs in Operating System…
• Programming-Language support – For common programming
languages, we use Compilers, Assemblers, Debuggers, and
interpreters which are already provided to users.
• It provides all support to users. We can run any programming
language. All languages of importance are already provided.
System Programs in Operating System…
• Program Loading and Execution – When the program is ready after
Assembling and compilation, it must be loaded into memory for
execution.
• A loader is part of an operating system that is responsible for loading
programs and libraries.
• It is one of the essential stages for starting a program. Loaders, re-
locatable loaders, linkage editors, and Overlay loaders are provided by
the system.
System Programs in Operating System…
• Communications – Virtual connections among processes, users, and
computer systems are provided by programs.
• Users can send messages to another user on their screen, User can
send e-mail, browsing on web pages, remote login, the
transformation of files from one user to another.
Design Goals in Operating Systems
• There are many design goals that modern operating systems have to
fulfil to be considered successful. Some of these are −
Design Goals in Operating Systems…
• Concurrent Systems:
Modern operating systems should be able to handle multiple users as well as
multiple devices at the same time.
This is necessary for the modern multi-core architectures. Because of these
specifications, the operating system design can be quite complex and difficult
to create.
Design Goals in Operating Systems…
• Security and Privacy:
Operating systems should be able to provide security and privacy for a
system.
This is very important as there are many malicious users who may want to
hack into the computer system and steal user programs.
Design Goals in Operating Systems…
• Resource Sharing:
The operating system should make sure that resources are shared in a correct
manner between multiple user processes.
This can get quite complex when multiple users share the same device as
well.
Design Goals in Operating Systems…
• Future Hardware and Software Changes
A major design consideration is that the operating system should be able to
weather future hardware and software changes and not become obsolete.
This is necessary as the operating system being changed again and again is
quite a costly process.
Design Goals in Operating Systems…
• Portable Operating Systems
The operating systems should be portable i.e. they should work with different
hardware and machines.
There may be some specialty operating system that only work on one kind of
machine, however, most of them are portable.
Design Goals in Operating Systems…
• Backward Compatibility
The new operating systems created should be compatible with the previous
models i.e. they should contain backward compatibility.
Design Goals in Operating Systems…
• No Specific Type of Users
Operating systems should be developed keeping in mind a general user base
so that many users can use them.
Even specially developed operating systems that target a single user base
contain generality.

Más contenido relacionado

Similar a OS chapter 1.pptx

Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating SystemDivya S
 
Introduction to Operating Systems - Mary Margarat
Introduction to Operating Systems - Mary MargaratIntroduction to Operating Systems - Mary Margarat
Introduction to Operating Systems - Mary MargaratMary Margarat
 
Operating Systems
Operating SystemsOperating Systems
Operating Systemsvampugani
 
Operating system
Operating systemOperating system
Operating systemSonika koul
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptxEngrAliSarfrazSiddiq
 
1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptxAishwarya .
 
OSmodule1_ppt.pptx
OSmodule1_ppt.pptxOSmodule1_ppt.pptx
OSmodule1_ppt.pptxRADHIKAB20
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxkrishnajoshi70
 
What is operating system
What is operating systemWhat is operating system
What is operating systemSuvithak
 

Similar a OS chapter 1.pptx (20)

Introduction to Operating System
Introduction to Operating SystemIntroduction to Operating System
Introduction to Operating System
 
Introduction to Operating Systems - Mary Margarat
Introduction to Operating Systems - Mary MargaratIntroduction to Operating Systems - Mary Margarat
Introduction to Operating Systems - Mary Margarat
 
Operating Systems
Operating SystemsOperating Systems
Operating Systems
 
Operating system
Operating systemOperating system
Operating system
 
os assignment -individual presenation.pptx
os assignment -individual presenation.pptxos assignment -individual presenation.pptx
os assignment -individual presenation.pptx
 
PROJECT 3.pptx
PROJECT 3.pptxPROJECT 3.pptx
PROJECT 3.pptx
 
1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx1. Unit 1_Introduction to OS.pptx
1. Unit 1_Introduction to OS.pptx
 
OSmodule1_ppt.pptx
OSmodule1_ppt.pptxOSmodule1_ppt.pptx
OSmodule1_ppt.pptx
 
Operating System-adi.pdf
Operating System-adi.pdfOperating System-adi.pdf
Operating System-adi.pdf
 
Unit I OS CS.ppt
Unit I OS CS.pptUnit I OS CS.ppt
Unit I OS CS.ppt
 
Introduction to operating systems
 Introduction to operating systems Introduction to operating systems
Introduction to operating systems
 
operatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptxoperatinndnd jdj jjrg-system-1(1) (1).pptx
operatinndnd jdj jjrg-system-1(1) (1).pptx
 
1. Introduction to OS.ppt
1. Introduction to OS.ppt1. Introduction to OS.ppt
1. Introduction to OS.ppt
 
Ch1 - OS.pdf
Ch1 - OS.pdfCh1 - OS.pdf
Ch1 - OS.pdf
 
unit1 part1.ppt
unit1 part1.pptunit1 part1.ppt
unit1 part1.ppt
 
ch1.ppt
ch1.pptch1.ppt
ch1.ppt
 
What is operating system
What is operating systemWhat is operating system
What is operating system
 
Ch1
Ch1Ch1
Ch1
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 
Unit 2.pptx
Unit 2.pptxUnit 2.pptx
Unit 2.pptx
 

Último

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Cizo Technology Services
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shardsChristopher Curtin
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxRTS corp
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITmanoharjgpsolutions
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profileakrivarotava
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfMarharyta Nedzelska
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Anthony Dahanne
 

Último (20)

Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
Global Identity Enrolment and Verification Pro Solution - Cizo Technology Ser...
 
2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards2024 DevNexus Patterns for Resiliency: Shuffle shards
2024 DevNexus Patterns for Resiliency: Shuffle shards
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptxThe Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
The Role of IoT and Sensor Technology in Cargo Cloud Solutions.pptx
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
Best Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh ITBest Angular 17 Classroom & Online training - Naresh IT
Best Angular 17 Classroom & Online training - Naresh IT
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
SoftTeco - Software Development Company Profile
SoftTeco - Software Development Company ProfileSoftTeco - Software Development Company Profile
SoftTeco - Software Development Company Profile
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
A healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdfA healthy diet for your Java application Devoxx France.pdf
A healthy diet for your Java application Devoxx France.pdf
 
Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024Not a Kubernetes fan? The state of PaaS in 2024
Not a Kubernetes fan? The state of PaaS in 2024
 

OS chapter 1.pptx

  • 1. CHAPTER ONE Introduction to Operating System (OS)
  • 2. Definition and functions of an 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.
  • 3. Definition and functions of an operating system… • 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
  • 4. Evolution of operating systems • Operating Systems have evolved over the years. So, their evolution through the years can be mapped using generations of operating systems. • There are four generations of operating systems. These can be described as follows:
  • 5. Major Computer hardware components • Computer systems consist of three components as shown in below image: Central Processing Unit, Input devices and Output devices. • Input devices provide data input to processor, which processes data and generates useful information that’s displayed to the user through output devices. This is stored in computer’s memory.
  • 6. Major Computer hardware components… • The Central Processing Unit (CPU) is called "the brain of computer" as it controls operation of all parts of computer. • It consists of two components: Arithmetic Logic Unit (ALU), and Control Unit.
  • 7. Major Computer hardware components… • Arithmetic Logic Unit (ALU): Data entered into computer is sent to RAM, from where it is then sent to ALU, where rest of data processing takes place. • All types of processing, such as comparisons, decision-making and processing of non-numeric information takes place here and once again data is moved to RAM.
  • 8. Major Computer hardware components… • Control Unit: As name indicates, this part of CPU extracts instructions, performs execution, maintains and directs operations of entire system. • Control unit performs following functions :− It controls all activities of computer Supervises flow of data within CPU Directs flow of data within CPU Transfers data to Arithmetic and Logic Unit Transfers results to memory Fetches results from memory to output devices
  • 9. Major Computer hardware components… • Memory Unit: This is unit in which data and instructions given to computer as well as results given by computer are stored. Unit of memory is "Byte". 1 Byte = 8 Bits
  • 10. Different approaches or Structures of Operating Systems • Operating system can be implemented with the help of various structures. • The structure of the OS depends mainly on how the various common components of the operating system are interconnected and melded into the kernel. • Depending on this we have following structures of the operating system:
  • 11. Different approaches or Structures of Operating Systems • An operating system can have different architectures: Monolithic Microkernel Architecture Layered Architecture Client server architecture Virtual Machine architecture Assignment 1  Deeply discuss the different types of OS architectures.
  • 12. OS Services • 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. • Following are a few common services provided by an operating system. Program execution I/O operations File System manipulation Communication Error Detection Resource Allocation Protection
  • 13. Program execution • Operating systems handle many kinds of activities from user programs to system programs like printer spooler, name servers, file server, etc. Each of these activities is encapsulated as a process. • A process includes the complete execution context (code to execute, data to manipulate, registers, OS resources in use). Following 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.
  • 14. I/O Operation • An I/O subsystem comprises of I/O devices and their corresponding driver software. Drivers hide the peculiarities of specific hardware devices from the users. • An Operating System manages the communication between user and device drivers. I/O operation means read or write operation with any file or any specific I/O device. Operating system provides the access to the required I/O device when required.
  • 15. File system manipulation • A file represents a collection of related information. Computers can store files on the disk (secondary storage), for long-term storage purpose. Examples of storage media include magnetic tape, magnetic disk and optical disk drives like CD, DVD. • Each of these media has its own properties like speed, capacity, data transfer rate and data access methods. • A file system is normally organized into directories for easy navigation and usage. These directories may contain files and other directions.
  • 16. File system manipulation… • Following are the major activities of an operating system with respect to file management. 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.
  • 17. Communication • In case of distributed systems which are a collection of processors that do not share memory, peripheral devices, or a clock, the operating system manages communications between all the processes. • Multiple processes communicate with one another through communication lines in the network. • The OS handles routing and connection strategies, and the problems of contention and security.
  • 18. Communication… • Following are the major activities of an operating system with respect to communication − Two processes often require data to be transferred between them Both the processes can be on one computer or on different computers, but are connected through a computer network. Communication may be implemented by two methods, either by Shared Memory or by Message Passing.
  • 19. Error handling • Errors can occur anytime and anywhere. An 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 : The OS constantly checks for possible errors. The OS takes an appropriate action to ensure correct and consistent computing.
  • 20. Resource Management • In case of multi-user or multi-tasking environment, resources such as main memory, CPU cycles and files storage are to be allocated to each user or job. • Following are the major activities of an operating system with respect to resource management: The OS manages all kinds of resources using schedulers. CPU scheduling algorithms are used for better utilization of CPU.
  • 21. Protection • Considering a computer system having multiple users and concurrent execution of multiple processes, the various processes must be protected from each other's activities. • Protection refers to a mechanism or a way to control the access of programs, processes, or users to the resources defined by a computer system. • 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.
  • 22. System Calls in Operating System • 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. • 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.
  • 23. How are system calls made? • When a computer software needs to access the operating system's kernel, it makes a system call. • The system call uses an API to expose the operating system's services to user programs. • It is the only method to access the kernel system. • All programs or processes that require resources for execution must use system calls, as they serve as an interface between the operating system and user programs.
  • 24. Why do you need system calls in Operating System? • There are various situations where you must require system calls in the operating system. Following of the situations are as follows: I. It is must require when a file system wants to create or delete a file. II. Network connections require the system calls to sending and receiving data packets. III. If you want to read or write a file, you need to system calls. IV. If you want to access hardware devices, including a printer, scanner, you need a system call. V. System calls are used to create and manage new processes.
  • 25. 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. • If the request is permitted, the kernel performs the requested action, like creating or deleting a file. • As input, the application receives the kernel's output. • The application resumes the procedure after the input is received. • When the operation is finished, the kernel returns the results to the application and then moves data from kernel space to user space in memory. • A simple system call may take few nanoseconds to provide the result, like retrieving the system date and time. • A more complicated system call, such as connecting to a network device, may take a few seconds. • Most operating systems launch a distinct kernel thread for each system call to avoid bottlenecks. • Modern operating systems are multi-threaded, which means they can handle various system calls at the same time.
  • 27. Types of System Calls… • 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. • 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.
  • 28. Examples of Windows and Unix system calls
  • 29. No System Programs in Operating System • System Programming can be defined as the act of building Systems Software using System Programming Languages. • According to Computer Hierarchy, one which comes at last is Hardware. Then it is Operating System, System Programs, and finally Application Programs. • Program Development and Execution can be done conveniently in System Programs. • Some of the System Programs are simply user interfaces, others are complex. • It traditionally lies between the user interface and system calls.
  • 30. System Programs in Operating System… • So here, the user can only view up-to-the System Programs he can’t see System Calls.
  • 31. System Programs in Operating System… • System Programs can be divided into these categories : • File Management – A file is a collection of specific information stored in the memory of a computer system. File management is defined as the process of manipulating files in the computer system, its management includes the process of creating, modifying and deleting files. It helps to create new files in the computer system and placing them at specific locations. It helps in easily and quickly locating these files in the computer system. It makes the process of sharing files among different users very easy and user- friendly. It helps to store files in separate folders known as directories. These directories help users to search files quickly or to manage files according to their types of uses. It helps users to modify the data of files or to modify the name of files in directories.
  • 32. System Programs in Operating System… • Status Information – Information like date, time amount of available memory, or disk space is asked by some users. • Others providing detailed performance, logging, and debugging information which is more complex. • All this information is formatted and displayed on output devices or printed. • Terminal or other output devices or files or a window of GUI is used for showing the output of programs.
  • 33. System Programs in Operating System… • File Modification – For modifying the contents of files we use this. For Files stored on disks or other storage devices, we used different types of editors. • For searching contents of files or perform transformations of files we use special commands.
  • 34. System Programs in Operating System… • Programming-Language support – For common programming languages, we use Compilers, Assemblers, Debuggers, and interpreters which are already provided to users. • It provides all support to users. We can run any programming language. All languages of importance are already provided.
  • 35. System Programs in Operating System… • Program Loading and Execution – When the program is ready after Assembling and compilation, it must be loaded into memory for execution. • A loader is part of an operating system that is responsible for loading programs and libraries. • It is one of the essential stages for starting a program. Loaders, re- locatable loaders, linkage editors, and Overlay loaders are provided by the system.
  • 36. System Programs in Operating System… • Communications – Virtual connections among processes, users, and computer systems are provided by programs. • Users can send messages to another user on their screen, User can send e-mail, browsing on web pages, remote login, the transformation of files from one user to another.
  • 37. Design Goals in Operating Systems • There are many design goals that modern operating systems have to fulfil to be considered successful. Some of these are −
  • 38. Design Goals in Operating Systems… • Concurrent Systems: Modern operating systems should be able to handle multiple users as well as multiple devices at the same time. This is necessary for the modern multi-core architectures. Because of these specifications, the operating system design can be quite complex and difficult to create.
  • 39. Design Goals in Operating Systems… • Security and Privacy: Operating systems should be able to provide security and privacy for a system. This is very important as there are many malicious users who may want to hack into the computer system and steal user programs.
  • 40. Design Goals in Operating Systems… • Resource Sharing: The operating system should make sure that resources are shared in a correct manner between multiple user processes. This can get quite complex when multiple users share the same device as well.
  • 41. Design Goals in Operating Systems… • Future Hardware and Software Changes A major design consideration is that the operating system should be able to weather future hardware and software changes and not become obsolete. This is necessary as the operating system being changed again and again is quite a costly process.
  • 42. Design Goals in Operating Systems… • Portable Operating Systems The operating systems should be portable i.e. they should work with different hardware and machines. There may be some specialty operating system that only work on one kind of machine, however, most of them are portable.
  • 43. Design Goals in Operating Systems… • Backward Compatibility The new operating systems created should be compatible with the previous models i.e. they should contain backward compatibility.
  • 44. Design Goals in Operating Systems… • No Specific Type of Users Operating systems should be developed keeping in mind a general user base so that many users can use them. Even specially developed operating systems that target a single user base contain generality.