SlideShare a Scribd company logo
Operating System Structures
Dr. Amandeep Singh (Assist. Professor)
Department of Computer Science
Baba Farid College
Topics To Be Covered
 Operating System Components
 Operating System Services
 System Calls
 System Design and Implementation
Operating System Components
 Process Management
 Main Memory Management
 File Management
 I/O System Management
 Secondary Storage Management
 Networking
 Protection System
 Command-Interpreter System
Operating System is responsible for the following activities in connection with process
management
 Creating and deleting both user and system processes
 Suspending and resuming processes
 Providing mechanisms for process synchronization
 Providing mechanisms for process communication
 Providing mechanisms for deadlock handling
Operating System Components
Process Management
Operating System is responsible for the following activities in connection with Main
Memory Management
 Keeping track of which parts of memory are currently being used and by Whom
 Deciding which processes are to be loaded into memory when memory space becomes
available
 Allocating and deallocating memory space as needed
Operating System Components
Main Memory Management
Operating System is responsible for the following activities in connection with File
Management
 Creating and deleting files
 Creating and deleting directories
 Supporting primitives for manipulating files and directories
 Mapping files onto secondary storage
 Backing up files on stable storage media
Operating System Components
File Management
I/O system consists of followings
 A memory-management component that includes buffering, caching and spooling
 A general device-driver interface
 Drivers for specific hardware devices
Only the device driver knows the peculiarities of the specific device to which it is assigned
Operating System Components
I/O-System Management
Operating System is responsible for the following activities in connection with Main
Memory Management
 Free-Space Management
 Storage Allocation
 Disk Scheduling
Operating System Components
Secondary-Storage Management
 Multiple users and processes are allowed to execute concurrently
 Mechanisms must be provided to protect the process form each other
 Mechanism ensure that files, memory segments, CPU and other resources can be
operated on by only those processes that have gained proper authorization from the
operating System.
For example: Memory addressing hardware ensures the a process can execute only within its
own address space.
Operating System Components
Protection System
 One of the most important system programs for an operating system is the command
interpreter, which is the interface between the user and operating system.
 Some Operating system include the command interpreter in the Kernel other OS like Ms-
Dos and Unix treat it as a special program.
 Many commands are given to the Operating system by control statements.
 When a new job is started in a batch system
 When a new user logged on to the Time-Sharing Operating System
Operating System Components
Command-Interpreter System
Operating System Services
 Program Execution
 I/O Operation
 File-System Manipulation
 Communications
 Error Detection
 Resource allocation
 Accounting
 Protection
 The system must be able to load a program into memory and to run that program
 The program must be able to end its execution, either normally or abnormally (including
error)
Operating System Services
Program Execution
 A running program may require I/O. This I/O may involve a file or an I/O device.
 For efficiency and protection, user usually can not control I/O devices directly, Therefore
the operating system must provide a means to do I/O.
Operating System Services
I/O Operations
 The file system is of particular interest. Obviously, programs need to read and write files.
Programs also need to create and delete files by name.
Operating System Services
File-System Manipulation
 In many circumstances, one process need to exchange information with other process.
 Such communication can occur in tow major ways. The first takes place between process
that are executing on the same computer. Second takes place between processes that
are executing on different computer that are tied together by a computer networks.
 Communications may be implemented via shared memory, or by the technique of
message passing, in which packets of information are moved between process by the
operating system
Operating System Services
Communication
 The Operating system constantly needs to be aware of possible errors.
 Errors may occur in the CPU and memory hardware (Such as memory error or a power
failure)
 In I/O devices (Such as a parity error on tape, a connection failure on a network, or lack of
paper in the printer)
 In user program (Such as arithmetic overflow, an attempt to access an illegal memory
location, or a too-great use of CPU time).
 For each type of error, the operating system should take appropriate action to ensure
correct and consistent computing
Operating System Services
Error Detection
 When multiple user are logged on the system or multiple jobs are running at the same
time, resources must be allocated to each of them.
 Many different types of resources are managed by the operating system. Such as CPU
cycles, main memory, storage, I/O devices etc.
Operating System Services
Resource Allocation
 Operating system keep track of which users use how many and what kinds of computer
resources
 This record keeping may be used for accounting or simply for accumulating usage
statistics.
Operating System Services
Accounting
 The owners of information stored in a multiuser computer system may want to control use
of that information. When several disjoined processes execute concurrently, it should not
be possible for one process to interfere with others or with operating system itself.
 Protection involves ensuring that all access to system resources is controlled.
 Security of the system from outsiders is also important. Such security starts with each user
having to authenticate himself to the system, usually by means of password, to be allowed
access to the resources. It extends to defending external I/O devices, including modems
and network adapters, from invalid access attempts, and to recording all such
connections for detection of break-ins.
Operating System Services
Protection
System Calls
 In computing, a system call is the programmatic way in which a computer program
requests a service from the kernel of the operating system it is executed on. A system call is
a way for programs to interact with the operating system. A computer program makes a
system call when it makes a request to the operating system’s kernel. System
call provides the services of the operating system to the user programs via Application
Program Interface(API). It provides an interface between a process and operating system
to allow user-level processes to request services of the operating system. System calls are
the only entry points into the kernel system. All programs needing resources must use
system calls.
System Calls
Services Provided by System Calls :
 Process creation and management
 Main memory management
 File Access, Directory and File system management
 Device handling(I/O)
 Protection
 Networking, etc.
Types of System Calls : There are 5 different categories of system calls –
 Process control: end, abort, create, terminate, allocate and free memory.
 File management: create, open, close, delete, read file etc.
 Device management
 Information maintenance
 Communication
System Calls
System Calls
System Design and Implementation
 Design Goals
 Mechanism and Polices
 Implementation
It is quite complicated to define all the goals and specifications of the operating system while designing it.
The design changes depending on the type of the operating system i.e if it is batch system, time shared
system, single user system, multi user system, distributed system etc.
There are basically two types of goals while designing an operating system. These are −
User Goals
The operating system should be convenient, easy to use, reliable, safe and fast according to the users.
However, these specifications are not very useful as there is no set method to achieve these goals.
System Goals
The operating system should be easy to design, implement and maintain. These are specifications
required by those who create, maintain and operate the operating system. But there is not specific
method to achieve these goals as well.
System Design and Implementation
Design Goals
 There is no specific way to design an operating system as it is a highly creative task.
However, there are general software principles that are applicable to all operating
systems.
 A subtle difference between mechanism and policy is that mechanism shows how to do
something and policy shows what to do. Policies may change over time and this would
lead to changes in mechanism. So, it is better to have a general mechanism that would
require few changes even when a policy change occurs.
 For example - If the mechanism and policy are independent, then few changes are
required in mechanism if policy changes. If a policy favors I/O intensive processes over
CPU intensive processes, then a policy change to preference of CPU intensive processes
will not change the mechanism.
System Design and Implementation
Mechanism and Polices
The operating system needs to be implemented after it is designed. Earlier they were written in
assembly language but now higher level languages are used.
Advantages of Higher Level Language
There are multiple advantages to implementing an operating system using a higher level language
such as:
the code is written more fast, it is compact and also easier to debug and understand. Also, the
operating system can be easily moved from one hardware to another if it is written in a high level
language.
Disadvantages of Higher Level Language
Using high level language for implementing an operating system leads to a loss in speed and increase
in storage requirements. However in modern systems only a small amount of code is needed for high
performance, such as the CPU scheduler and memory manager. Also, the bottleneck routines in the
system can be replaced by assembly language equivalents if required.
System Design and Implementation
Implementation

More Related Content

PPTX
2. Operating System Structure,Services,Call, Design and Implementation.pptx
PPTX
Chapter No 2 Services and Components of Operating System.pptx
PDF
operating system structure
PPTX
OS UNIT 1 NOTES (1).pptxxdjhvcdkfshfkdhvjdsk
PDF
osunit1ppt-23011904470yuoij4-685c22ef.pdf
PPTX
OS UNIT 1 PPT.pptx
PPT
Ch3 OS
 
2. Operating System Structure,Services,Call, Design and Implementation.pptx
Chapter No 2 Services and Components of Operating System.pptx
operating system structure
OS UNIT 1 NOTES (1).pptxxdjhvcdkfshfkdhvjdsk
osunit1ppt-23011904470yuoij4-685c22ef.pdf
OS UNIT 1 PPT.pptx
Ch3 OS
 

Similar to Operating System Structures and objectuve.pptx (20)

PPT
PPTX
Operating System-unit 1.pptxX X A A A A A A A A A A
PPT
Operating System 2
PDF
R20CSE2202-OPERATING-SYSTEMS .pdf
PPTX
Operating Systems R20 Unit 1.pptx
PPTX
OS.pptx
PPT
ch3 - operating system structures.ppt
PPTX
OS chapter 1.pptx
PPTX
OS chapter 1.pptx
PDF
operating system structure
PPT
PPTX
chapter2.pptx
PPT
Operating-System Structures
PPT
CH3-OS.PPT operating system structures module
PPT
Chapter 2 - Operating System Structures
PPT
OS - Ch2
PPTX
1.Operating System-unit 1.pptx Evolution of operating systems: Batch, times...
PDF
Os lecture 6
PPT
Operating System
Operating System-unit 1.pptxX X A A A A A A A A A A
Operating System 2
R20CSE2202-OPERATING-SYSTEMS .pdf
Operating Systems R20 Unit 1.pptx
OS.pptx
ch3 - operating system structures.ppt
OS chapter 1.pptx
OS chapter 1.pptx
operating system structure
chapter2.pptx
Operating-System Structures
CH3-OS.PPT operating system structures module
Chapter 2 - Operating System Structures
OS - Ch2
1.Operating System-unit 1.pptx Evolution of operating systems: Batch, times...
Os lecture 6
Operating System
Ad

More from viceprincipalbfc (8)

PPTX
Introdution and objectives of Thread.pptx
PPTX
Disk Scheduling concept of Operating System.pptx
PPTX
Deadlock - An Operating System Concept.pptx
PPTX
Banker Algorithm in operating system.pptx
PPTX
3. Process Concept in operating system.pptx
PPTX
1. Introduction to Operating System, Types.pptx
PPTX
Lecture 3 RISC-CISC characterstics and difference.pptx
PPTX
Lecture 1 - Computer Organiation Architecture - Introduction.pptx
Introdution and objectives of Thread.pptx
Disk Scheduling concept of Operating System.pptx
Deadlock - An Operating System Concept.pptx
Banker Algorithm in operating system.pptx
3. Process Concept in operating system.pptx
1. Introduction to Operating System, Types.pptx
Lecture 3 RISC-CISC characterstics and difference.pptx
Lecture 1 - Computer Organiation Architecture - Introduction.pptx
Ad

Recently uploaded (20)

PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PDF
Computing-Curriculum for Schools in Ghana
PDF
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
PDF
What if we spent less time fighting change, and more time building what’s rig...
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
PDF
LDMMIA Reiki Yoga Finals Review Spring Summer
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
Weekly quiz Compilation Jan -July 25.pdf
PDF
advance database management system book.pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
1_English_Language_Set_2.pdf probationary
PPTX
Digestion and Absorption of Carbohydrates, Proteina and Fats
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
202450812 BayCHI UCSC-SV 20250812 v17.pptx
PDF
Indian roads congress 037 - 2012 Flexible pavement
PPTX
Introduction to Building Materials
PDF
A systematic review of self-coping strategies used by university students to ...
PDF
Trump Administration's workforce development strategy
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Computing-Curriculum for Schools in Ghana
احياء السادس العلمي - الفصل الثالث (التكاثر) منهج متميزين/كلية بغداد/موهوبين
What if we spent less time fighting change, and more time building what’s rig...
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
LDMMIA Reiki Yoga Finals Review Spring Summer
History, Philosophy and sociology of education (1).pptx
Weekly quiz Compilation Jan -July 25.pdf
advance database management system book.pdf
Orientation - ARALprogram of Deped to the Parents.pptx
1_English_Language_Set_2.pdf probationary
Digestion and Absorption of Carbohydrates, Proteina and Fats
Final Presentation General Medicine 03-08-2024.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
202450812 BayCHI UCSC-SV 20250812 v17.pptx
Indian roads congress 037 - 2012 Flexible pavement
Introduction to Building Materials
A systematic review of self-coping strategies used by university students to ...
Trump Administration's workforce development strategy
UNIT III MENTAL HEALTH NURSING ASSESSMENT

