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

OS UnitI Complete

Operating system

Uploaded by

Harsh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

OS UnitI Complete

Operating system

Uploaded by

Harsh Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 59

Operating system

Operating System

An operating system is system software that acts as an


intermediary between a user of a computer and the computer
hardware.
Computing Environment
Types of Computing Environment
Non interactive Computing Environment
● In these environments, a user submits both a
computation in the form of a program and its
data together to the operating system.
● The user has no contact with the
computation during its execution.
Examples of noninteractive computations
are scientific computations involving
number crunching and database updates
performed overnight.
Interactive Computing Environments
● User may interact with a computation while it is
in progress.
● The operating system focuses on reducing the
average amount of time required to implement
an interaction between a user and his
computation.
Real-Time Computing Environments

● works under specific time constraints, so


its actions are effective only if they are
completed within a specified interval of
time.
Distributed computing environment
● Distributed computing environment
enables a computation to use
resources located in several computer
systems through a network.
Embedded computing environment
● In the embedded computing environment, the
computer system is a part of a specific hardware
system, such as a household appliance, a
subsystem of an automobile, or a handheld
device such as a personal digital assistant (PDA),
and runs computations that effectively control the
system.
Modern Computing Environments
CLASSES OF OPERATING SYSTEMS
● Batch processing
● Multiprogramming
● Time-sharing
● Real time
● Distributed
Batch processing OPERATING SYSTEM
● Batch Processing
Multiprogramming System
● Multiprogramming operating systems were developed to provide efficient
resource utilization in a non interactive environment.

Figure 1.
Multiprogramming System - continued…
● 11
DMA (Direct Memory Access)


DMA (Direct Memory Access)

● The DMA makes multiprogramming feasible by permitting


concurrent operation of the CPU and I/O devices.
Throughput of a multiprogramming OS
● An appropriate measure of performance of a
multiprogramming OS is throughput
● Throughput is the ratio of the number of programs
processed and the total time taken to process
them
Throughput of a multiprogramming OS – Continued…

Degree of multiprogramming

● Degree of multiprogramming
○ Number of programs in memory which perform CPU
as well as I/O operations
● Multiprogramming system uses an appropriate
program mix of cpu bound and I/O bound
programs to ensure good utilization of both the
CPU and I/O devices.
Multiprogramming System

● The OS uses the notion of priority-based


preemptive scheduling to share the CPU among
programs in a manner that would ensure good
overlap of their CPU and I/O activities.
Priority Based Scheduling
● The kernel assigns numeric priorities to programs
● Priorities are positive integers and a large value
implies a high priority.
● When many programs need the CPU at the same
time, the kernel gives the CPU to the program
with the highest priority.
Priority Based Scheduling – continued…

● The OS uses priority in a preemptive manner; i.e.,


● It preempts a low-priority program executing on
the CPU if a high-priority program needs the
CPU.
● The CPU is always executing the highest-priority
program that needs it.
Priority Based Scheduling – continued…

● Assignment of priorities to programs is a crucial


decision that can influence system throughput.
○ An I/O-bound program should have a higher priority
than a CPU-bound program.
Multiprogramming System -continued…
● Timing chart when I/O-bound program has higher priority
Turnaround time
● The turnaround time of a program is the appropriate
measure of user service in a multiprogramming system.
● It depends on the total number of programs in
the system
● the manner in which the kernel shares the CPU
between programs, and the program’s own execution
requirements.
Multiprogramming System -continued…

● Increasing the Degree of Multiprogramming


○ Add a CPU-bound program having the lowest priority.
Hence its presence would not affect the progress of
progcb and progiob.
○ Add an I/O-bound program with priority between the
priorities of progiob and progcb
Multiprogramming System -continued…

● When an appropriate program mix is maintained, we can


expect that an increase in the degree of multiprogramming
would result in an increase in throughput.
Degree of multiprogramming
Time Sharing Operating System

● Time Sharing Operating System


Active State : This is the state of the
process which is currently processing
on the CPU. Only, one process is in
the active state at a time.

Ready State: In this state, the


process is ready for execution but, it is
waiting for its turn to use the CPU.
More than one process can be in the
ready state at a time.

Waiting State: In this state, the process is not


ready for execution. It is waiting for some
input/output process to get complete.
Time Sharing Operating System – continued…

● The scheduling technique used by a time-sharing


kernel is called round-robin scheduling with time-
slicing.
Time Sharing Operating System – continued…
● schematic of round-robin scheduling with time-slicing.
Features of Time-Sharing OS

