Operating Systems
What is OS?
 Operating System is a software, which makes a
computer to actually work.
 It is the software the enables all the programs we use.
 The OS organizes and controls the hardware.
 OS acts as an interface between the application
programs and the machine hardware.
 Examples: Windows, Linux, Unix and Mac OS, etc.,
What OS does?
An operating system performs basic tasks such as,
 controlling and allocating memory,
 prioritizing system requests,
 controlling input and output devices,
 facilitating networking and
 managing file systems.
Structure of Operating System:
Application Programs
System Programs
Software (Operating System)
HARDWARE
(Contd…)
Structure of Operating System
(Contd…):
 The structure of OS consists of 4 layers:
1. Hardware
Hardware consists of CPU, Main memory, I/O
Devices, etc,
2. Software (Operating System)
Software includes process management
routines, memory management routines, I/O
control routines, file management routines.
(Contd…)
Structure of Operating System
(Contd…):
3. System programs
This layer consists of compilers, Assemblers,
linker etc.
4. Application programs
This is dependent on users need. Ex. Railway
reservation system, Bank database
management etc.,
Types of Operating System
 Operating System can be classified into
various categories on the basis of several
criteria
 number of simultaneously active programs
 number of users working simultaneously
 number of processors in the computer system
 Application Oriented
 Etc.
Types of Operating System
 Batch Operating System
 Multiprogramming Operating System
 Time-sharing/Multitasking Operating System
 Multi Processing Operating System
 Multi-user Operating System
 Real-time Operating systems
 Distributed Operating Systems
Batch Operating System:
 Batch processing. Batch processing is the execution of a
series of programs ("jobs") on a computer without
manual intervention.
 Jobs are set up so they can be run to completion without
human interaction.
 All input parameters are predefined through scripts,
command line arguments, control files, or job control
language.
 The OS was simple, its major task was to transfer control
from one job to the next.
 The job was submitted to the computer operator in form
of punch cards. At some later time the output appeared.
Batch Operating System (Contd…):
Batch Operating System (Contd…):
 Common output devices were line printers, tape drives,
and card punches.
 Example: Bank statements - At the end of month the
bank makes statements for each account holder. So
these bank statements can be made easily by batch
systems at the end of month.
OS
User
program
area
Memory:
The OS was
always resident
in memory
Batch Operating System (Contd…):
 Questions:
 Write a limitation of batch Processing with
respectively CPU time.
 Any one real world example of batch processing
(other than subject teacher given)
Multiprogramming Operating System:
 Main Limitation of Batch Processing:
 CPU Idle time is more.
 All Jobs in batch are executed in sequence manner only.
So required to more utilization of CPU
 Multiprogramming is a technique
 To execute number of programs simultaneously by a single
processor.
 number of processes reside in main memory at a time.
 Picks and begins to executes one of the jobs in the main memory.
 If any I/O wait happened in a process, then CPU switches from
that job to another job.
Hence CPU in not idle at any time.
Multiprogramming (Contd…):
OS
Job 1
Job 2
Job 3
Job 4
Job 5
• Figure dipicts the layout of
multiprogramming system.
• The main memory consists of 5
jobs at a time, the CPU executes
one by one.
Advantages:
•Efficient memory utilization
•Throughput increases
•CPU is never idle, so performance
increases.
Multiprogramming (Contd…):
 Questions:
 “Memory management must provide isolation and
protection in multiprogramming operating system”,
Why?
Time Sharing Operating Systems:
 Time sharing, or multitasking,
 Logical extension of multiprogramming.
 Multiple jobs are executed by switching the CPU
between them.
 The CPU time is shared by different processes, so it is
called as “Time sharing Systems”.
 Time slice is defined by the OS, for sharing CPU time
between processes.
 Examples: Multics, Unix, etc.,
Time Sharing Operating Systems:
 Advantages
 Quick response.
 Avoid duplication of software.
 Reduces CPU idle time.
 Disadvantages
 Reliability.
 More security and integrity of user programs required.
Time Sharing Operating Systems:
Question:
Why Time Sharing Operating System is called as logical
extension of multiprogramming? Describe with example
and both objectives.
Multi Processing Operating System
 Use of two or more central processing units (CPUs)
within a single computer system.
 Ability of a system to support more than one processor.
 Ability to allocate tasks between processors.
Multi-user Operating Systems:
 Allow multiple user to use same computer at
time and/or different time.
 Question:
 Write at least five operating system names which
is multi-user supported operating system.
 Multi processing Operating System and Multi-user
Operating System are similar. Comment on it.
Real-time Operating systems:
 Ability to provide a required level of services
in bounded response time.
 Quick Response
 Task is completed within specific time delay.
Examples:
Controlling Traffic Signals, Aircraft
 Two types - Hard Real Time and Soft Real Time
Real-time Operating systems:
 Hard Real Time:
 The Action must be taken within the specified
timeline.
 Failure to meet deadlines is fatal
 Example: Flight Control System
Soft Real Time:
 Not mandatory to meet deadlines.
 Late completion of jobs is undesirable but not
fatal.
 Example- Online Database, Computer Games
Real-time Operating systems:
 Questions:
 Understand and write about any one of real time
operating system example with respective to CPU
utilization, Memory management and I/O
Operation.
Operating Systems Structure:
 Need to understand Operating System from
various Viewpoints .
 System Components – How connected and
their roles.
 Services Offered and how provided
 Interface
 Etc.
Operating Systems Components:
 Process Management
 Main Memory Management
 File Management
 I/O-System Management
 Secondary-Storage Management
 Networking
 Protection System
 Command-Interpreter System
Operating Systems Components:
 Process Management
 A process is a program in execution
 (A program is passive, a process active.)
 Responsibilities Covered:
 To create & delete processes (User & System)
 Process suspension and resumption
 Process Scheduling (priority, time management, . . . )
 Provision of mechanisms for
 process synchronization, communication
 deadlock handling
Operating Systems Components:
 Main Memory Management
 Memory is a large array of words or bytes, each with its
own address.
 It is a repository of quickly accessible data shared by the
CPU and I/O devices.
 Responsibilities Covered:
 Allocate and deallocate memory space as needed.
 Decide which processes to be loaded when memory space
becomes available.
 Keep track of which parts of memory are currently being
used and by whom.
Operating Systems Components:
 File Management
 A file is a collection of related information and defined a
logical storage unit.
 Associated with its attributes like name, size, type, etc.
 Responsibilities Covered:
 File/Directory creation and deletion.
 File backup on stable (nonvolatile) storage media.
 Mapping with secondary storage.
 Support of primitives for manipulating contents of files and
directories.
Operating Systems Components:
 I/O-System Management
 OS hides the peculiarities of specific hardware of I/O
devices from the user. (through Kernel to use device-driver)
 Responsibilities Covered:
 A memory-management component that includes
buffering, caching, and spooling.
 A general device-driver interface.
 Drivers for each device - translate read/write
requests into disk position commands.
Operating Systems Components:
 Secondary-Storage Management
 Secondary-storage devices are used to store data and
programs of the users. Hard Disks, tapes, optical, ...
 OS uses optimal techniques for secondary-storage
management in order to increase its efficiency.
 Responsibilities Covered:
 Free space management.
 Storage allocation.
 Disk scheduling.
Operating Systems Components:
 Networking
 Communication system between distributed processors.
 Getting information about files/processes/etc. on a remote
machine.
 Can use either a message passing or a shared memory
model.
Operating Systems Components:
 Protection System
 Users must be protected during the concurrent execution of
multiple processes.
 OS’s authorization is required to utilize the resources (i.e. files,
memory segments, CPU, plotters, printers, tapes).
 Protection refers to a mechanism for controlling access by
programs, processes, or users to both system and user
resources.
 Responsibilities Covered:
 Authorized and unauthorized usage.
 Improves reliability by detecting errors
Operating Systems Interface:
 Command Line Interface
Operating Systems Interface:
 Graphical User Interface
Operating Systems Services:
 Objective: Reduce the burden of programming
 OS services for convenience of the users / programmers
 User Interface
 Program execution
 I/O operations
 File-system manipulation
 Communications
 Error detection
Operating Systems Services:
 OS services for ensuring efficient system operations
 Resource allocation
 Accounting
 Protection
System Call:
 Provide the interface between a process and the OS.
 Used to complete a specific task:
 Reading input file name
 Opening a file
 Prompting a message
 Reading data from the file or console
 Writing data to the file or console
 Etc.
 Example: fork()
Operating System Structure:
 How an Operating System is put together
everything?
 Simple Structure
 Monolithic kernel
 Layer Structure
 Microkernels
 Modules
Operating System Structure:
 Simple Structure
 MS-DOS
Operating System Structure:
 Simple Structure
 UNIX (Monolithic Kernel)
Operating System Structure:
 Layer Structure
Operating System Structure:
 Microkernels
Operating System Structure:
 Modules

Introduction of operating system

  • 1.
  • 2.
    What is OS? Operating System is a software, which makes a computer to actually work.  It is the software the enables all the programs we use.  The OS organizes and controls the hardware.  OS acts as an interface between the application programs and the machine hardware.  Examples: Windows, Linux, Unix and Mac OS, etc.,
  • 3.
    What OS does? Anoperating system performs basic tasks such as,  controlling and allocating memory,  prioritizing system requests,  controlling input and output devices,  facilitating networking and  managing file systems.
  • 4.
    Structure of OperatingSystem: Application Programs System Programs Software (Operating System) HARDWARE (Contd…)
  • 5.
    Structure of OperatingSystem (Contd…):  The structure of OS consists of 4 layers: 1. Hardware Hardware consists of CPU, Main memory, I/O Devices, etc, 2. Software (Operating System) Software includes process management routines, memory management routines, I/O control routines, file management routines. (Contd…)
  • 6.
    Structure of OperatingSystem (Contd…): 3. System programs This layer consists of compilers, Assemblers, linker etc. 4. Application programs This is dependent on users need. Ex. Railway reservation system, Bank database management etc.,
  • 7.
    Types of OperatingSystem  Operating System can be classified into various categories on the basis of several criteria  number of simultaneously active programs  number of users working simultaneously  number of processors in the computer system  Application Oriented  Etc.
  • 8.
    Types of OperatingSystem  Batch Operating System  Multiprogramming Operating System  Time-sharing/Multitasking Operating System  Multi Processing Operating System  Multi-user Operating System  Real-time Operating systems  Distributed Operating Systems
  • 9.
    Batch Operating System: Batch processing. Batch processing is the execution of a series of programs ("jobs") on a computer without manual intervention.  Jobs are set up so they can be run to completion without human interaction.  All input parameters are predefined through scripts, command line arguments, control files, or job control language.  The OS was simple, its major task was to transfer control from one job to the next.  The job was submitted to the computer operator in form of punch cards. At some later time the output appeared.
  • 10.
  • 11.
    Batch Operating System(Contd…):  Common output devices were line printers, tape drives, and card punches.  Example: Bank statements - At the end of month the bank makes statements for each account holder. So these bank statements can be made easily by batch systems at the end of month. OS User program area Memory: The OS was always resident in memory
  • 12.
    Batch Operating System(Contd…):  Questions:  Write a limitation of batch Processing with respectively CPU time.  Any one real world example of batch processing (other than subject teacher given)
  • 13.
    Multiprogramming Operating System: Main Limitation of Batch Processing:  CPU Idle time is more.  All Jobs in batch are executed in sequence manner only. So required to more utilization of CPU  Multiprogramming is a technique  To execute number of programs simultaneously by a single processor.  number of processes reside in main memory at a time.  Picks and begins to executes one of the jobs in the main memory.  If any I/O wait happened in a process, then CPU switches from that job to another job. Hence CPU in not idle at any time.
  • 14.
    Multiprogramming (Contd…): OS Job 1 Job2 Job 3 Job 4 Job 5 • Figure dipicts the layout of multiprogramming system. • The main memory consists of 5 jobs at a time, the CPU executes one by one. Advantages: •Efficient memory utilization •Throughput increases •CPU is never idle, so performance increases.
  • 15.
    Multiprogramming (Contd…):  Questions: “Memory management must provide isolation and protection in multiprogramming operating system”, Why?
  • 16.
    Time Sharing OperatingSystems:  Time sharing, or multitasking,  Logical extension of multiprogramming.  Multiple jobs are executed by switching the CPU between them.  The CPU time is shared by different processes, so it is called as “Time sharing Systems”.  Time slice is defined by the OS, for sharing CPU time between processes.  Examples: Multics, Unix, etc.,
  • 17.
    Time Sharing OperatingSystems:  Advantages  Quick response.  Avoid duplication of software.  Reduces CPU idle time.  Disadvantages  Reliability.  More security and integrity of user programs required.
  • 18.
    Time Sharing OperatingSystems: Question: Why Time Sharing Operating System is called as logical extension of multiprogramming? Describe with example and both objectives.
  • 19.
    Multi Processing OperatingSystem  Use of two or more central processing units (CPUs) within a single computer system.  Ability of a system to support more than one processor.  Ability to allocate tasks between processors.
  • 20.
    Multi-user Operating Systems: Allow multiple user to use same computer at time and/or different time.  Question:  Write at least five operating system names which is multi-user supported operating system.  Multi processing Operating System and Multi-user Operating System are similar. Comment on it.
  • 21.
    Real-time Operating systems: Ability to provide a required level of services in bounded response time.  Quick Response  Task is completed within specific time delay. Examples: Controlling Traffic Signals, Aircraft  Two types - Hard Real Time and Soft Real Time
  • 22.
    Real-time Operating systems: Hard Real Time:  The Action must be taken within the specified timeline.  Failure to meet deadlines is fatal  Example: Flight Control System Soft Real Time:  Not mandatory to meet deadlines.  Late completion of jobs is undesirable but not fatal.  Example- Online Database, Computer Games
  • 23.
    Real-time Operating systems: Questions:  Understand and write about any one of real time operating system example with respective to CPU utilization, Memory management and I/O Operation.
  • 24.
    Operating Systems Structure: Need to understand Operating System from various Viewpoints .  System Components – How connected and their roles.  Services Offered and how provided  Interface  Etc.
  • 25.
    Operating Systems Components: Process Management  Main Memory Management  File Management  I/O-System Management  Secondary-Storage Management  Networking  Protection System  Command-Interpreter System
  • 26.
    Operating Systems Components: Process Management  A process is a program in execution  (A program is passive, a process active.)  Responsibilities Covered:  To create & delete processes (User & System)  Process suspension and resumption  Process Scheduling (priority, time management, . . . )  Provision of mechanisms for  process synchronization, communication  deadlock handling
  • 27.
    Operating Systems Components: Main Memory Management  Memory is a large array of words or bytes, each with its own address.  It is a repository of quickly accessible data shared by the CPU and I/O devices.  Responsibilities Covered:  Allocate and deallocate memory space as needed.  Decide which processes to be loaded when memory space becomes available.  Keep track of which parts of memory are currently being used and by whom.
  • 28.
    Operating Systems Components: File Management  A file is a collection of related information and defined a logical storage unit.  Associated with its attributes like name, size, type, etc.  Responsibilities Covered:  File/Directory creation and deletion.  File backup on stable (nonvolatile) storage media.  Mapping with secondary storage.  Support of primitives for manipulating contents of files and directories.
  • 29.
    Operating Systems Components: I/O-System Management  OS hides the peculiarities of specific hardware of I/O devices from the user. (through Kernel to use device-driver)  Responsibilities Covered:  A memory-management component that includes buffering, caching, and spooling.  A general device-driver interface.  Drivers for each device - translate read/write requests into disk position commands.
  • 30.
    Operating Systems Components: Secondary-Storage Management  Secondary-storage devices are used to store data and programs of the users. Hard Disks, tapes, optical, ...  OS uses optimal techniques for secondary-storage management in order to increase its efficiency.  Responsibilities Covered:  Free space management.  Storage allocation.  Disk scheduling.
  • 31.
    Operating Systems Components: Networking  Communication system between distributed processors.  Getting information about files/processes/etc. on a remote machine.  Can use either a message passing or a shared memory model.
  • 32.
    Operating Systems Components: Protection System  Users must be protected during the concurrent execution of multiple processes.  OS’s authorization is required to utilize the resources (i.e. files, memory segments, CPU, plotters, printers, tapes).  Protection refers to a mechanism for controlling access by programs, processes, or users to both system and user resources.  Responsibilities Covered:  Authorized and unauthorized usage.  Improves reliability by detecting errors
  • 33.
    Operating Systems Interface: Command Line Interface
  • 34.
    Operating Systems Interface: Graphical User Interface
  • 35.
    Operating Systems Services: Objective: Reduce the burden of programming  OS services for convenience of the users / programmers  User Interface  Program execution  I/O operations  File-system manipulation  Communications  Error detection
  • 36.
    Operating Systems Services: OS services for ensuring efficient system operations  Resource allocation  Accounting  Protection
  • 37.
    System Call:  Providethe interface between a process and the OS.  Used to complete a specific task:  Reading input file name  Opening a file  Prompting a message  Reading data from the file or console  Writing data to the file or console  Etc.  Example: fork()
  • 38.
    Operating System Structure: How an Operating System is put together everything?  Simple Structure  Monolithic kernel  Layer Structure  Microkernels  Modules
  • 39.
    Operating System Structure: Simple Structure  MS-DOS
  • 40.
    Operating System Structure: Simple Structure  UNIX (Monolithic Kernel)
  • 41.
  • 42.
  • 43.