Operating System Structures and objectuve.pptx

  • 1. Operating System Structures Dr. Amandeep Singh (Assist. Professor) Department of Computer Science Baba Farid College
  • 2. Topics To Be Covered  Operating System Components  Operating System Services  System Calls  System Design and Implementation
  • 3. Operating System Components  Process Management  Main Memory Management  File Management  I/O System Management  Secondary Storage Management  Networking  Protection System  Command-Interpreter System
  • 4. Operating System is responsible for the following activities in connection with process management  Creating and deleting both user and system processes  Suspending and resuming processes  Providing mechanisms for process synchronization  Providing mechanisms for process communication  Providing mechanisms for deadlock handling Operating System Components Process Management
  • 5. Operating System is responsible for the following activities in connection with Main Memory Management  Keeping track of which parts of memory are currently being used and by Whom  Deciding which processes are to be loaded into memory when memory space becomes available  Allocating and deallocating memory space as needed Operating System Components Main Memory Management
  • 6. Operating System is responsible for the following activities in connection with File Management  Creating and deleting files  Creating and deleting directories  Supporting primitives for manipulating files and directories  Mapping files onto secondary storage  Backing up files on stable storage media Operating System Components File Management
  • 7. I/O system consists of followings  A memory-management component that includes buffering, caching and spooling  A general device-driver interface  Drivers for specific hardware devices Only the device driver knows the peculiarities of the specific device to which it is assigned Operating System Components I/O-System Management
  • 8. Operating System is responsible for the following activities in connection with Main Memory Management  Free-Space Management  Storage Allocation  Disk Scheduling Operating System Components Secondary-Storage Management
  • 9.  Multiple users and processes are allowed to execute concurrently  Mechanisms must be provided to protect the process form each other  Mechanism ensure that files, memory segments, CPU and other resources can be operated on by only those processes that have gained proper authorization from the operating System. For example: Memory addressing hardware ensures the a process can execute only within its own address space. Operating System Components Protection System
  • 10.  One of the most important system programs for an operating system is the command interpreter, which is the interface between the user and operating system.  Some Operating system include the command interpreter in the Kernel other OS like Ms- Dos and Unix treat it as a special program.  Many commands are given to the Operating system by control statements.  When a new job is started in a batch system  When a new user logged on to the Time-Sharing Operating System Operating System Components Command-Interpreter System
  • 11. Operating System Services  Program Execution  I/O Operation  File-System Manipulation  Communications  Error Detection  Resource allocation  Accounting  Protection
  • 12.  The system must be able to load a program into memory and to run that program  The program must be able to end its execution, either normally or abnormally (including error) Operating System Services Program Execution
  • 13.  A running program may require I/O. This I/O may involve a file or an I/O device.  For efficiency and protection, user usually can not control I/O devices directly, Therefore the operating system must provide a means to do I/O. Operating System Services I/O Operations
  • 14.  The file system is of particular interest. Obviously, programs need to read and write files. Programs also need to create and delete files by name. Operating System Services File-System Manipulation
  • 15.  In many circumstances, one process need to exchange information with other process.  Such communication can occur in tow major ways. The first takes place between process that are executing on the same computer. Second takes place between processes that are executing on different computer that are tied together by a computer networks.  Communications may be implemented via shared memory, or by the technique of message passing, in which packets of information are moved between process by the operating system Operating System Services Communication
  • 16.  The Operating system constantly needs to be aware of possible errors.  Errors may occur in the CPU and memory hardware (Such as memory error or a power failure)  In I/O devices (Such as a parity error on tape, a connection failure on a network, or lack of paper in the printer)  In user program (Such as arithmetic overflow, an attempt to access an illegal memory location, or a too-great use of CPU time).  For each type of error, the operating system should take appropriate action to ensure correct and consistent computing Operating System Services Error Detection
  • 17.  When multiple user are logged on the system or multiple jobs are running at the same time, resources must be allocated to each of them.  Many different types of resources are managed by the operating system. Such as CPU cycles, main memory, storage, I/O devices etc. Operating System Services Resource Allocation
  • 18.  Operating system keep track of which users use how many and what kinds of computer resources  This record keeping may be used for accounting or simply for accumulating usage statistics. Operating System Services Accounting
  • 19.  The owners of information stored in a multiuser computer system may want to control use of that information. When several disjoined processes execute concurrently, it should not be possible for one process to interfere with others or with operating system itself.  Protection involves ensuring that all access to system resources is controlled.  Security of the system from outsiders is also important. Such security starts with each user having to authenticate himself to the system, usually by means of password, to be allowed access to the resources. It extends to defending external I/O devices, including modems and network adapters, from invalid access attempts, and to recording all such connections for detection of break-ins. Operating System Services Protection
  • 20. System Calls  In computing, a system call is the programmatic way in which a computer program requests a service from the kernel of the operating system it is executed on. A system call is a way for programs to interact with the operating system. A computer program makes a system call when it makes a request to the operating system’s kernel. System call provides the services of the operating system to the user programs via Application Program Interface(API). It provides an interface between a process and operating system to allow user-level processes to request services of the operating system. System calls are the only entry points into the kernel system. All programs needing resources must use system calls.
  • 21. System Calls Services Provided by System Calls :  Process creation and management  Main memory management  File Access, Directory and File system management  Device handling(I/O)  Protection  Networking, etc. Types of System Calls : There are 5 different categories of system calls –  Process control: end, abort, create, terminate, allocate and free memory.  File management: create, open, close, delete, read file etc.  Device management  Information maintenance  Communication
  • 24. System Design and Implementation  Design Goals  Mechanism and Polices  Implementation
  • 25. It is quite complicated to define all the goals and specifications of the operating system while designing it. The design changes depending on the type of the operating system i.e if it is batch system, time shared system, single user system, multi user system, distributed system etc. There are basically two types of goals while designing an operating system. These are − User Goals The operating system should be convenient, easy to use, reliable, safe and fast according to the users. However, these specifications are not very useful as there is no set method to achieve these goals. System Goals The operating system should be easy to design, implement and maintain. These are specifications required by those who create, maintain and operate the operating system. But there is not specific method to achieve these goals as well. System Design and Implementation Design Goals
  • 26.  There is no specific way to design an operating system as it is a highly creative task. However, there are general software principles that are applicable to all operating systems.  A subtle difference between mechanism and policy is that mechanism shows how to do something and policy shows what to do. Policies may change over time and this would lead to changes in mechanism. So, it is better to have a general mechanism that would require few changes even when a policy change occurs.  For example - If the mechanism and policy are independent, then few changes are required in mechanism if policy changes. If a policy favors I/O intensive processes over CPU intensive processes, then a policy change to preference of CPU intensive processes will not change the mechanism. System Design and Implementation Mechanism and Polices
  • 27. The operating system needs to be implemented after it is designed. Earlier they were written in assembly language but now higher level languages are used. Advantages of Higher Level Language There are multiple advantages to implementing an operating system using a higher level language such as: the code is written more fast, it is compact and also easier to debug and understand. Also, the operating system can be easily moved from one hardware to another if it is written in a high level language. Disadvantages of Higher Level Language Using high level language for implementing an operating system leads to a loss in speed and increase in storage requirements. However in modern systems only a small amount of code is needed for high performance, such as the CPU scheduler and memory manager. Also, the bottleneck routines in the system can be replaced by assembly language equivalents if required. System Design and Implementation Implementation