● Advantages
• For all operations, each user sets aside time.
• At the same time, multiple online users can utilise the same computer.
• End users believe they have complete control over the computer
system.
• Interaction among users and computers is improved.
• User inquiries can result in quick responses.
• It is no longer necessary to wait for the previous task to complete
before using the processor.
• It can do a large number of tasks quickly.
Pros of Time-Sharing OS

• It has a quick response time.


• CPU idle time is reduced.
• Each task is assigned a certain time limit.
• Reduced likelihood of program duplication
improves reaction time.
• User-friendly and simple to use.
Cons of Time-Sharing OS

• It uses a lot of resources.


• Hardware with high quality is required.
• It has difficulty with consistency.
• A security and integrity problem with user
programs and data.
● Response time (rt)
○ The time taken to service a subrequest.

n:-the number of users using the system


at any time
σ :- scheduling overhead;

η :- CPU efficiency
Operation of Processes in a Time-Sharing
System
● Processes P1 and P2 follow a cyclic behavior pattern. Each
cycle contains a burst of CPU activity to service a subrequest
and a burst of I/O activity to report its result, followed by a wait
until the next subrequest is submitted to it. The CPU bursts of
processes P1 and P2 are 15 and 30 ms, respectively, while the
I/O bursts are 100 and 60 ms, respectively.
Operation of Processes in a Time-Sharing System – continued…
Operation of Processes in a Time-Sharing System – continued…
Swapping

Figure 3
Operation of an OS
Structure of Operating System

A policy is the guiding principle under which the


operating system will perform the function.
Structure of Operating System–continued…
Mechanism

A mechanism is a specific
action needed to
implement a policy
Portability and Extensibility of Operating Systems

● Porting is the act of adapting software for use in a new


computer system.
○ Portability refers to the ease with which a software program can be
ported
● Extensibility refers to the ease with which new functionalities
can be added to a software system.
Structure of Operating system-continued…

Structure of Operating system


Monolithic

Layered Structure

Virtual Machine

Kernel Based

Microkernel based
Monolithic structure
● Early operating systems had a monolithic structure
● the OS formed a single software layer between the user
and the bare machine, i.e., the computer system’s
hardware
Monolithic structure

● The user interface was provided by a command


interpreter.
● The command interpreter organized creation of user
processes.
● Both the command interpreter and user processes
invoked OS functionalities and services through
system calls.
Problems with the monolithic structure
● The sole OS layer had an interface with the bare machine.
○ Architecture-dependent code was spread throughout
the OS, and so there was poor portability.
● Testing and debugging was difficult, leading to high costs
of maintenance and enhancement.
Layered structure
● The layered structure attacks the complexity and cost of
developing and maintaining an OS by structuring it into a number
of layers
Structure of the THE Multiprogramming System

Layers in the THE Multiprogramming System


Virtual machine operating system

A virtual machine allows


users to install and run
multiple OS in a single PC
thereby giving an illusion
that each separate
environment is running its
own private computer
Virtual machine operating system
Virtualization

● Virtualization is the process of mapping the interfaces and


resources of a virtual machine into the interfaces and
resources of the host machine.
● Full virtualization would imply that the host machine and a
virtual machine have identical capabilities.
○ An OS can operate identically while running on a bare machine and
on a virtual machine supported by a VM OS
● Full virtualization may weaken security
Virtual Machine Monitors also called a hypervisor
● Virtual Machine Monitor is a software layer that operates on top of a host OS.
● It virtualizes the resources of the host computer and supports concurrent
operation of many virtual machines.
KERNEL-BASED OPERATING SYSTEMS
● To provide dynamically loadable kernel modules, the kernel is
designed as a set of modules that interact among themselves through
well-specified interfaces.
A base kernel consisting of a core set of
modules is loaded when the system is
booted. Other modules,which conform to
interfaces of the base kernel, are loaded
when their functionalities are needed,
and are removed from memory when
they are no longer needed.
Problems in KERNEL-BASED OPERATING SYSTEMS

● A large kernel size


○ Detracts from the goal of portability
○ It may also necessitate kernel modification to incorporate
new features, which causes low extensibility.
MICROKERNEL-BASED OPERATING SYSTEMS

● The microkernel was developed in the early 1990s to


overcome the problems
concerning portability, extensibility, and reliability of kernels.
● A microkernel is an essential core of OS code, thus it
contains only a subset of the mechanisms typically included
in a kernel

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy